iobroker-community-adapters / ioBroker.places

Adapter for ioBroker for analyzing location information
MIT License
5 stars 5 forks source link

Route ZERO_RESULTS confusing Places? #1

Closed clabbo closed 6 years ago

clabbo commented 6 years ago

Hi The Places module is my favorite Iobroker module (use it with Google-Sharedlocation)! It has been solid for a long time but recently I noticed some unexpected behaviour.

I am living in Sweden and it works perfecly when my family members move around locally but now, a few days ago, my kids went on holiday on the other side of the Atlantic and suddenly Places doesn't update my kids anymore (still works for me and my wife though). I can see from the log that the new location is processed by Places but something seems to go wrong.

I have scrambled the decimals here, but the processing seems to get the correct input: Processing location info: {"user":"some user id","latitude":39.0123456,"longitude":-77.0123456,"timestamp":1532899434010,"date":"2018-07-29 23:23:54"} It then checks all my defined places and finally: ... Checking if position is at 'Jonas house' (radius: 250m) Place found, skipping other checks Then the "route response" looks strange. It has our home (Sweden) address/coordinates both as origin and destination (which isn't shown here but I see it in the mouseover popup, I can email it if needed): Received route response: {"status":200,"headers":{"content-type":"application/json; charset=UTF-8","date":"Sun, 29 Jul 2018 21:23:49 GMT","expires":"Sun, 29 Jul 2018 21:24:19 GMT","cache-control":"pu

Yesterday I saw that the route was calculated between Sweden and Washington but Google gave a ZERO_RESULTS reply in the json, maybe that confused Places? But on the other hand, when I was in London recently Places worked as it should... Could the negative longitude in itself be a problem or is it the lack of road? There is no road between Sweden and London... Are other transports taken into account (boats) and how is it possible to get a ZERO_RESULTS in the first place, I mean it is possible to travel anywhere (given enough time)?

When I disabled the "use Google Maps geocoding" Places returned the correct value "Jonas house" to my javascript.

Would it be possible to disable the route - what is it used for?

An uneducated guess (not a programmer), perhaps line 150 (in "getAddress") need exception handling? If you want to repeat the issue you can set the current coordinates to Dulles Airport in Washington and the previous location to Arlanda Airport in Sweden and see if it causes the same issue for you.

Thank you for a great adapter! /Claes

BasGo commented 6 years ago

Hi Claes,

there's now a version 0.6.1 which should fix this issue. Can you test it again (f.e. by installing the 0.6.1 directly from GitHub)? If it is OK, I'll publish it as NPM package ;-)

Best regards

Bastian

clabbo commented 6 years ago

Thank you for the quick solution - it seems to work nicely :) /Claes

Den tis 31 juli 2018 kl 16:00 skrev BasGo notifications@github.com:

Hi Claes,

there's now a version 0.6.1 which should fix this issue. Can you test it again (f.e. by installing the 0.6.1 directly from GitHub)? If it is OK, I'll publish it as NPM package ;-)

Best regards

Bastian

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BasGo/ioBroker.places/issues/1#issuecomment-409231362, or mute the thread https://github.com/notifications/unsubscribe-auth/AnpqGKZWw20RF1bgsYpSdKsBKkOf6cP7ks5uMGMUgaJpZM4Vll4u .

-- /Claes +46701842099

clabbo commented 6 years ago

Hi again. I had a second look now and the issue I raised seems to be solved - but now I can't get the other stuff to work. The parts of my family who are on the other side of the Atlantic works fine now, but my wife and I who are still at home and move around in the region are not processed as they were by v0,6.0.

I can't figure out why. If I manually change the coordinates for myself (simulating a move 20 km from home or so) and feed them into Places I don't get any reply unless I change to Washington (to where there is no route). So it seems to work exactly backwards from before :) Sorry to be a pain /Claes

BasGo commented 6 years ago

Issue has been fixed ... forgot that I renamed an object. :-D

Can you test it again by using the GitHub version? If everything is OK, I'll publish it to NPM.

clabbo commented 6 years ago

Thanks! I have sent some screenshots to your gmx address. /Claes

Den tors 2 aug. 2018 kl 17:00 skrev BasGo notifications@github.com:

Can you provide me some getRoute responses (log debug, prefixed with "Received route response:")?

I've time to check it later this day ... and need more information ;-)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BasGo/ioBroker.places/issues/1#issuecomment-409956780, or mute the thread https://github.com/notifications/unsubscribe-auth/AnpqGNfHFo3WvsMeBn_V35aVymcCWdyhks5uMxQhgaJpZM4Vll4u .

-- /Claes +46701842099

BasGo commented 6 years ago

Issue has been fixed (and tested by clabbo)