New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include current regions in "location" payload #523
Comments
A device may be in multiple overlapping regions/waypoints at the same time. A possible extension would be to add an array of regions the device is currently in. Obviously this would be limited to all locations the owner of the device has marked as "shared".
What is the use case for such an extension? For shared waypoints, the backend already receives the definitions of waypoints and enter/leave events. |
Hi Christoph, Kind regards, Walter |
you know that the iOS app is not always on. This means it will not process a reportLocation request instantaneously. Show us an example of the incoming messages. |
Yes, for sure. Below is the example, I did not expand the usual location messages and I removed most of those in between the events. I'm using Node-RED and "significant location changes". It could be that the sorting in Node-RED only has resolution in seconds...but I guess other systems might be affected as well. Log file is attached. I have 3 waypoints defined; "Home", "ICA Häggvik" and "Rackethallen". (The event order is actually also wrong for those) Maybe a sequential message counter in the event would be enough to allow for correct sorting in the post processing? If it makes sense or is simpler Kind regards, Walter |
Thanks Walter for sharing this, the enter/leave monitoring is done by iOS, not by the app (which is suspended anyhow). For some reason the enter home detection happens 6 seconds before the leave Rackethallen is detected and reported. Even a message counter would not change the sequence. Nothing we can do because the app is not always on and does not evaluate position changes itself. |
I see, understoood |
Hello Christoph, I mean the following scenario: a) I send a "reportLocation" command (with a GPS flag set)
Is this possible? If so you would have a possibility to actively "poll" for actual location and "wake up" the iPhone Kind regards, Walter |
We could add the names of all shared Regions which the device is currently in to all
|
I think that such enhancement would be very useful. I have noticed that the "location" event is received by my Node-RED application rather "frequent", like once every 10 minute or so if I remember correctly ( I will do some more logging) also when Owntracks is set to "significant location changes". This could eventually make it possible to "predict" arrival/departure to/from a region before the enter/leave event is received. Also if, for some reason, the enter/leave event is missed, you could synch up in the application when next location event arrives |
done, will be available in Version 9.8.6+ |
[NEW] use MQTT V5 library [NEW] Include desc in _type=beacon messages #521 [NEW] translation (PL) update [FIX] Drop AppleWatch support because Apple stops Watchkit 1 support [FIX] Drop Support for iOS < 11.0, older iOS versions use old version [FIX] Drop Addressbook links via Relation "owntracks" / "updateaddressbook" [FIX] Replace deprecated UIAlertView [FIX] Replace deprecated UILocalNotification [FIX] Replace deprecated AddressBook interface [FIX] show matching files when selecting certificates only [FIX] Crash in TodayViewController on iOS 9.3.5 iPhone4S #528 [FIX] Crash when accessing Address Book #529 [FIX] Crash when requesting reportLocation #527 [FIX] Crash in ConnectionType #526 [FIX] update lastUsedLocation immediately
Hi Christoph, great!!! |
It will be submitted to the App Store for approval once we’ve tested it and have submitted it. This will happen exactly when we think it is ready and neither earlier nor later. (I’m not being sarcastic: this is the response you should expect from an Open Source project. :-) ) |
Well, I have managed sw development professionally in multinational companies the last 25 years so sw quality, I know what matters and of course I appreciate due professional care in every step |
@krambriw a good read on who we are and what we do is here https://blog.opencagedata.com/post/interview-jp-mens-owntracks |
@krambriw if you share an email address with us, we will include you in our beta-tester group |
Hello, a first report: beta version 9.8.12 is working fine with the new feature "inregions". I think this is a very valuable feature when integrating/interfacing with other systems since the data can be used to synchronize the state if the leave/enter messages are missed for some reason. I have attached part of my log file showing location & transition messages. In my house I have a "mid range" iBeacon (powered by USB) with an estimated coverage radius of approx 100 m. I have also defined a normal "Home" region for the same, also with 100 m radius just to compare how well entering/leaving is detected. So far it looks like they are detected at the same moment. Could it be that the iBeacon connection somehow "is helping" the app to get a network connection, some higher priority in iOS supporting BLE connections??
|
Hello, a 2nd report: beta version 9.8.12, running in "significant changes" mode I have now increased the normal "Home" region radius to 500 m just to see if entering/leaving events would be detected earlier/later than compared with the iBeacon events. It looks like this made no difference, all events (including those in queue) are transmitted in the same moment, i.e. when the iBeacon signal is recognized or considered lost by the iPhone BLE. It "feels" as if a bluetooth connection/disconnection somehow is able to "wake up" the iPhone just enough and then, when this happens, also allow Owntracks to use the network. As I said, just my feeling, maybe you have some better insights To get a more "immediate" detection when leaving/entering regions I assume you need either to use iBeacons or maybe run the app in "move mode" The new feature "inregions" is anyway very useful in order to synchronize with my other systems |
Hello, a 3rd report: beta version 9.8.12, running in "significant changes" mode Noticed one thing - my iPhone has been in the same position but somehow one entry in the array "inregions" shows that it can drop out of a region anyway - and after a while it comes back. 2018-05-26 17:23:57 [ "Home", "EBEFD083-70A2-47C8-9837-E7B563…" ] |
Thanks for testing. re 3rd: |
Thank you very much for providing this nice app! 2nd: ok, thanks for the explanation, understood 3rd: here the corresponding lines with more details (I just add date & time to the complete payload when logging). My iPhone is mostly connected to the mobile network 4G, rarely using wifi. 2018-05-26 17:23 {"batt":100,"lon":18.004967092156743,"acc":65,"p":102.43795013427734,"vac":10,"lat":59.42884144721297,"inregions":["Home","EBEFD083-70A2-47C8-9837-E7B5634DF524"],"t":"p","_cp":1,"conn":"m","tst":1527347361,"alt":50,"_type":"location","tid":"wk","name":"wk"} |
you can see that the accuracy drops to +-2000 meters at 17:23 and the location lat/lon changes quite a bit at that time. Then the phone assumes you are not at "Home" When acc comes back to +-65 meters, you are back "Home". Accuracy values of a few 1000 meters are typical when the phone has no GPS fix and needs to rely on Cell Tower positioning. If you switch on WLAN, accuracy will probably be better if your WLAN access point is known... |
I see, right, that sorts this thing out, understood. I will use WLAN for some days and do some testing with that as well just to verify & see the difference |
Hi,
Working with the above command, would it possible to add desc to the response to the above command? (maybe this is not only for ios)
Like
location: object
lat: 59.42870689075506
lon: 18.005181523421005
name: "wk"
desc: "waypoint name" // the current waypoint the device is in or "none" if not inside any
The text was updated successfully, but these errors were encountered: