Exception when running miflora-mqtt-daemon.py
See original GitHub issue[21:02:34] root@smarthome:/opt/miflora-mqtt-daemon# python3 /opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py
Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
Source: https://github.com/ThomDietrich/miflora-mqtt-daemon
[2019-01-15 21:02:47] Connecting to MQTT broker ...
Adding sensor to device list and testing connection ...
Name: "Flowercare"
Internal name: "Flowercare"
Device name: "Flower care"
MAC address: C4:7C:XX:XX:XX:XX
Firmware: 2.7.0
[2019-01-15 21:02:52] Initial connection to Mi Flora sensor "Flowercare" (C4:7C:8D:67:58:3B) successful
[2019-01-15 21:02:52] Announcing Mi Flora devices to MQTT broker for auto-discovery ...
Traceback (most recent call last):
File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 251, in <module>
mqtt_client.publish('{}/$announce'.format(base_topic), json.dumps(flores_info), retain=True)
File "/usr/local/lib/python3.5/dist-packages/paho/mqtt/client.py", line 1057, in publish
raise ValueError('Publish topic cannot contain wildcards.')
ValueError: Publish topic cannot contain wildcards.
I’ve commented in base_topic = mqttjson to get it into OpenHAB items. running the script with this line commented out it works perfect, but the OpenHAB items never get updated. Can someone help?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
getting exception when running python script using mule
Hi All,. I have python code which is running fine in my raspberry Pi. However, when I am running the same code using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Maybe that’ll help you. I’m using the new MQTT plugin from Openhab 2.4 with the internal broker.
Thing file:
Item File:
Results are published to the MQTT broker but not retrieved by openHAB. Should be simple to debug. My best guess is that with openHAB 2.4 you are now using the new MQTT binding and need to adapt your configuration. The one generated with
--gen-openhab
is for the old binding and won’t help you much. Either install the old binding or modify your configuration. Both should be easy. If you need help, please contact the openHAB community.I’ve moved into a new apartment and did not yet implement the needed changes for this daemon. The solution will be #57 - to update the Homie
reporting_method
and have plants automatically discovered by openHAB 💪