Open boldiebold opened 3 years ago
This is possible with this pull request: https://github.com/koktaildotcom/homey-mi-flora/pull/154 Setup becomes really simple with this after you have raspberry set up - one only needs to install MQTT Server app for homey and create flow as on screenshot below.
Thank you so much for your contribution! How can I test this behavior? Should I install HA with MQTT?
My setup is the following: I connected sensors to Homey first and then moved them to remote room out of bluetooth range. In this room I have set up Raspberry Pi 4 with MQTT Daemon: https://github.com/ThomDietrich/miflora-mqtt-daemon. In the daemon config I added MAC addresses of devices (for convenience I made MAC address visible in Homey settings of a device). Names doesn't matter so my config looks like this:
[Sensors]
Sensor1 = 5C:85:7E:13:15:45
Sensor2 = 5C:85:7E:13:1F:FC
Sensor3 = 5C:85:7E:13:04:3C
Then I have MQTT Server app installed in homey https://homey.app/en-nl/app/net.weejewel.mqttserver/MQTT-Server/ . My Homey acts like MQTT broker so I have configured hostname, username and password in [MQTT] section of daemon.
Daemon periodically scans devices via bluetooth, sends sensor data to homey MQTT Server as JSON messages, via flow it's passed to Homey Miflora app and the values are updated.
Messages look like this:
topic: miflora/Sensor1 message: {"light": 170, "temperature": 21.1, "moisture": 15, "conductivity": 355, "battery": 63}
When daemon starts it also sends message with information about sensors to miflora/$announce topic. From this announce message I match MQTT topics and MAC addresses of the devices. Note that when daemon stops it sends empty object to announce topic.
Thank you so much for explaining. I didn't find the time to test this out yet, sorry for the delay.
I have around 30 Plant Sensors, most of them I can reach via Homey and handle by your app But there are some I can't reach and have to mange the plants otherwise
What do you think of an enhancement for range extension via MqTT, so that plant data which is not reachable via BLE can be integrated via MQTT.
Could be done with: https://github.com/ThomDietrich/miflora-mqtt-daemon and a simple raspberry You can get the data from an MQTT Broker (this could be Homey) and the script above is sending the flora plant data to.
I am willing to support that extension with a donation ;-) maybe others, too