FilipDem / Domoticz-NEST-plugin

NEST Plugin for Domoticz using the Google credentials.
13 stars 4 forks source link

Away switch to late #34

Closed rolfie23 closed 8 months ago

rolfie23 commented 2 years ago

Since some time I have problems with the away function. Normally after some minutes none of the devices are home the best thermostat switches to away, this happens. But the switch in domoticz follows quite a time late! Here a example with times:

14:48 Leaving the house 14:57 Nest sees no phones at home 15:40 Domoticz away switch is on

16:37 Coming home 16:36 Nest sees phones at home 18:05 Domoticz away switch is off

Times are from my alarm system, the nest log en domoticz log. You see a lot of time difference between the actual status and the status in domoticz. I use the switch in some scripts, but they are working not they way anymore as expected.

How can I make the away switch gets the status of nest realtime (interval of plugin?)

I tried the latest plugin version few days ago but that also wasn't the solution.

Kind regards,

Rolf Jungbacker

FilipDem commented 2 years ago

Hi Rolf,

I have also seen this... However in my experience the away/home function of Nest goes no so fast neither. When you say "Nest sees no phone at home" does it mean that the Nest App (or thought the website) is set "Away"? Currently the interval will not help in my opinion. The interval defines really after how much time I ask for an update to the Nest server. And the update I get back is reflected in the "Switch". You can see/test this. You can change the Away/Home through domoticz. If you click on the device, it will change the state... Then you will see it immediately changing on the NestApp (or website) and the device in Domoticz stays correct (based on new information received from the Nest servers).

So in my opinion, there is a delay in the update of the home/away on the Nest itself and Domoticz shows the correct status. I cannot do some tests this weekend, but you can really use the nest.py outside domoticz to ask for the status... The Away status from Nest servers is printed by default (see code line 434). And if you would uncomment the line 251, all the return from the Nest Servers is also printed in JSON format. There you will see that the Away status should match the Domoticz device. You can also let me know the complete output and I can perhaps go through it once myself.

Filip

Op vr 21 jan. 2022 om 14:36 schreef rolfie23 @.***>:

Since some time I have problems with the away function. Normally after some minutes none of the devices are home the best thermostat switches to away, this happens. But the switch in domoticz follows quite a time late! Here a example with times:

14:48 Leaving the house 14:57 Nest sees no phones at home 15:40 Domoticz away switch is on

16:37 Coming home 16:36 Nest sees phones at home 18:05 Domoticz away switch is off

Times are from my alarm system, the nest log en domoticz log. You see a lot of time difference between the actual status and the status in domoticz. I use the switch in some scripts, but they are working not they way anymore as expected.

How can I make the away switch gets the status of nest realtime (interval of plugin?)

I tried the latest plugin version few days ago but that also wasn't the solution.

Kind regards,

Rolf Jungbacker

— Reply to this email directly, view it on GitHub https://github.com/FilipDem/Domoticz-NEST-plugin/issues/34, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3SGC7677YWPRVDKVT7BCDUXFOOBANCNFSM5MPRL4UQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

rolfie23 commented 2 years ago

Hello,

When Nest sees no phone it's when Google Home and the Nest app has switched in the activity log. See log in Google Home: Google Home And see log in the Nest app: Nest app. (Afwezig is away, Thuis is Home).

If I switch away manualy in the nest app, Domoticz still says i'm home after a fews intervals. If I put on Eco for example in the app the next interval it changes in domoticz.

If I switch away from domoticz it's instantly changes in the app. The same for Eco.

With the interval of the plugin I means if i have set it to 1 minute and away is on i expect it to be arrived on domoticz in 1 minute, maximum of 2 minutes.

I don't know how to test outside domoticz, so i leave that to you if thats no problem.

When the house should be on away, i will try to check if the app also says away but when that happens i dont know.

FilipDem commented 2 years ago

Ok. I will investigate. Probably next week. Thanks Filip

Op vr 21 jan. 2022 17:11 schreef rolfie23 @.***>:

Hello,

When Nest sees no phone it's when Google Home and the Nest app has switched in the activity log. See log in Google Home: [image: Google Home] https://user-images.githubusercontent.com/61058985/150557471-c2f4a7ab-782c-4b27-91ed-5860121f0666.png And see log in the Nest app: [image: Nest app] https://user-images.githubusercontent.com/61058985/150557477-db5d36d0-8930-40da-b009-55f586704364.png . (Afwezig is away, Thuis is Home).

If I switch away manualy in the nest app, Domoticz still says i'm home after a fews intervals. If I put on Eco for example in the app the next interval it changes in domoticz.

