t4qjXH8N / ioBroker.google-sharedlocations

An ioBroker-adapter for retrieving shared locations from Google
MIT License
60 stars 10 forks source link

[Request] Abrufintervall (e) also when "on change" #12

Closed obodeldog closed 6 years ago

obodeldog commented 6 years ago

In some cases it is not necessary to request every x Minutes the location. I like the idea that only at the event "on change" a request is send to google. So we can save much more energy in the Smartphone.

t4qjXH8N commented 6 years ago

I like the idea too. But on change means that Google has to inform the adapter that some location has changed. In my opinion this will never happen, Google does not even provide an API for this. Google simply does not want this. This is the reason why the Adapter has to mimic an ordinary user on request. Please note that the Adapter has no connection to your Smartphone. The Adapter only connects to Google services. How often your Smartphone report its location to Google can be adjusted in the Android settings. Sorry, I cannot help you. Or did I get anything wrong?

obodeldog commented 6 years ago

Ah, sorry. I mean "on change" in ioBroker. For example: Only when I change to specific view in vis, than send a request to google. Or when I push a "button" in vis a request to google will be send.

t4qjXH8N commented 6 years ago

Ah, now I get it. Sounds like a reasonable feature request. Maybe I find some time this weekend.

obodeldog commented 6 years ago

In other words: In the settings of the adapter there is the option to set the retrieval interval. I.e. your adapter sends every e.g. 10 minutes a request to google (if I understand it correctly). I.e. it should also be possible to manually trigger this "request" via an object. I don't know if I have expressed myself better now :-)

t4qjXH8N commented 6 years ago

That is what I am going to do.

t4qjXH8N commented 6 years ago

Could you please clone branch trigger_poll and test it?

obodeldog commented 6 years ago

Hi! Sorry I can't update it

t4qjXH8N commented 6 years ago

Should work now.

obodeldog commented 6 years ago

Hi. I have seen that it is implemented in version 1.3.0. Would I need to see a new object to retrieve the status? Or how can I do that in concrete terms?

t4qjXH8N commented 6 years ago

Yes, there should be an object called trigger_poll

obodeldog commented 6 years ago

Yes. Now I can see 👍 Perfect. It works fine