FilipDem / Domoticz-NEST-plugin

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

Errors on startup/action/shutdown #23

Closed rolfie23 closed 3 years ago

rolfie23 commented 3 years ago

Tried the modified plugin, but unafortanly I get an lot of errors.

On start up: 2021-03-25 21:27:36.078 Error: (Nest) 'onStart' failed 'TypeError':'argument of type 'NoneType' is not iterable'. 2021-03-25 21:27:36.078 Error: (Nest) ----> Line 420 in '/home/pi/domoticz/plugins/NestGoogle/plugin.py', function onStart 2021-03-25 21:27:36.078 Error: (Nest) ----> Line 168 in '/home/pi/domoticz/plugins/NestGoogle/plugin.py', function onStart

At an action: 2021-03-25 21:32:43.313 Error: (Nest) 'onCommand' failed 'NameError'. 2021-03-25 21:32:43.314 Error: (Nest) ----> Line 436 in '/home/pi/domoticz/plugins/NestGoogle/plugin.py', function onCommand 2021-03-25 21:32:43.314 Error: (Nest) ----> Line 262 in '/home/pi/domoticz/plugins/NestGoogle/plugin.py', function onCommand

At shutting down plugin 2021-03-25 21:57:22.768 Error: (Nest) 'onStop' failed 'AttributeError':''BasePlugin' object has no attribute 'myNest''. 2021-03-25 21:57:22.768 Error: (Nest) ----> Line 424 in '/home/pi/domoticz/plugins/NestGoogle/plugin.py', function onStop 2021-03-25 21:57:22.768 Error: (Nest) ----> Line 193 in '/home/pi/domoticz/plugins/NestGoogle/plugin.py', function onStop

Went back to the 1.0.0 version, and works flawless. What is going on?

FilipDem commented 3 years ago

Hi Rolfie, Sorry for this... I did some changes that were so obvious that they are not decently tested... Problem should be solved and tested on my system. If the GooglNest.json file would have been copied also, you wouldn't have received this error... All subsequent errors (at action and on shutting down plugin) are the result of the error at startup... About the JSON file... I got a request to have the Nest temperature in Domoticz aligned with the Nest app. In the Nest app, the degrees are rounded to a 0.5 degree. Because I found this rather a technical customisation, I made the JSON to activate this behaviour. Now, when the file is not available, there is no error anymore and all will behave as before. This version contains a different management of the next Protect devices. There is now even a Away device when only having Nest Protect. This was not the case before... Therefore, read also the paragraph "Migration" in the readme (if you don't do this change a second Away-device will be created). Hope it helps and sorry again... Filip

rolfie23 commented 3 years ago

I did copy the JSON file, already saw it was necessary!

Will try again when I have some time.

1 question left, in the old version I can remove the location description (you made an table in your plugin) with that there was only Nest - Heating as switch for example. I hate long names, don't want Living Room in it for example. How can I do this now?

For your info, there is nothing now in de description of the switches.

FilipDem commented 3 years ago

Naming did not change... You can simply keep on using the same names... Even the same devices are kept, except for the Away device. If you don't change as indicated in the readme, a new one will be created (and the old one kept, but no longer updated). If you change the description of the Away device before the update of plugin (as mentioned in the readme), this device will be kept on using. So shortly, there should be no difference as before.

rolfie23 commented 3 years ago

Okay, so only need to add discription now to away switch (none of the switches now has an discription) and update plugin and it should work?

FilipDem commented 3 years ago

Normally the descriptions are created automatically... So if you don't have the description, nothing should be done... This means probably that it is not updated since while... Some months ago the extension is done to change have the possibility to change the name of the devices. Don't change the tags that are automatically created (except for the Away device if you have the old tag in the description)! After the update, you should be able to change the name of the devices in the usual way...

rolfie23 commented 3 years ago

Great! Yeah, was working perfectly so no need to update.

Will try when I have some time!

rolfie23 commented 3 years ago

It's working now, only found one thing wich wasn't in the old plugin. If the setpoint of the nest was adjusted, the popup went with it. Now it shows still the old value, you must refresh the page before it says the right temp.thermostaat

FilipDem commented 3 years ago

This has not changed and is not new neither... And is a "problem" of the browser indeed. This is something I cannot change (already looked for it in the past). Filip