If I switch away from domoticz it's instantly changes in the app. The same for Eco.

With the interval of the plugin I means if i have set it to 1 minute and away is on i expect it to be arrived on domoticz in 1 minute, maximum of 2 minutes.

I don't know how to test outside domoticz, so i leave that to you if thats no problem.

When the house should be on away, i will try to check if the app also says away but when that happens i dont know.

— Reply to this email directly, view it on GitHub https://github.com/FilipDem/Domoticz-NEST-plugin/issues/34#issuecomment-1018651027, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3SGC6F2WXD4P5HIOA2NN3UXGAU7ANCNFSM5MPRL4UQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

rolfie23 commented 2 years ago

Thanks! Found a other timelime of the thermostat. There it says eco temperatures adjusted at 15:39. And eco off at 17:09. I think the logic of Nest changed, first it was away after about 30 minutes away and than the eco modus switched on also. Now it first goes to away, and after some time to eco. Maybe there is the problem and you are looking to eco instead of away for example?

FilipDem commented 2 years ago

This makes me thinking... In the beginning there was an away status in the thermostat. But when you have several devices, there is a generic away... Eg when one had only some Nest protects, the away works also but those device have no individual away status.... I will check if there are thus no 2 "away"s. One at the Nest thermostat and one generic for all the devices... But then I would not know which one is used really by the intelligence of Nest. Need to investigate...

Op vr 21 jan. 2022 17:19 schreef rolfie23 @.***>:

Thanks! Found a other timelime of the thermostat. There it says eco temperatures adjusted at 15:39. And eco off at 17:09. I think the logic of Nest changed, first it was away after about 30 minutes away and than the eco modus switched on also. Now it first goes to away, and after some time to eco. Maybe there is the problem and you are looking to eco instead of away for example?

— Reply to this email directly, view it on GitHub https://github.com/FilipDem/Domoticz-NEST-plugin/issues/34#issuecomment-1018656869, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3SGCZM7E5BP6KO4JBOCDDUXGBPVANCNFSM5MPRL4UQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

rolfie23 commented 2 years ago

Great! Sounds logic! Just had it with playing and testing. App was on home, but Domoticz stayed at away. For 10 minutes, after that switched at Domoticz and they where synchronizet again.

Hope to hear from you!

FilipDem commented 2 years ago

A small status:

rolfie23 commented 2 years ago
FilipDem commented 2 years ago

After some hours of research how it behaves, the only solution is to make a dedicated switch that shows the Thermostat Away status. So now there are two Away devices: one showing the decision of Google Nest (taking into account all the devices) and one specific for the Thermostats (showing the status of the linked Thermostat). The Thermostat Away device is by default set as "not used". So you need to activate it with Setup - Devices. Now you can use the device you want for your logic. It returns exactly the status as returned by the nest API. I noticed that there could still be a difference between the status on the mobile app and Domoticz, especially when the Thermostat Away status is set as 'away'... However Domoticz shows the status as it returns and is correct.

Btw: the version published now creates the additional Away device. There is another modification that creates also some weather devices (Temp/Hum and Wind) for the outside weather conditions in the city you have defined in Nest.

rolfie23 commented 2 years ago

After some hours of research how it behaves, the only solution is to make a dedicated switch that shows the Thermostat Away status. So now there are two Away devices: one showing the decision of Google Nest (taking into account all the devices) and one specific for the Thermostats (showing the status of the linked Thermostat). The Thermostat Away device is by default set as "not used". So you need to activate it with Setup - Devices. Now you can use the device you want for your logic. It returns exactly the status as returned by the nest API. I noticed that there could still be a difference between the status on the mobile app and Domoticz, especially when the Thermostat Away status is set as 'away'... However Domoticz shows the status as it returns and is correct.

Btw: the version published now creates the additional Away device. There is another modification that creates also some weather devices (Temp/Hum and Wind) for the outside weather conditions in the city you have defined in Nest.

Sorry for late reply. There are building activities in my home, when I have time I will look at it! Maybe combine the version and make it in hardware page to decide what you want.

rolfie23 commented 8 months ago

Just a late reply, but this problem I solved last week! 2 times contact with Google about this but no solutions, only resets. Last month it was going back to home when there was nothing home. The nest app did only show activities in home.

Looking further in the home app I found that there is an hub wich also detect presence and was active. The home away function was not active in the home app (because i use nest) but the hub was not showed in the nest app. Deactivated it in the home app and when leaving around 1KM the house goes on away! 🎊