Closed lesadr closed 1 year ago
So So So So ... sorry !!! Appology ! I forget to install a MQTT Server like Mosquitto Broker ... So everything is well now, I receive all information from my scale to your add-on. But I don't understand why it's necessary to have a MQTT Server, the information are also receive through the Bluetooth Low Energy Monitor. Thx for your add-on ;)
But I don't understand why it's necessary to have a MQTT Server, the information are also receive through the Bluetooth Low Energy Monitor.
Thanks. Ideally I'd create a native home assistant integration that does everything. It's a lot more work and I don't have the knowledge/experience in building HA integrations
Select Add-On (place a lowercase
x
for the relevant add-on)Describe the bug I have a bug when i start the add-on on HA OS, It stop few seconds I started it. Don't understand what is Errno 111 and how to solve it. The @$MAC is good I checked with an other module like Bluetooth Low Energy Monitor and it received informations from the scale.
Configuration HCI_DEV: hci0 BLUEPY_PASSIVE_SCAN: false MISCALE_MAC: XX:YY:ZZ:XX:YY:ZZ MQTT_PREFIX: miscale MQTT_HOST: 127.0.0.1 MQTT_USERNAME: user MQTT_PASSWORD: passwd MQTT_PORT: 1883 MQTT_RETAIN: true MQTT_DISCOVERY: true MQTT_DISCOVERY_PREFIX: homeassistant MQTT_TLS_CACERTS: Path to CA Cert File MQTT_TLS_INSECURE: false DEBUG_LEVEL: error USERS:
Screenshots Log : 2023-03-13 10:27:23 - Loading Config From Add-On Options... 2023-03-13 10:27:23 - (INFO) ------------------------------------- 2023-03-13 10:27:23 - (INFO) Starting Xiaomi mi Scale v0.3.6... 2023-03-13 10:27:23 - (INFO) Loading Config From Options.json... 2023-03-13 10:27:23 - (WARNING) Invalid logging level provided, defaulting to INFO... 2023-03-13 10:27:23 - (INFO) Config Loaded... Traceback (most recent call last): File "/opt/miscale/Xiaomi_Scale.py", line 352, in
MQTT_discovery()
File "/opt/miscale/Xiaomi_Scale.py", line 41, in MQTT_discovery
publish.single(
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/publish.py", line 227, in single
multiple([msg], hostname, port, client_id, keepalive, will, auth, tls,
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/publish.py", line 163, in multiple
client.connect(hostname, port, keepalive)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 937, in connect
return self.reconnect()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1071, in reconnect
sock = self._create_socket_connection()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
File "/usr/local/lib/python3.9/socket.py", line 844, in create_connection
raise err
File "/usr/local/lib/python3.9/socket.py", line 832, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Scale (please complete the following information):
Device running Home Assistant (please complete the following information):
Home Assistant Version: Home Assistant 2023.3.3 Supervisor 2023.03.1 Operating System 9.5