google-sharedlocations2 adapter for ioBroker
Share your location with ioBroker via Google Maps. You should create a separate Google account for this purpose, i.e. an account for your ioBroker installation. Do NOT use your personal account.
Configuration
In config, you can enter the credentials of the Google account you created for ioBroker and the adapter will do everything for you. Do NOT enter your personal account data.
Then share your location from your mobile device (and account) with this iobroker-google-account. The adapter will read the shared location and create states in ioBroker for each person sharing their location with the Google account.
You can configure the polling interval. But it will ignore values below 1 minute to avoid being blocked by Google.
If you do not want to enter username & password, this is possible, read below.
Use a cookie
Sometimes there are issues with login. Since the adapter just opens a browser and tries to login (but is more or less "blind", relies on information it already has), this can fail and there is not much I can do. Sometimes you might get a warning about a new login. Sometimes you will have to re-login with a second factor. If you run into such an issue copy a valid Cookie for google.com into the state google-sharedlocations2.0.info.currentCookies from a real browser.
You can even leave username & password empty in the configuration and then the adapter will try to keep that cookie working as good as possible (similar to my fork of the old google-sharedlocations-Adapter) without ever trying to login (but using the browser from time to time to load the whole page, seems to help with staying logged in).
This is not associated with Google in any way. Usage of this adapter might violate Google's Terms of Service. Use at your own risk.
Copyright and trademark of Google are property of Google.
Changelog
0.5.1 (2026-10-17)
- (Garfonso/Claude) fixed: after one failed login the adapter never tried to log in again and kept polling without being logged in until it was restarted. Login attempts are now retried with a growing delay.
- (Garfonso/Claude) fixed: a login confirmation that was not answered in time no longer overwrites working cookies.
- (Garfonso/Claude) cookies are only treated as a login if the Google session cookie is really there. Before, a few cookies for anonymous visitors were long enough to pass as valid.
- (Garfonso/Claude) a network outage no longer starts a login: errors like ERR_NAME_NOT_RESOLVED or "fetch failed" are recognized as "Google not reachable" and simply retried later.
0.5.0 (2026-09-29)
- (Garfonso/Claude) added settings for how long to wait for a Google login confirmation and for remote debugging of the login browser.
- (Garfonso/Claude) fixed several issues in the login: only google cookies are stored again, the faked user agent now matches the Chrome that is really used and login pages are no longer dumped to the console.
- (Garfonso/Claude) updated puppeteer and test dependencies.
- (Garfonso/Claude) internal cleanup of the cookie handling, no functional change.
- (Garfonso/Claude) fixed starting main.ts directly (for example from an IDE debug configuration), which failed with ERR_MODULE_NOT_FOUND.
- (Garfonso/Claude) fixed the automatic Chrome download, which failed with "require is not defined".
- (Garfonso/Claude) the adapter is now compiled to JavaScript instead of running the TypeScript sources directly, which avoids a whole class of module loading problems.
0.4.0 (2026-07-03)
- (ioBroker-Bot) Adapter requires admin >= 7.8.23 now.
- (Garfonso) minor fixes and improvements.
- (Garfonso/Claude) added self heal if wrong chrome version is installed (e.g. after update of puppeteer).
0.3.6 (2026-04-25)
- (Garfonso) somehow the old improve cookie call does not work anymore (since switch to fetch). Don't see why. -> So we just run the browser once a day.
- (Garfonso) Login with browser no tries to clear cookies in browser, if normal login does not work.
0.3.5 (2026-04-22)
- (Garfonso) resize logo.
License
MIT License
Copyright (c) 2026 Garfonso garfonso@mobo.info
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.