stas-demydiuk / domoticz-zigbee2mqtt-plugin

zigbee2mqtt plugin for domoticz
MIT License
136 stars 98 forks source link

Konke sensor temp connected but i don't get update of temp and humidity in domoticz #168

Closed gotton closed 5 years ago

gotton commented 5 years ago

Issue description Hello, I'm using Zigbee2mqtt with domoticz and the plugin. i recently add the konke sensor with automatic discovery. I get a first temp (32,5°C) and humidity (53%) but since that first connection, no update.

I'm getting those error in the log

2019-10-13 12:57:28.903 Error: (Zigbee2mqtt) 'onMessage' failed 'TypeError':'unsupported operand type(s) for /: 'NoneType' and 'int''. 2019-10-13 12:57:28.903 Error: (Zigbee2mqtt) ----> Line 193 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage 2019-10-13 12:57:28.903 Error: (Zigbee2mqtt) ----> Line 106 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage 2019-10-13 12:57:28.903 Error: (Zigbee2mqtt) ----> Line 167 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py', function onMessage 2019-10-13 12:57:28.903 Error: (Zigbee2mqtt) ----> Line 166 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMQTTPublish 2019-10-13 12:57:28.903 Error: (Zigbee2mqtt) ----> Line 18 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/base_adapter.py', function handleMqttMessage 2019-10-13 12:57:28.903 Error: (Zigbee2mqtt) ----> Line 15 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/konke/sensor_temp_hum.py', function convert_message 2019-10-13 12:57:28.903 Error: (Zigbee2mqtt) ----> Line 14 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/adapter_with_battery.py', function convert_message

Those exact error repeat themselves every 3 or 2 minutes. seems to be a problem with the function convert_message.

Is anybody having the same issue ?

I'm getting this error too when i ask for status in zigbee2mqtt.service :

zigbee2mqtt:warn 10/13/2019, 1:11:28 PM Failed to configure 0x086bd7fffee977fe (0x086bd7fffee977fe) ('Error: Timed out after 10000 ms') (attempt #3)

Additional information Zigbee2MQTT version: I dont know how to get the zigbeemqtt version but i installed it one week ago. Python version: 3.4.4 (default, Aug 20 2019, 08:42:52) [GCC 8.3.0] Domoticz version: Version: 4.10717 Plugin version:

Thanks in advance.

stas-demydiuk commented 5 years ago

Could you please provide MQTT message which cause this error in plugin

gotton commented 5 years ago

Hi.

All I got before is :

2019-10-26 22:43:58.984 (Zigbee) 30 76 00 1e 7a 69 67 62 65 65 32 6d 71 74 74 2f 30 78 30 38 0v..zigbee2mqtt/0x08 2019-10-26 22:43:58.984 (Zigbee) 36 62 64 37 66 66 66 65 39 31 35 39 65 64 7b 22 62 61 74 74 6bd7fffe9159ed{"batt 2019-10-26 22:43:58.985 (Zigbee) 65 72 79 22 3a 22 4e 61 4e 22 2c 22 76 6f 6c 74 61 67 65 22 ery":"NaN","voltage" 2019-10-26 22:43:58.985 (Zigbee) 3a 6e 75 6c 6c 2c 22 6c 69 6e 6b 71 75 61 6c 69 74 79 22 3a :null,"linkquality": 2019-10-26 22:43:58.985 (Zigbee) 33 39 2c 22 74 65 6d 70 65 72 61 74 75 72 65 22 3a 32 33 2e 39,"temperature":23. 2019-10-26 22:43:58.985 (Zigbee) 31 38 2c 22 68 75 6d 69 64 69 74 79 22 3a 35 37 2e 32 38 7d 18,"humidity":57.28} 2019-10-26 22:43:58.985 (Zigbee) MQTT message: zigbee2mqtt/0x086bd7fffe9159ed {'battery': 'NaN', 'voltage': None, 'linkquality': 39, 'temperature': 23.18, 'humidity': 57.28}

So it's seems to me that the sensor is recognize by Zigbee2mqtt and that it get all info. Domoticz plugin doesn't succeed to translate it. I fully reinstalled everything and still this issue

2019-10-26 22:43:58.986 Error: (Zigbee) 'onMessage' failed 'TypeError':'unsupported operand type(s) for /: 'NoneType' and 'int''. 2019-10-26 22:43:58.986 Error: (Zigbee) ----> Line 193 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py' 2019-10-26 22:43:58.986 Error: (Zigbee) ----> Line 106 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py' 2019-10-26 22:43:58.986 Error: (Zigbee) ----> Line 167 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py' 2019-10-26 22:43:58.986 Error: (Zigbee) ----> Line 166 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py' 2019-10-26 22:43:58.986 Error: (Zigbee) ----> Line 18 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/base_adapter.py' 2019-10-26 22:43:58.986 Error: (Zigbee) ----> Line 15 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/konke/sensor_temp_hum.py' 2019-10-26 22:43:58.986 Error: (Zigbee) ----> Line 14 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/adapter_with_battery.py'

gotton commented 5 years ago

Ok. I don't know how and I don't know why but it's now working. I don't get those error anymore and I get all temp and humidity.

So I guess I can close. For the others : I use python 3.7 Dev it didn't worked at first but after maybe 3 or 4 days it finally worked on is own.

Thanks