Closed jjouifi closed 4 years ago
Thanks for reporting. No way I can check into this for now as deep into my day job. Can you submit a PR for adding error checks on this instance ?
Hello,
No idea what you mean. Do you have some documentation on the procedure ?
If you look at the code, you don't think there's something funny with checking a variable and not using it? If you think this is relevant, I can change:
elif self.outtemp is not None and self.Internals['LastSetPoint'] > self.Internals['LastOutT']:
to
elif self.Internals['LastOutT'] is not None and self.Internals['LastSetPoint'] > self.Internals['LastOutT']:
and test myself.
Cheers,
Ok. I did find time to look into this. The line should actually be changed to:
elif (self.outtemp is not None and self.Internals['LastOutT'] is not None) and self.Internals['LastSetPoint'] > self.Internals['LastOutT']:
Can you please try out and let me know if this works ? If so, I’ll incorporate in the next version (coming soon, with some other minor changes)
Sure. Will try that across a few days an let you know. Thanks.
All good, I got no more crashes, and the plugin still does the job. Thanks,
Hello,
I'm experiencing crashes with the latest code. Here are the details:
I did configure an outside temperature sensor, but the batteries are low and the sensor stops transmitting regularly.
The plugin crashes in the AutoCallib routine, with log 'TypeError':''>' not supported between instances of 'float' and 'NoneType''
Is it possible that the variable self.Internals['LastOutT'] is None because the outside temperature sensor is down?
The variable self.outtemp is tested as not None but not used within the elif, is it intentional?
Thanks, and congratulation for the great piece of code. The log extract below. jj
2020-01-07 10:05:10.117 Error: (SVT_Antoine) 'onHeartbeat' failed 'TypeError':''>' not supported between instances of 'float' and 'NoneType''. 2020-01-07 10:05:10.118 Error: (SVT_Antoine) ----> Line 687 in '/home/domoticz/www/plugins/SVT/plugin.py', function onHeartbeat 2020-01-07 10:05:10.118 Error: (SVT_Antoine) ----> Line 370 in '/home/domoticz/www/plugins/SVT/plugin.py', function onHeartbeat 2020-01-07 10:05:10.119 Error: (SVT_Antoine) ----> Line 398 in '/home/domoticz/www/plugins/SVT/plugin.py', function AutoMode 2020-01-07 10:05:10.119 Error: (SVT_Antoine) ----> Line 463 in '/home/domoticz/www/plugins/SVT/plugin.py', function AutoCallib