mak-gitdev / HA_enoceanmqtt

Home Assistant wrapper for enocean-mqtt (https://github.com/embyt/enocean-mqtt)
GNU General Public License v3.0
54 stars 14 forks source link

EnoceanMQTT successfully vonnects to MQTT broker, bit broker doesn't receive any messages #56

Closed Ewoodster closed 1 year ago

Ewoodster commented 1 year ago

Hi,

since my old config broke, I had to reinstall Node-Red, Mosquitto MQTT and also EnoceanMQTT. Node-Red and Mosquitto work, but they don't find any devices or receive messages from EnoceanMQTT, despite the log saying connection to broker successful.

Can this error message during start of the add-on may have to do something with the issue?

2023-03-03 08:27:39,034 ERROR: Caught exception in on_connect: 'date' Exception in thread Thread-1 (_thread_main): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 3039, in _packet_handle return self._handle_connack() File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 3138, in _handle_connack on_connect( File "/app/enocean-mqtt/enoceanmqtt/overlays/homeassistant/ha_communicator.py", line 107, in _on_connect self._mqtt_discovery_sensor(cur_sensor, cfgtopics) File "/app/enocean-mqtt/enoceanmqtt/overlays/homeassistant/ha_communicator.py", line 236, in _mqtt_discovery_sensor device_map += copy.deepcopy(self._ha_mapping['common']['date']) KeyError: 'date'

Ewoodster commented 1 year ago

Full log here: 2023-03-03 08:27:39,000 DEBUG: Sending SUBSCRIBE (d0, m10) [(b'enoceanmqtt/Aktor/Licht/Flur/req/#', 0)] 2023-03-03 08:27:39,000 DEBUG: Sending SUBSCRIBE (d0, m11) [(b'enoceanmqtt/Aktor/Licht/Treppe/req/#', 0)] 2023-03-03 08:27:39,001 DEBUG: Sending SUBSCRIBE (d0, m12) [(b'enoceanmqtt/Aktor/Licht/G\xc3\xa4stebad/req/#', 0)] 2023-03-03 08:27:39,002 DEBUG: Sending SUBSCRIBE (d0, m13) [(b'enoceanmqtt/Aktor/Licht/Julian/req/#', 0)] 2023-03-03 08:27:39,003 DEBUG: Sending SUBSCRIBE (d0, m14) [(b'enoceanmqtt/Aktor/Rolladen/Julian links/req/#', 0)] 2023-03-03 08:27:39,004 DEBUG: Sending SUBSCRIBE (d0, m15) [(b'enoceanmqtt/Aktor/Rolladen/Julian rechts/req/#', 0)] 2023-03-03 08:27:39,004 DEBUG: Sending SUBSCRIBE (d0, m16) [(b'enoceanmqtt/Aktor/Licht/Speisekammer/req/#', 0)] 2023-03-03 08:27:39,005 DEBUG: Sending SUBSCRIBE (d0, m17) [(b'enoceanmqtt/Aktor/Licht/Esszimmer/req/#', 0)] 2023-03-03 08:27:39,006 DEBUG: Sending SUBSCRIBE (d0, m18) [(b'enoceanmqtt/Aktor/Licht/Wohnzimmer/req/#', 0)] 2023-03-03 08:27:39,007 DEBUG: Sending SUBSCRIBE (d0, m19) [(b'enoceanmqtt/Aktor/Licht/K\xc3\xbcche/req/#', 0)] 2023-03-03 08:27:39,008 DEBUG: Sending SUBSCRIBE (d0, m20) [(b'enoceanmqtt/Aktor/Licht/K\xc3\xbcchentheke/req/#', 0)] 2023-03-03 08:27:39,008 DEBUG: Sending SUBSCRIBE (d0, m21) [(b'enoceanmqtt/Aktor/Licht/Haust\xc3\xbcr/req/#', 0)] 2023-03-03 08:27:39,009 DEBUG: Sending SUBSCRIBE (d0, m22) [(b'enoceanmqtt/Aktor/Markise/req/#', 0)] 2023-03-03 08:27:39,009 DEBUG: Sending SUBSCRIBE (d0, m23) [(b'enoceanmqtt/Aktor/Raffstore/K\xc3\xbcche/req/#', 0)] 2023-03-03 08:27:39,010 DEBUG: Sending SUBSCRIBE (d0, m24) [(b'enoceanmqtt/Aktor/Raffstore/Terasse/req/#', 0)] 2023-03-03 08:27:39,011 DEBUG: Sending SUBSCRIBE (d0, m25) [(b'enoceanmqtt/Aktor/Raffstore/Wohnzimmer links/req/#', 0)] 2023-03-03 08:27:39,011 DEBUG: Sending SUBSCRIBE (d0, m26) [(b'enoceanmqtt/Aktor/Raffstore/Wohnzimmer rechts/req/#', 0)] 2023-03-03 08:27:39,012 DEBUG: Sending SUBSCRIBE (d0, m27) [(b'enoceanmqtt/Aktor/Rolladen/Badezimmer rechts/req/#', 0)] 2023-03-03 08:27:39,012 DEBUG: Sending SUBSCRIBE (d0, m28) [(b'enoceanmqtt/Aktor/Rolladen/Badezimmer links/req/#', 0)] 2023-03-03 08:27:39,013 DEBUG: Sending SUBSCRIBE (d0, m29) [(b'enoceanmqtt/Aktor/Rolladen/Lukas links/req/#', 0)] 2023-03-03 08:27:39,014 DEBUG: Sending SUBSCRIBE (d0, m30) [(b'enoceanmqtt/Aktor/Rolladen/Lukas rechts/req/#', 0)] 2023-03-03 08:27:39,014 DEBUG: Sending SUBSCRIBE (d0, m31) [(b'enoceanmqtt/Aktor/Rolladen/Lucia links/req/#', 0)] 2023-03-03 08:27:39,015 DEBUG: Sending SUBSCRIBE (d0, m32) [(b'enoceanmqtt/Aktor/Rolladen/Lucia rechts/req/#', 0)] 2023-03-03 08:27:39,015 DEBUG: Sending SUBSCRIBE (d0, m33) [(b'enoceanmqtt/Aktor/Rolladen/Schlafzimmer links/req/#', 0)] 2023-03-03 08:27:39,016 DEBUG: Sending SUBSCRIBE (d0, m34) [(b'enoceanmqtt/Aktor/Rolladen/Schlafzimmer rechts/req/#', 0)] 2023-03-03 08:27:39,016 DEBUG: Sending SUBSCRIBE (d0, m35) [(b'enoceanmqtt/Aktor/Rolladen/G\xc3\xa4stebad/req/#', 0)] 2023-03-03 08:27:39,017 DEBUG: Sending SUBSCRIBE (d0, m36) [(b'enoceanmqtt/Schalter/Licht/Julian/req/#', 0)] 2023-03-03 08:27:39,018 DEBUG: Sending SUBSCRIBE (d0, m37) [(b'enoceanmqtt/Schalter/Licht/Flur/req/#', 0)] 2023-03-03 08:27:39,018 DEBUG: Sending SUBSCRIBE (d0, m38) [(b'enoceanmqtt/Schalter/Licht/G\xc3\xa4stebad/req/#', 0)] 2023-03-03 08:27:39,019 DEBUG: Sending SUBSCRIBE (d0, m39) [(b'enoceanmqtt/Schalter/Licht/Wohnzimmer links/req/#', 0)] 2023-03-03 08:27:39,019 DEBUG: Sending SUBSCRIBE (d0, m40) [(b'enoceanmqtt/Schalter/Licht/Wohnzimmer rechts/req/#', 0)] 2023-03-03 08:27:39,020 DEBUG: Sending SUBSCRIBE (d0, m41) [(b'enoceanmqtt/Schalter/Licht/K\xc3\xbcche Theke/req/#', 0)] 2023-03-03 08:27:39,021 DEBUG: Sending SUBSCRIBE (d0, m42) [(b'enoceanmqtt/Schalter/Licht/K\xc3\xbcche/req/#', 0)] 2023-03-03 08:27:39,022 DEBUG: Sending SUBSCRIBE (d0, m43) [(b'enoceanmqtt/Schalter/Licht/Speisekammer/req/#', 0)] 2023-03-03 08:27:39,022 DEBUG: Sending SUBSCRIBE (d0, m44) [(b'enoceanmqtt/Schalter/Licht/Terasse/req/#', 0)] 2023-03-03 08:27:39,023 DEBUG: Sending SUBSCRIBE (d0, m45) [(b'enoceanmqtt/Schalter/Licht/Treppe/req/#', 0)] 2023-03-03 08:27:39,024 DEBUG: Sending SUBSCRIBE (d0, m46) [(b'enoceanmqtt/Schalter/Licht/Empore/req/#', 0)] 2023-03-03 08:27:39,025 DEBUG: Sending SUBSCRIBE (d0, m47) [(b'enoceanmqtt/Schalter/Licht/Lucia/req/#', 0)] 2023-03-03 08:27:39,025 DEBUG: Sending SUBSCRIBE (d0, m48) [(b'enoceanmqtt/Schalter/Licht/Lukas/req/#', 0)] 2023-03-03 08:27:39,026 DEBUG: Sending SUBSCRIBE (d0, m49) [(b'enoceanmqtt/Schalter/Licht/Schlafzimmer/req/#', 0)] 2023-03-03 08:27:39,027 DEBUG: Sending SUBSCRIBE (d0, m50) [(b'enoceanmqtt/Schalter/Licht/Ankleide/req/#', 0)] 2023-03-03 08:27:39,028 DEBUG: Sending SUBSCRIBE (d0, m51) [(b'enoceanmqtt/Schalter/Licht/Bad Dusche/req/#', 0)] 2023-03-03 08:27:39,028 DEBUG: Sending SUBSCRIBE (d0, m52) [(b'enoceanmqtt/Schalter/Licht/Bad Spiegelschrank/req/#', 0)] 2023-03-03 08:27:39,029 DEBUG: Sending SUBSCRIBE (d0, m53) [(b'enoceanmqtt/Schalter/Licht/Bad/req/#', 0)] 2023-03-03 08:27:39,030 DEBUG: Sending SUBSCRIBE (d0, m54) [(b'enoceanmqtt/Thermostat/Schlafzimmer/req/#', 0)] 2023-03-03 08:27:39,031 DEBUG: Sending SUBSCRIBE (d0, m55) [(b'enoceanmqtt/T\xc3\xbcrsensor/Terasse/req/#', 0)] 2023-03-03 08:27:39,031 DEBUG: Sending SUBSCRIBE (d0, m56) [(b'enoceanmqtt/Wetterstation/req/#', 0)] 2023-03-03 08:27:39,032 DEBUG: Sending SUBSCRIBE (d0, m57) [(b'enoceanmqtt/Schalter/Rolladen/Julian links/req/#', 0)] 2023-03-03 08:27:39,033 DEBUG: Sending SUBSCRIBE (d0, m58) [(b'enoceanmqtt/Schalter/Rolladen/Julian rechts/req/#', 0)] 2023-03-03 08:27:39,034 WARNING: Device not yet supported: A5-38-08. Only RSSI sensor will be available 2023-03-03 08:27:39,034 ERROR: Caught exception in on_connect: 'date' Exception in thread Thread-1 (_thread_main): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 3039, in _packet_handle return self._handle_connack() File "/usr/lib/python3.10/site-packages/paho_mqtt-1.6.1-py3.10.egg/paho/mqtt/client.py", line 3138, in _handle_connack on_connect( File "/app/enocean-mqtt/enoceanmqtt/overlays/homeassistant/ha_communicator.py", line 107, in _on_connect self._mqtt_discovery_sensor(cur_sensor, cfgtopics) File "/app/enocean-mqtt/enoceanmqtt/overlays/homeassistant/ha_communicator.py", line 236, in _mqtt_discovery_sensor device_map += copy.deepcopy(self._ha_mapping['common']['date']) KeyError: 'date' 2023-03-03 08:27:48,696 DEBUG: 05:8B:17:9B->FF:FF:FF:FF (-82 dBm): 0x01 ['0xa5', '0x0', '0x7d', '0x7b', '0x8', '0x5', '0x8b', '0x17', '0x9b', '0x80'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x52', '0x0'] OrderedDict() 2023-03-03 08:27:48,698 INFO: unknown sensor: 05:8B:17:9B 2023-03-03 08:27:50,088 DEBUG: FF:87:FF:A7->FF:FF:FF:FF (-71 dBm): 0x01 ['0xa5', '0x0', '0x7d', '0x7b', '0xf', '0xff', '0x87', '0xff', '0xa7', '0x30'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x47', '0x0'] OrderedDict() 2023-03-03 08:27:50,090 INFO: unknown sensor: FF:87:FF:A7 2023-03-03 08:28:19,427 DEBUG: 05:88:5A:A7->FF:FF:FF:FF (-42 dBm): 0x01 ['0xa5', '0xff', '0x55', '0x7', '0x18', '0x5', '0x88', '0x5a', '0xa7', '0x0'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x2a', '0x0'] OrderedDict() 2023-03-03 08:28:19,432 DEBUG: enoceanmqtt/Wetterstation: DWS (Dawn sensor)=999.0 lx 2023-03-03 08:28:19,433 DEBUG: enoceanmqtt/Wetterstation: TMP (Outdoor Temp)=0.0 °C 2023-03-03 08:28:19,433 DEBUG: enoceanmqtt/Wetterstation: WND (Wind speed)=1.9215686274509807 m/s 2023-03-03 08:28:19,434 DEBUG: enoceanmqtt/Wetterstation: ID (Identifier)=Identifier 1 2023-03-03 08:28:19,435 DEBUG: enoceanmqtt/Wetterstation: DN (Day / Night)=Day 2023-03-03 08:28:19,435 DEBUG: enoceanmqtt/Wetterstation: RAN (Rain Indication)=No Rain 2023-03-03 08:28:19,436 DEBUG: enoceanmqtt/Wetterstation: Sent MQTT: {"RSSI": -42, "DATE": "2023-03-03T08:28:19.426980",

mak-gitdev commented 1 year ago

Hi @Ewoodster,

It looks like you have a custom mapping file. If so, please leave empty the mapping_file entry in the configuration tab.

To make it clear, I added this to #17:

⚠️ If you have a custom mapping.yaml file, before upgrading to a new version, leave empty the configuration entry mapping_file or merge your modifications into the latest version, so that the latest added features are available. ⚠️

mak-gitdev commented 1 year ago

Nothing to do with the issue, but from your log, I can see that you have devices with space in their names. This is strongly discouraged and not supported.

Ewoodster commented 1 year ago

Well, this actually had to do with the issue. Thanks, deleting the old mapping file (leftover from previous enoceanMQTT version) actually made it work again.

Thank you so much, I really appreciate your work. Now I can test the integration of the Eltako weather station

mak-gitdev commented 1 year ago

@Ewoodster,

Perfect, so I close this issue. Please report in #24 whether the Eltako weather station is working as expected. Thanks.