
Is this a domoticz , python or life360 problem.
Running domoticz beta v 3.9208 on a synology.
Moderator: leecollings
Actually getting the address from coordinates is easy, since google maps API doesnt need a key for that. I will change the code according to that next week. The problem is with the traffic data; i may completely take it out.g00fy wrote: ↑Thursday 02 August 2018 18:02 I did write a little change to your code that makes it possible to use Open Streetmaps as source, using Nominatum for the API.
At the moment Iam on holidays using it and it seems to work reasonably well for getting your location.
One thing to look into is the usage policies of Nominatim. It wants you to 'provide a valid HTTP Referer or User-Agent identifying the application'. For testing I used Domoticz-geofence for now, but I don't know if that will be right.
It looks like I can't upload the code via Tapatalk, so I will try to sent it to you in a message. Hopefully it will getting you forward in a solution replacing Google Maps.
PS I am not a software developer, so please feel free to change the code when you think it can be done better...
Verstuurd vanaf mijn TA-1012 met Tapatalk
Just now issued v2.0.0 which includes those items:heggink wrote: ↑Monday 17 September 2018 22:36 @febalci: I noticed in your plugin that, onHeartbeat, you call api = life360(), api.authenticate, api.get_circle_id and api.get_circle. I would expect that you would only need to update the circle details (api.get_circle()) rather than everything else. Any reason why the whole re-initialise?
Code: Select all
api = life360(authorization_token=self.authorization_token, username=Parameters["Username"], password=Parameters["Password"])
if api.authenticate():
Token is more likely to change. I feel it like it is a session token. If you are sure it doesn't change; then we can try it.heggink wrote: ↑Tuesday 18 September 2018 15:24 hey @febalic,
your heartbeat still has the following in it:Code: Select all
api = life360(authorization_token=self.authorization_token, username=Parameters["Username"], password=Parameters["Password"]) if api.authenticate():
So you only took out the get_circle_id and not the api.authenticate(). I believe you can also take that out unless the token expires at some point, correct?
Is the Plug-in still working after you modified it? I have the same problem as you describe, and I am curious as this is a possible solution.heggink wrote: ↑Tuesday 18 September 2018 21:11 Understood. It's just that I run quite a number of python plugins that use urllib to interface to iCloud, life360, weather systems and so on. Urllib is blocking and I have the feeling that it impacts responsiveness of my system more than if they were in an asynchronous way. Sometimes walking into the garage, it takes seconds for the light to turn on (dzvents script) where normally it is sub second.
Users browsing this forum: NaTuRaL and 1 guest