joba-1 / Tasmoticz

Domoticz MQTT autodiscovery plugin for Tasmota devices
MIT License
25 stars 18 forks source link

'onMessage' failed 'TypeError':'float() argument must be a string or a number, not 'NoneType''. #14

Open xbeaudouin opened 4 years ago

xbeaudouin commented 4 years ago

Hi there,

Just upgraded my domoticz to 2020.2.12039 and have some strange errors... Have you got an idea about the reason ? Regards

2020-05-12 11:25:09.098 Error: (Tasmota-Auto) 'onMessage' failed 'TypeError':'float() argument must be a string or a number, not 'NoneType''.
2020-05-12 11:25:09.098 Error: (Tasmota-Auto) ----> Line 183 in '/usr/local/domoticz/plugins/Tasmoticz/plugin.py', function onMessage
2020-05-12 11:25:09.098 Error: (Tasmota-Auto) ----> Line 127 in '/usr/local/domoticz/plugins/Tasmoticz/plugin.py', function onMessage
2020-05-12 11:25:09.098 Error: (Tasmota-Auto) ----> Line 186 in '/usr/local/domoticz/plugins/Tasmoticz/mqtt.py', function onMessage
2020-05-12 11:25:09.098 Error: (Tasmota-Auto) ----> Line 157 in '/usr/local/domoticz/plugins/Tasmoticz/plugin.py', function onMQTTPublish
2020-05-12 11:25:09.098 Error: (Tasmota-Auto) ----> Line 145 in '/usr/local/domoticz/plugins/Tasmoticz/tasmota.py', function onMQTTPublish
2020-05-12 11:25:09.098 Error: (Tasmota-Auto) ----> Line 432 in '/usr/local/domoticz/plugins/Tasmoticz/tasmota.py', function updateSensorDevices
2020-05-12 11:25:09.098 Error: (Tasmota-Auto) ----> Line 384 in '/usr/local/domoticz/plugins/Tasmoticz/tasmota.py', function updateValue
2020-05-12 11:25:09.098 Error: (Tasmota-Auto) ----> Line 371 in '/usr/local/domoticz/plugins/Tasmoticz/tasmota.py', function t2d
2020-05-12 11:50:09.133 Error: (Tasmota-Auto) 'onMessage' failed 'TypeError':'float() argument must be a string or a number, not 'NoneType''.
2020-05-12 11:50:09.133 Error: (Tasmota-Auto) ----> Line 183 in '/usr/local/domoticz/plugins/Tasmoticz/plugin.py', function onMessage
2020-05-12 11:50:09.133 Error: (Tasmota-Auto) ----> Line 127 in '/usr/local/domoticz/plugins/Tasmoticz/plugin.py', function onMessage
2020-05-12 11:50:09.133 Error: (Tasmota-Auto) ----> Line 186 in '/usr/local/domoticz/plugins/Tasmoticz/mqtt.py', function onMessage
2020-05-12 11:50:09.133 Error: (Tasmota-Auto) ----> Line 157 in '/usr/local/domoticz/plugins/Tasmoticz/plugin.py', function onMQTTPublish
2020-05-12 11:50:09.133 Error: (Tasmota-Auto) ----> Line 145 in '/usr/local/domoticz/plugins/Tasmoticz/tasmota.py', function onMQTTPublish
2020-05-12 11:50:09.133 Error: (Tasmota-Auto) ----> Line 432 in '/usr/local/domoticz/plugins/Tasmoticz/tasmota.py', function updateSensorDevices
2020-05-12 11:50:09.133 Error: (Tasmota-Auto) ----> Line 384 in '/usr/local/domoticz/plugins/Tasmoticz/tasmota.py', function updateValue
2020-05-12 11:50:09.133 Error: (Tasmota-Auto) ----> Line 371 in '/usr/local/domoticz/plugins/Tasmoticz/tasmota.py', function t2d 
joba-1 commented 4 years ago

looks like domoticz has changed the api for python plugins? I'll check the docs...

smitec11 commented 2 years ago

any update on this issue? the domoticz log is getting full from this error :-(

joba-1 commented 2 years ago

sorry that it took so long - I couldn't reproduce the messages on my system. For now the plugin ignores undefined values (null) of sensors which should silence your logs. The error messages don't make much sense to me. It would help me understanding the problem if you could send me the mqtt topic and payload that cause this. Since I can't test, please report if the error messages are gone now