Bonjour,
J’ai installé HAOS sur ma Pi4, installé enocean-mqtt via pip et pour l’instant (~50 minutes), je n’ai pas d’erreur.
[Installation HOAS]
image: HAOS 8.1 RPi-4 64-bit
Home Assistant Core 2022.6.5
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.1
[Installation enoceanmqtt]
Pour avoir un terminal dans HAOS, j’ai installé le module complémentaire SSH & Web Terminal
version 11.0.1
Ensuite dans le terminal
> pip install enocean-mqtt
> vi /etc/enoceanmqtt.conf
Le contenu du fichier de configuration est le suivant
## the general section defines parameter for the mqtt broker and the enocean interface
[CONFIG]
enocean_port = /dev/ttyUSB0
log_packets = 1
# mqtt_host = localhost
mqtt_host = aaa.bbb.ccc.ddd
mqtt_port = pppp
mqtt_client_id = enogtw # ensure that this is unique if you use multiple clients
## setting mqtt_keepalive = 0 sets the timeout to infinitive but does not work reliably
## due to an upstream issue https://github.com/eclipse/paho.mqtt.python/issues/473
mqtt_keepalive = 60
## the prefix is used for the mqtt value names; this is extended by the sensor name
mqtt_prefix = test/enocean/
## publish received packets as single MQTT message with a JSON payload
# mqtt_publish_json = true
## optionally also set mqtt_user and mqtt_pwd (don't use quotes).
# mqtt_user =
# mqtt_pwd =
## enable SSL on MQTT connection
## Ensure that mqtt_host matches one of the hostnames contained in the broker's
## certificate, otherwise the client will refuse to connect.
##
## mqtt_ssl_ca_certs: CA certificates to be treated as trusted. Required if
## the MQTT broker is configured with a self-signed certificate.
## mqtt_ssl_certfile, mqtt_ssl_keyfile: Client certificate and private key.
## Only required if the broker requires clients to present a certificate.
## mqtt_ssl_insecure: Disable verification of the broker's certificate.
## WARNING: do NOT use on production systems as this is insecure!
##
# mqtt_ssl = true
# mqtt_ssl_ca_certs = /path/CA_files_merged.pem
# mqtt_ssl_certfile = /path/client_cert.pem
# mqtt_ssl_keyfile = /path/client_key.pem
# mqtt_ssl_insecure = true
## Enable MQTT debugging. Requires --debug on the command line.
mqtt_debug = true
## all other sections define the sensors to monitor
[module/test]
address = 0xDEADBEEF
rorg = 0xD2 # VLD
func = 0x01
type = 0x0C
log_learn = 1
command = CMD
publish_rssi = 1
[Run]
> enoceanmqtt --debug
Les premières lignes du log donnent:
/usr/lib/python3.10/site-packages/bs4/builder/__init__.py:545: XMLParsedAsHTMLWarning: It looks like you're parsing an XML document using an HTML parser. If this really is an HTML document (maybe it's XHTML?), you can ignore or filter this warning. If it's XML, you should know that using an XML parser will be more reliable. To parse this document as XML, make sure you have the lxml package installed, and pass the keyword argument `features="xml"` into the BeautifulSoup constructor.
warnings.warn(
2022-06-12 10:15:32,723 INFO: Logging to file: /usr/lib/python3.10/site-packages/enoceanmqtt/../enoceanmqtt.log
2022-06-12 10:15:32,724 INFO: Loading config file /etc/enoceanmqtt.conf
2022-06-12 10:15:32,727 DEBUG: Created sensor: {'name': 'test/enocean/module/test', 'address': ########, 'rorg': 210, 'func': 1, 'type': 12, 'log_learn': 1, 'command': 'CMD', 'publish_rssi': 1}
2022-06-12 10:15:32,728 DEBUG: Global config: {'enocean_port': '/dev/ttyUSB0', 'log_packets': '1', 'mqtt_host': '########', 'mqtt_port': '####', 'mqtt_client_id': 'enogtw', 'mqtt_keepalive': '60', 'mqtt_prefix': 'test/enocean/', 'mqtt_debug': 'true'}
2022-06-12 10:15:32,729 DEBUG: Connecting to host ########, port ####, keepalive 60
2022-06-12 10:15:32,743 DEBUG: Sending CONNECT (u0, p0, wr0, wq0, wf0, c1, k60) client_id=b'enogtw'
2022-06-12 10:15:32,743 INFO: SerialCommunicator started
2022-06-12 10:15:32,744 WARNING: Replacing Packet.optional with default value.
2022-06-12 10:15:32,746 INFO: Sending packet
2022-06-12 10:15:32,747 DEBUG: 0x05 ['0x8'] [] OrderedDict()
2022-06-12 10:15:32,748 DEBUG: Received CONNACK (0, 0)
2022-06-12 10:15:32,749 INFO: Succesfully connected to MQTT broker.
2022-06-12 10:15:32,750 DEBUG: Sending SUBSCRIBE (d0, m1) [(b'test/enocean/module/test/req/#', 0)]
2022-06-12 10:15:32,752 DEBUG: Received SUBACK
2022-06-12 10:15:32,848 DEBUG: 0x02 ['0x0', '0xff', '0xc2', '0xe4', '0x80'] ['0xa'] OrderedDict()
2022-06-12 10:15:32,849 INFO: got response packet: OK
2022-06-12 10:16:19,097 DEBUG: ##:##:##:##->FF:FF:FF:FF (-64 dBm): 0x01 ['0xf6', '0x10', '0x##', '0x##', '0x##', '0x##', '0x20'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x40', '0x0'] OrderedDict()
2022-06-12 10:16:19,099 INFO: received: ##:##:##:##->FF:FF:FF:FF (-64 dBm): 0x01 ['0xf6', '0x10', '0x##', '0x##', '0x##', '0x##', '0x20'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x40', '0x0'] OrderedDict()
2022-06-12 10:16:19,102 INFO: unknown sensor: ##:##:##:##
2022-06-12 10:16:19,625 DEBUG: ##:##:##:##->FF:FF:FF:FF (-65 dBm): 0x01 ['0xf6', '0x0', '0x##', '0x##', '0x##', '0x##', '0x20'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x41', '0x0'] OrderedDict()
2022-06-12 10:16:19,626 INFO: received: ##:##:##:##->FF:FF:FF:FF (-65 dBm): 0x01 ['0xf6', '0x0', '0x##', '0x##', '0x##', '0x##', '0x20'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x41', '0x0'] OrderedDict()
2022-06-12 10:16:19,628 INFO: unknown sensor: ##:##:##:##
2022-06-12 10:16:32,825 DEBUG: Sending PINGREQ
2022-06-12 10:16:32,829 DEBUG: Received PINGRESP