FilipDem / Domoticz-NEST-plugin

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

Devices colored red in titlebar #28

Closed ridderr closed 3 years ago

ridderr commented 3 years ago

Since a few days all Nest devices are constantly colored red (indicating they are not updated). I cannot find the cause, I thought it was due to expired parameters. But, updating these did not solve the issue. The only thing I noticed is "2021-05-11 22:13:20.367 Error: Nest: (Nest) API returned error: No active session found." But after that the system seems to run without errors.

2021-05-11 22:13:11.193  Nest: (Nest) > Update unit 1: Verwarming Woonkamer - 0 - 0
2021-05-11 22:13:11.205  Nest: (Nest) > Update unit 2: Nest - Family Room Away - 0 - 0
2021-05-11 22:13:11.206  (Nest - Family Room Away) Updating device from 0:'0' to have values 0:'0'.
2021-05-11 22:13:11.214  Nest: (Nest) > Update unit 3: Nest - Family Room Eco Mode - 0 - 0
2021-05-11 22:13:11.214  (Nest - Family Room Eco Mode) Updating device from 0:'0' to have values 0:'0'.
2021-05-11 22:13:11.221  Nest: (Nest) > Update unit 4: Nest: Temp/Hum - 19 - 19.7;49;0
2021-05-11 22:13:11.221  (Nest: Temp/Hum) Updating device from 19:'19.7;49;0' to have values 19:'19.7;49;0'.
2021-05-11 22:13:11.230  Nest: (Nest) > Update unit 5: Nest: Ingestelde temperatuur - 17 - 17.0
2021-05-11 22:13:11.230  (Nest: Ingestelde temperatuur) Updating device from 17:'17.0' to have values 17:'17.0'.
2021-05-11 22:13:11.240  Nest: (Nest) > Plugin started
2021-05-11 22:13:20.009  Nest: (Nest) Pushing 'onHeartbeatCallback' on to queue
2021-05-11 22:13:20.060  (Nest) Processing 'onHeartbeatCallback' message
2021-05-11 22:13:20.060  Nest: (Nest) Calling message handler 'onHeartbeat'.
2021-05-11 22:13:20.062  Nest: (Nest) > Entering update thread
2021-05-11 22:13:20.063  Nest: (Nest) Wait 60.0 seconds to update devices
2021-05-11 22:13:20.367  Error: Nest: (Nest) API returned error: No active session found.
2021-05-11 22:13:20.371  Nest: (Nest) > Exit update thread
2021-05-11 22:13:30.034  Nest: (Nest) Pushing 'onHeartbeatCallback' on to queue
2021-05-11 22:13:30.085  (Nest) Processing 'onHeartbeatCallback' message
2021-05-11 22:13:30.085  Nest: (Nest) Calling message handler 'onHeartbeat'.
2021-05-11 22:13:30.086  Nest: (Nest) Wait 50.0 seconds to update devices
2021-05-11 22:13:40.006  Nest: (Nest) Pushing 'onHeartbeatCallback' on to queue
2021-05-11 22:13:40.056  (Nest) Processing 'onHeartbeatCallback' message
2021-05-11 22:13:40.056  Nest: (Nest) Calling message handler 'onHeartbeat'.
2021-05-11 22:13:40.057  Nest: (Nest) Wait 40.0 seconds to update devices
2021-05-11 22:13:50.031  Nest: (Nest) Pushing 'onHeartbeatCallback' on to queue
2021-05-11 22:13:50.081  (Nest) Processing 'onHeartbeatCallback' message
FilipDem commented 3 years ago

This error means really that "USER_LOGGED_OUT" is returned from the server. I assume you got it only once... But what is worrying: normally if the devices are updated, the red bar should disappear (red means that the devices was not updated due to an error). Typically it is the same by a restart... When starting up the plugin (or Domoticz), the devices are set to "red" and upon the first update they are

Be aware that from the log, I don't see any proof of update of the devices anymore after the error... Could you restart the plugin and give me the complete log? Possibly I will need to give you a version with more traces... However if the server returns the "USER_LOGGED_OUT", I have no other idea so far as the credentials... Or it has again something to do with the expiry date of the credentials...

ridderr commented 3 years ago

Hi Filip, I have tried to set the parameters again but still have the same error. Please find attached the log. I have removed some data from it because I don't know if this is sensitive data. Please let me know how I can help.

nest.log

FilipDem commented 3 years ago

Before I start digging further into the code, you should check your Cookie. I find the trailing characters from ":expires=..." strange. I have never seen this and I have this not in mine. It could perhaps be a copy/paste problem and would prefer you check first. To give a bit more info, I pasted also mine with an indication how many digits I deleted so you could compare better (sorry perhaps I miscounted some characters, but it is a good indication).

YOURS: __Secure-3PSIDCC=AJi4QfGU <> jnX2IKPkEwE4BRunWR4dytcjm3SJqAYDw6jxLKzw4997Gj8-deJLS; expires=Tue, 10-May-2022 05:41:50 GMT; path=/; domain=.google.com; Secure; HttpOnly; priority=high; SameSite=none

MINE: Secure-3PSID=1g<<66 char deleted>>6g.; Secure-3P<<39 char deleted>>14; NID=204=zS<<180 char deleted>>0k; Host-3PLSID=s.B<<80 char deleted>>Fw.; Secure-3PSIDCC=AJ<<70 char deleted>>sw

ridderr commented 3 years ago

Hi Filip, I don't understand why this suddenly happend but trying to solve it made it worse. I now have tried again to get the right Cookie value from the message and YES it's working again.

FilipDem commented 3 years ago

OK, thanks for the information