FilipDem / Domoticz-NEST-plugin

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

WebServer:8080 thread seems to have ended unexpectedly #1

Closed TheLion closed 4 years ago

TheLion commented 4 years ago

Hi,

The plugin works fine at first. But after a while my Domoticz logs shows:

WebServer:8080 thread seems to have ended unexpectedly

This repeats a couple of times and the system is then restarted my Monit, cause the webinterface doesn't respond any more.

It seems to happen after the debug log of the plugin shows:

2020-01-09 00:23:08.845 (Nest Google) Pushing 'onHeartbeatCallback' on to queue
2020-01-09 00:23:08.846 (Nest Google) Processing 'onHeartbeatCallback' message
2020-01-09 00:23:08.847 (Nest Google) Calling message handler 'onHeartbeat'.
2020-01-09 00:23:08.847 (Nest Google) onHeartbeat called
2020-01-09 00:23:08.849 (Nest Google) Start thread
2020-01-09 00:23:08.849 (Nest Google) Thread: GetNestCredentials done

When I disable the hardware, the issue doesn't occur.

Any ideas why the plugin causes this issue?

TheLion commented 4 years ago

Just some extra information. Domoticz keeps running, because when I view the logfile, messages are still being written, but the webserver seems to be not responding anymore.

FilipDem commented 4 years ago

I also use Monit and don't have this problem. I don't see any reason for this problem neither. I know that other people installed also the plugin (see Domoticz Forum), however this problem was not mentioned.

BUT: I am using a threading system and have the impression that Domoticz don't behave as expected with threading (see my topic https://www.domoticz.com/forum/viewtopic.php?f=6&t=30359. However I don't have feedback yet... But this means that every time when you change the hardware settings (eg during first installation to add your connection data), the only workaround is to restart Domoticz. I restart completely my Raspberry. This is also mentioned on the Domoticz forum, but will add it here in the read-me.

TheLion commented 4 years ago

I also saw that thread and I didn't saw any mention of such an issue.

It isn't a Monit problem. Monit only detects that the webgui doesn't respond anymore (not only monit, I also notice that of course) and as a result, restart DOmoticz or completely reboots the RPi.

Even when I completely restart the RPi, and don't change anything in the settings, it still happens when the heartbeat reaches 0.

Does the plugin comminicatie with Domoticz thiugh the web-interface, or through another interface?

FilipDem commented 4 years ago

No, the plugin does not communicate through the web-interface. An advice: don't put the interval time in the hardware settings of the plugin lower than 1 minute.

TheLion commented 4 years ago

I never considered to lower the time interval. Kept it at default.

I it possible the plugin floods Domoticz with (log) requests, causing it to stall?

FilipDem commented 4 years ago

As you can see in the code, there is almost no logging in normal circumstances... In Debug mode (to be activated in the settings), there is more, but even this is working fine in my case. I never had troubles with too much information in the logs. I am also running on RPI. I would advise you to put extra traces in the code to be able to identify the problem (this is why I have put the code on Github so that we together can have a solution working in the different cases). I am not able to debug all the cases, seen it depends the environment (and sometimes even the version of the NEST devices). I know the plugin works for other users... And I also know that some users have problems (but not yet heard of this one). My only request: if you find the problem or improvements, please let them push on Github to make them available to other people.

TheLion commented 4 years ago

I'm not that good with Python, but I'll try.

TheLion commented 4 years ago

I replaced my Nest with a Shelly 1 smart switch to turn heating on/off, cause I basically used the Nest as a switch.