This is an ioBroker adapter for processing location information messages which should contain a user, a geoposition and a timestamp as minimum. The adapters analyzes whether the location information is within a radius around the location configuration of ioBroker or optional other places.
There is just one mandatory configuration value: the radius (meters) which will be used to identify the current location of a user. The location of ioBroker is used to identify users being "at home", other places can be added as part of the configuration.
Radius (mandatory) should be the radius in meters used to check whether the user is at a specific place (home or custom).
Name for home can be used to set a custom name for the home place.
Google Maps API key will be used for enabling geocoding. A missing API key will be fetched from a configured vis-map instance (if available) when configuration page has been opened.
Google Maps Geocoding can be activated to get a real address and an elevation for a provided geoposition.
Places is a flexible list containing custom places where each place should have valid values for name, latitude and longitude.
Users is a flexible list containing user mappings.
To process location update just send a message using the following syntax:
// send a message to all instances of places adapter;// send a message to a specific instance of places adapter adapter;// send a message to a specific instance and define a callback;
Structure for returned messages
The following block shows how response messages look like. For each value the ioBroker object tree has an according state.
"user": "Name of person" // name of person (may have been replaced by user mapping)"latitude": 509576191"longitude": 68272409"timestamp": 1520932471000"date": "2018-03-13 10:14:31" // date extracted from timestamp"atHome": false // true if inside the configured radius around ioBroker"homeDistance": 104898 // distance in meters between position and ioBroker"name": "" // name of place found within the configuration"address": "" // readable address (if geocoding is active)"elevation": "" // elevation in meters (if geocoding is active)
Sample: OwnTracks + ioBroker.iot + ioBroker.places
1. Configure iobroker.iot
Add a custom services xyz under White list for Services.
2. Configure OwnTracks mobile apps
Change the mode to HTTP Private and use the following address as Host : https://iobroker.pro/service/custom_xyz/
3. Configure iobroker.places
On the tab Integration you have to select the instance of the cloud adapter and xyz as service. The adapter will listen to incoming requests for the service and start the processing.
Sample: Telegram + ioBroker.telegram + ioBroker.places
1. Configure iobroker.telegram
Enable the option to store raw requests.
Create a short script with a subscription to the raw request, f.e. from telegram.0.communicate.requestRaw, and send a new request object to iobroker.places (or an instance of it):
- (BasGo) Added compact mode, replaced integration of iobroker.cloud with iobroker.iot
- (bluefox) Error with blockly was fixed
- (BasGo) Added handling for invalid route details
- (BasGo) Changed implementation to use promises
- (BasGo) Added route details for driving home
- (BasGo) Extended help texts
- (BasGo) Added optional subscription for cloud adapter
- (BasGo) UI fixes
- (BasGo) Configuration dialog extended
- (BasGo) Google Maps can be used for configuration
- (BasGo) Geocoding can be activated
- (BasGo) Added user mappings
- (BasGo) Optimized state handling
- (BasGo) Added option to clear array
- (BasGo) Added check for newer entries
- (BasGo) Extended configuration
- (BasGo) Materialized admin page
- (BasGo) Fixed some smaller issues
- (BasGo) Initial release
This adapter is licensed under the MIT license which is part of this repository.