kinou74 / Domoticz-Palazzetti

Domoticz Python Plugin for Palazzetti Connection Box
GNU General Public License v3.0
8 stars 3 forks source link

Pull requests is better but with error on log when Stove is in operation #12

Open Samquad opened 1 year ago

Samquad commented 1 year ago

Hello, @kinou74 and @mce35 thank you for your Pull requests.

I installed updated package PR. https://github.com/mce35/Domoticz-Palazzetti.git it works better. I just have errors in the logs when the Pellet Stove is in operation. 2022-12-28 11:19:47.082 Error: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1672222787}, 'SUCCESS': False, 'DATA': {'NODATA': True}} 2022-12-28 11:21:47.032 Error: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1672222907}, 'SUCCESS': False, 'DATA': {'NODATA': True}} 2022-12-28 11:22:42.329 Error: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1672222962}, 'SUCCESS': False, 'DATA': {'NODATA': True}} 2022-12-28 11:23:47.042 Error: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1672223027}, 'SUCCESS': False, 'DATA': {'NODATA': True}} 2022-12-28 11:24:47.046 Error: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1672223087}, 'SUCCESS': False, 'DATA': {'NODATA': True}} 2022-12-28 11:25:43.094 Error: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1672223143}, 'SUCCESS': False, 'DATA': {'NODATA': True}} 2022-12-28 11:26:47.058 Error: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1672223207}, 'SUCCESS': False, 'DATA': {'NODATA': True}}

Can you help me? Thank you

mce35 commented 1 year ago

Hello,

I have the same logs at home, it is due to the fix line 397, previously it was using a variable that doesn't exist (Status) so the log was not displayed at all (if I remember correctly it was displaying a Python exception which was not handled), the change displays the response from the ConnectionBox in case it is not the expected "'RSP': 'OK'" response (so it means that the plugin was able to correctly communicate with the ConnectionBox but the box was not able to communicate properly with the stove). It seems to happen more often when the stove is in operation but can also happen when it is idle. You may also get some other responses (COMM_ERROR in my case): Dec 27 14:48:50 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653960847}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 14:49:50 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653960907}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 14:50:50 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653960967}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 14:57:45 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'COMM_ERROR', 'CMD': 'GET ALLS', 'TS': 1653961381}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 14:58:50 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653961447}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 15:10:50 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653962167}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 15:21:50 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653962827}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 15:26:50 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653963127}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 15:32:50 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653963487}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 15:46:39 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'COMM_ERROR', 'CMD': 'GET ALLS', 'TS': 1653964316}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 15:56:51 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653964928}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 16:02:51 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653965288}, 'SUCCESS': False, 'DATA': {'NODATA': True}} Dec 27 16:03:51 rasp3 domoticz: Palazzetti: Error in Connection Box response: {'INFO': {'RSP': 'TIMEOUT', 'CMD': 'GET ALLS', 'TS': 1653965348}, 'SUCCESS': False, 'DATA': {'NODATA': True}}

I don't have the API specs so I don't know exactly what these errors means. The plugin is trying to update the status every minute, in my case it can happen that 4 times in a row it is failing but it eventually succeed to get a valid response so domoticz devices get updated. From your logs it looks like it happened at least 6 times in a row, did it eventually get a successful response?

Please note that this change is related only to the logs, it does not change the behavior of the plugin so it should work as before.

Edit: I have just seen the other issue you reported (#11), the exception you had in the logs have been replaced by the logs you have know.

Samquad commented 1 year ago

@mce35 My new logs with your pull requests seems less critical, and domoticz devices get updated. I disabled log level error on the option of the plugin. timeout errors still exist but they no longer appear in the logs. thank you for your answer.