thomdietrich / miflora-mqtt-daemon Goto Github PK
View Code? Open in Web Editor NEWLinux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼🥀🏡🌳
License: MIT License
Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼🥀🏡🌳
License: MIT License
Hello,
I'm trying the new openhab internal MQTT broker and so far all my devices are working great.
I can't get the MQTT Daemon to connect though (triple-checked correct credentials):
[2018-11-05 18:51:24] Connecting to MQTT broker ... [2018-11-05 18:51:24] Connection error with result code 2 - Connection Refused: identifier rejected.
Looks like the broker is not happy with the client ID, see here: https://jaimyn.com.au/mqtt-connection-failed-status-codes-connack-return-codes/
But the config.ini does not allow to change the client ID. how is it chosen?
Cheers
[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?
The signal information is available in the daemon, however it would be nice if this also got forwardered to MQTT
Adding a timestamp to every MQTT message would make it easy to see, if the message shows the current state of the sensor or if the sensor was unreachable.
In very rare cases the sensor get stuck and keep sending out the same values, this case could be picked up the daemon and warn the user that he needs to take out the battery to reset the sensor.
Hi !
The demon works fine if the miflora sensor is in range. If not the deamon (or the underlaying library) stops working with the message:
Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
Source: https://github.com/ThomDietrich/miflora-mqtt-daemon
Adding sensor to device list and testing connection ...
Name: "FloraCare01"
Traceback (most recent call last):
File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 218, in <module>
flora_poller.fill_cache()
File "/usr/local/lib/python3.5/dist-packages/miflora/miflora_poller.py", line 61, in fill_cache
firmware_version = self.firmware_version()
File "/usr/local/lib/python3.5/dist-packages/miflora/miflora_poller.py", line 104, in firmware_version
res = connection.read_handle(_HANDLE_READ_VERSION_BATTERY) # pylint: disable=no-member
File "/usr/local/lib/python3.5/dist-packages/btlewrap/gatttool.py", line 23, in _func_wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/btlewrap/gatttool.py", line 253, in read_handle
raise BluetoothBackendException("Exit read_ble, no data ({})".format(current_thread()))
btlewrap.base.BluetoothBackendException: Exit read_ble, no data (<_MainThread(MainThread, started -1225092352)>)
I test this by simply add a not existing mac in the config.ini
I have installed miflora v0.4. Any ideas ?
During these cold nights my sensor measure temperatures below zero. The MiFlora App gives the right temperature, while the MQTT-daemon returns
{"conductivity": 1397, "moisture": 35, "temperature": 6553.5, "light": 66, "battery": 98}
This is clearly due to the fact that the temperature is a SIGNED integer while the Miflora-daemon interprets it as an UNSIGNED integer.
It will already be shown in the systemctl status
view.
How to detect? We might need to introduce a command line argument to tell the daemon to run in daemon-no-datetime-mode
Happend 3 times now, random sensor get stuck. Guess because of failed communication (like this?
basnijholt/miflora#48) and/or failed unpairing/disconnect. Restarting my Py helped. Anybody else?
Just an idea for easier use. If the device "announces" itself according to the complete homie convention, then the new MQTT Binding in openHAB would auto-discover it.
First of all, I think your work as awesome and I would like to say thanks for all your effort.
I'm trying to get the deamon running with openhab2. I'm using Mosquitto and everything seems to be working fine, except for the openhab side.
I've already subscribed to my Mosquitto broker with a external MQTT client (MQTTlens) and I can see the messages coming in perfectly fine.
Also I can see openhab connect to the broker:
New client connected from ::1 as be50527e-cf77-4ddb-b94b-30057bdcbeca (c1, k60, u'openhabian').
However when I try to define a dummy component in HABPanel, it keeps saying "NULL".
My configurations for the mqtt binding and openhab are as follows:
services/mqtt.cfg:
mosquitto.url=tcp://127.0.0.1:1883
mosquitto.user=openhabian
mosquitto.pwd=xxx
mosquitto.qos=1
mosquitto.retain=true
mosquitto.async=false
items/miflora.items:
Group gMiFlora "All Mi Flora sensors and elements" (gAll)
Group gLightIntensity "Mi Flora Sunlight Intensity elements" (gAll, gMiFlora)
Group gAirTemperature "Mi Flora Air Temperature elements" (gAll, gMiFlora)
Group gSoilMoisture "Mi Flora Soil Moisture elements" (gAll, gMiFlora)
Group gSoilConductivity "Mi Flora Soil Conductivity/Fertility elements" (gAll, gMiFlora)
Group gBattery "Mi Flora Sensor Battery Level elements" (gAll, gMiFlora)
// Mi Flora "Groot" (C4:7C:8D:65:C1:AA)
Group gGroot "Mi Flora Sensor Groot" (gMiFlora)
Number Groot_LightIntensity "Groot Sunlight Intensity [%d lux]" <text> (gGroot, gLightIntensity) {mqtt="<[mosquitto:miflora/Groot:state:JSONPATH($.light)]"}
Number Groot_AirTemperature "Groot Air Temperature [%.1f °C]" <text> (gGroot, gAirTemperature) {mqtt="<[mosquitto:miflora/Groot:state:JSONPATH($.temperature)]"}
Number Groot_SoilMoisture "Groot Soil Moisture [%d %%]" <text> (gGroot, gSoilMoisture) {mqtt="<[mosquitto:miflora/Groot:state:JSONPATH($.moisture)]"}
Number Groot_SoilConductivity "Groot Soil Conductivity/Fertility [%d µS/cm]" <text> (gGroot, gSoilConductivity) {mqtt="<[mosquitto:miflora/Groot:state:JSONPATH($.conductivity)]"}
Number Groot_Battery "Groot Sensor Battery Level [%d %%]" <text> (gGroot, gBattery) {mqtt="<[mosquitto:miflora/Groot:state:JSONPATH($.battery)]"}
Any suggestions?
Thanks in advance!
Just installed and updated the config.ini with address. then this error.
[2018-01-30 11:35:53] Connecting to MQTT broker ...
[2018-01-30 11:35:53] MQTT connection established
Adding sensor to device list and testing connection ...
Name: "kitchenFlower"
Traceback (most recent call last):
File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 208, in
flora_poller = MiFloraPoller(mac=mac, cache_timeout=miflora_cache_timeout, retries=3, adapter=used_adapter)
TypeError: init() missing 1 required positional argument: 'backend'
Any chance you could create a docker container for raspberry pi 3?
While it's still available on most distributions, gatttool has been officially deprecated by the BlueZ team two years ago. Is there any plan to migrate to something else? (I just ran into this when trying to use miflora-mqtt-daemon for the first time today.)
Currently the status is used to present the last noteworthy action.
Let's replaced or extended it by a summary of all sensors and the success rates.
Feel free to add your thoughts ;)
#Now MiKettle gets detected! (Xiomi Waterkettle)
Hey to Day I had to Fix something on the mqtt Deamon and suddenly My MiKettle was detected as a Bluetooth Device while running "lescan".
I tried to conected but the MAC is restricted via:
if not re.match("C4:7C:8D:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}", mac):
so that did not work.
The Kettle uses Bluetooth as well and probably works similar to the flora sensors so at least the Water temp should be possible to fetch right?
Any Idea how to Check if this could also work?
On a clean install of rasbian, I am getting this error when I run miflora:
pi@raspberrypi:~ $ python3 /opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py
Traceback (most recent call last):
File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 11, in
from colorama import init as colorama_init
ImportError: cannot import name 'init'
https://github.com/open-homeautomation/miflora
running an mosquitto broker on an RP3b with OH gives me the following output:
'''
[16:55:08] openhabian@smarthome:~$ 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
[2018-11-16 16:55:13] Connecting to MQTT broker ...
[2018-11-16 16:55:13] MQTT connection established
Adding sensor to device list and testing connection ...
Name: "FlowerCare"
Internal name: "FlowerCare"
Device name: "Flower care"
MAC address: C4:7C:8D:XX:XX:XX
Firmware: 2.7.0
[2018-11-16 16:55:17] Initial connection to Mi Flora sensor "FlowerCare" (C4:7C:8D:XX:XX:XX) successful
[2018-11-16 16:55:17] Announcing Mi Flora devices to MQTT broker for auto-discovery ...
[2018-11-16 16:55:18] Retrieving data from sensor "FlowerCare" ...
[2018-11-16 16:55:18] Result: {"conductivity": 3, "battery": 100, "light": 324, "moisture": 0, "temperature": 19.0}
[2018-11-16 16:55:18] Publishing to MQTT topic "miflora/FlowerCare"
[2018-11-16 16:55:19] Sleeping (300 seconds) ...
'''
But OpenHAB isn't updating any channels. I'm using those:
mqtt="<[broker:miflora/FlowerCare:state:JSONPATH($.anyValue)]"
This is a openhab spesific suggestion:
To make it easier for the average user the config.ini file could be located in the conf/scripts folder of the openhab enviroment. So when you open visual studio you can edit the config.ini as well as miflora.items without looking around in the different samba drives for it.
If you wanna take it even one step further, we could generate the config.ini file based on the mqtt.cfg(there the broker is defined..) and use tags on the miflora.items for the mac addresses(or my favourite define miflora.things where we define the mac address)
I use Home assiatant (on Synology)
I set reporting_method = homeassistant-mqtt in config.ini
My sensor is
Dwarfbanana = C4:7C:8D:67:3B:13
Help me please with configuration.yaml
sensor:
works but receive all results together:
{"conductivity": 1274, "temperature": 20.1, "moisture": 44, "light": 155, "battery": 99}
I should perfer results separately
conductivity
temperature etc
I need help please
I don't know the exact treshold but the light value turns negative above a specific value..
11000 ok
22000 ok
33000 ok
-2461 when it really is 112k.something
In C I would say it's an overflow cause maybe the unsigned 16bit unsigned int ends here or something.. but there are no variable types in python, or? I couldn't find the cause looking in the code on my own :(
Hi everyone,
I receive the following issue after running the initial execution:
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 305, in <module>
mqtt_client.publish('{}/{}_{}/config'.format(topic_path, flora_name, sensor).lower(), json.dumps(payload), 1, 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.
The MQTT connection is successfully established. I used mainly the standard configuration with the exception of the hostname which I set to the correct IP of my MQTT broker instance which is using the hass.io add-on for the MQTT broker. My hope was to use the auto-discovery to integrate seamlessly.
I haven't found anything by googling, so I am not sure if this is a very unique issue or just my incompetence.
I'd like to have the possibility to publish with retain set to true
.
Another thing that would be nice: the possibility to deactivate publishing on the $announce topics (I don't need them).
btw.: Cool project - thx for publishing it :) I put it on my mqtt-linklist: https://github.com/hobbyquaker/awesome-mqtt
Currently when a miflora sensor is polled, the led on top starts blinking a few times. I'd love an option to disable this. Especially when trying to sleep 😉
We'll be using these sensors to monitor outdoor plants, and because of range issues for BLE, will have multiple monitoring daemons. It'd be lovely to be able to inform the daemons at wakeup what sensors they "own" without having to modify the config.ini by hand every time a new sensor gets added or a potted plant gets moved from one coverage area to another.
Hello,
is it possible to add a custom property like "Watering Duration" to the mqtt message? I would like to set a specific watering duration per sensor in the config file and add this watering duration to the mqtt messages.
Thanks
Frank
Hi,
Sure not the goal of you tool, but have you considered porting it to ESP32 ? Would be nice when Pi is too far from Miflora.
Just a suggestion, is to store the config under the script folder in openhab, that way we can easily edit(add new sensors) the file within Visual Studio.
For a OH beginner user the only thing he needs to do is to use the openhabian-config tool to add miflora, then open VS stusio(which they will be using anyway) and then add their sensors...
Currently you need to google where the config file is stored, then log in with putty, then edit your file nano instead of the nice VS editor(easily copy paste from the internet, search and replace....)
BTW did you guys see that the miflora now comes in different colours!
Hi, i install the daemon on a pi 0w with raspbian. Works great for a while, but couple of weeks I got almost every 1 a 2 days an error and my daemon stops working.
* miflora.service - Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
Loaded: loaded (/etc/systemd/system/miflora.service; enabled; vendor preset:
Active: failed (Result: exit-code) since Thu 2018-01-11 10:47:28 UTC; 29min a
Docs: https://github.com/ThomDietrich/miflora-mqtt-daemon
Process: 242 ExecStart=/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py (code=e
Main PID: 242 (code=exited, status=1/FAILURE)
Status: "Jan 11 10:47:28 - MQTT connection error. Please check your settings
jan 11 10:47:20 pi-zero-w systemd[1]: Starting Xiaomi Mi Flora Plant Sensor MQTT
jan 11 10:47:28 pi-zero-w miflora-mqtt-daemon.py[242]: [2018-01-11 10:47:28] MQT
jan 11 10:47:28 pi-zero-w systemd[1]: miflora.service: Main process exited, code
jan 11 10:47:28 pi-zero-w systemd[1]: Failed to start Xiaomi Mi Flora Plant Sens
jan 11 10:47:28 pi-zero-w systemd[1]: miflora.service: Unit entered failed state
jan 11 10:47:28 pi-zero-w systemd[1]: miflora.service: Failed with result 'exit-
My miflora is working with ios app and detected with lescan
When I try running the miflora-mqtt-daemon.py I get following error:
Any ideas where my problem might be?
alexroot@openhabserver /opt/miflora-mqtt-daemon (git)-[master] # 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
[2018-05-02 11:39:34] Connecting to MQTT broker ...
[2018-05-02 11:39:34] MQTT connection established
Adding sensor to device list and testing connection ...
Name: "Tomato"
Traceback (most recent call last):
File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 218, in
flora_poller.fill_cache()
File "/usr/local/lib/python3.6/dist-packages/miflora/miflora_poller.py", line 61, in fill_cache
firmware_version = self.firmware_version()
File "/usr/local/lib/python3.6/dist-packages/miflora/miflora_poller.py", line 104, in firmware_version
res = connection.read_handle(_HANDLE_READ_VERSION_BATTERY) # pylint: disable=no-member
File "/usr/local/lib/python3.6/dist-packages/btlewrap/gatttool.py", line 23, in _func_wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/btlewrap/gatttool.py", line 253, in read_handle
raise BluetoothBackendException("Exit read_ble, no data ({})".format(current_thread()))
btlewrap.base.BluetoothBackendException: Exit read_ble, no data (<_MainThread(MainThread, started -1225293296)>)
When sensors are used for other stuff then plants it might be needed to change the polling interval of that sensor to lower or higher then the default value.
(I intend to fix this myself and submit a PR, consider this a bug report so others know that the integration is not expected to work right now)
HomeAssistant v0.69 changed the schema for defining sensor objects via MQTT (see home-assistant/core#14033) which means that the objects published by this script are no longer valid
Has anyone succeeded in connecting Domoticz trough MQTT with this project?
Me again ;)
Would be nice to have the reporting_method mqtt-smarthome
- see https://github.com/mqtt-smarthome/mqtt-smarthome
Changes would include:
miflora/status
miflora/status/plant1/moisture
, miflora/status/plant2/conductivity
and so on. Payload following mqtt-smarthome architecture1
on miflora/connected
when the daemon starts, 2
when a bluetooth connection is established, 0
as last-will testament.Would be willing to do this and send you a PR if you'd like to get one :)
Regards,
Sebastian
Arch Linux RaspPi0W here. Had to delete line 237, got an UnicodeEncodeError, ascii something after fetching ble data. Guess its because no openhab is running here? Im no pro so dono if this is relevant. Wanted to integrate this into node-red and your projekt seemed to be the best way. Cheers
By doing this we could check for stale data in home assistant.
if i read the documentation correctly you just send, "force_update": true in the sensor configuration mqtt message.
It would be very useful if the daemon would report any and all Plant sensors it found to the MQTT server. That way, I could just configure and deploy a Pi zero in the glasshouse ("Gewächshaus" in german) and won't need to touch it ever again, basically creating a solid-state miflora gateway.
If no "pretty name" has been configured, the Bluetooth MAC could be used as a topic, maybe without the ":" signs in it.
I have juste receive lastest miflora with firmware 3.1.8 its seems not working with.
its ok for my olds 2.6.2
if you have any idee
thanks :)
https://community.openhab.org/t/xiaomi-mi-flora-plant-sensor-mqtt-client-daemon/33119/53
miflora-mqtt-daemon/miflora-mqtt-daemon.py
Line 337 in a7a474b
Add:
data['timestamp'] = strftime('%Y-%m-%dT%H:%M:%S', localtime())
Maybe add timezone? Also the openHAB generator function needs to be adapted.
I just bought some miflora sensors from aliexpress i did buy 6 sensors but 2 of them don't work.
I can connect to them with gatttool and pull the values from them.
Id Version Data
7 2.7.0 64 15 32 2e 37 2e 30
8 2.7.0 64 15 32 2e 37 2e 30
9 3.2.1 64 2a 33 2e 32 2e 31
10 ?.?.? 64 13 32 2e 36 2e 35
11 3.2.1 64 2a 33 2e 32 2e 31
12 ?.?.? 64 13 32 2e 36 2e 35
If i decoded the data correctly they run version 2.6.5
Both 10 and 12 are the ones that don't work.
Id Field Data
10 0x38 64 13 32 2e 36 2e 35
10 0x03 46 6c 6f 77 65 72 20 63 61 72 65
10 0x35 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
10 0x33 00 00
12 0x38 64 13 32 2e 36 2e 35
12 0x03 46 6c 6f 77 65 72 20 63 61 72 65
12 0x35 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
12 0x33 00 00
Is there someway to set the logging level to see exactly what goes wrong?
I found the following app https://play.google.com/store/apps/details?id=com.huahuacaocao.flowercare that might allow me to upgrade, but do we know to what version and if it will still work with this software?
By adding this functionality you can easily figure out if the daemon stoppend working, MQTT or something else happened to your setup
Hello,
So I could not raise an issue on https://github.com/aqualx/miflora-mqtt-daemon directly so I am doing it here hoping that @aqualx would see it.
I have been using your fork and I believe I run into issue.
I have both miflora sensors and and Mija bluetooth temperature monitor configured, some of the miflora sensors became unavailable from time to time (they are on a balcony and when blinds close BLE connection is lost).
Nevertheless I have noticed that the deamon freeze from time to time.
I had it run in a screen session to see the output:
[2019-03-25 00:51:08] Result: {"humidity": 44.4, "temperature": 23.0, "battery": 93}
[2019-03-25 00:51:08] Publishing to MQTT topic "misensor/XMiTH_Bedroom"
[2019-03-25 00:51:08] Sleeping for Mijia Bluetooth Temperature Smart Humidity (60 seconds) ...
[2019-03-25 00:52:08] Retrieving data from Mijia Bluetooth Temperature Smart Humidity sensor "XMiTH_Bedroom" ...
[2019-03-25 00:52:16] Result: {"humidity": 44.5, "temperature": 23.0, "battery": 93}
[2019-03-25 00:52:16] Publishing to MQTT topic "misensor/XMiTH_Bedroom"
[2019-03-25 00:52:16] Sleeping for Mijia Bluetooth Temperature Smart Humidity (60 seconds) ...
[2019-03-25 00:53:16] Retrieving data from Mijia Bluetooth Temperature Smart Humidity sensor "XMiTH_Bedroom" ...
[2019-03-25 00:53:31] Result: {"humidity": 44.3, "temperature": 23.0, "battery": 93}
[2019-03-25 00:53:31] Publishing to MQTT topic "misensor/XMiTH_Bedroom"
[2019-03-25 00:53:31] Sleeping for Mijia Bluetooth Temperature Smart Humidity (60 seconds) ...
[2019-03-25 00:54:31] Retrieving data from Mijia Bluetooth Temperature Smart Humidity sensor "XMiTH_Bedroom" ...
And today its like almost 24h after the last output being displayed and no new response has show up.
After I restart the deamon everything gets back to normal for like a day.
Let me know if I could add more input to this.
Hi,
sorry to bother you again. I freshly reinstalled my rpi und the miflora-mqtt-daemon. I see my devices with hcitool lescan but I can't add them. I get the following error:
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
[2017-10-16 13:25:13] Connecting to MQTT broker ...
[2017-10-16 13:25:13] MQTT connection established
Adding sensor to device list and testing connection ...
Name: "tomato"
Traceback (most recent call last):
File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 188, in <module>
flora_poller = MiFloraPoller(mac=mac, cache_timeout=miflora_cache_timeout, retries=3, adapter=used_adapter)
TypeError: __init__() missing 1 required positional argument: 'backend'
Checked my config.ini but can't find a mistake. Any idea? Thanks
Hi,
first I want to thank you for this great tool. Basically I could make my miflora sensor working.
Now I want to make the systemd service working but got problems.
I installed the service as written in the github documentation:
sudo cp /opt/miflora-mqtt-daemon/template.service /etc/systemd/system/miflora.service
sudo systemctl daemon-reload
sudo systemctl start miflora.service
But then the terminal shows:
Job for miflora.service failed because the control process exited with error code.
See "systemctl status miflora.service" and "journalctl -xe" for details.
If I run systemctl status miflora.service it tells me:
miflora.service - Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
Loaded: loaded (/etc/systemd/system/miflora.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-08-14 11:15:15 CEST; 19min ago
Docs: https://github.com/ThomDietrich/miflora-mqtt-daemon
Process: 27488 ExecStart=/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py (code=exited, status=1/FAILURE)
Main PID: 27488 (code=exited, status=1/FAILURE)
Aug 14 11:15:15 openHABianPi systemd[1]: Failed to start Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon.
Aug 14 11:15:15 openHAB systemd[1]: miflora.service: Unit entered failed state.
Aug 14 11:15:15 openHAB systemd[1]: miflora.service: Failed with result 'exit-code'.
Aug 14 11:15:15 openHAB systemd[1]: miflora.service: Service hold-off time over, scheduling restart.
Aug 14 11:15:15 openHAB systemd[1]: Stopped Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon.
Aug 14 11:15:15 openHAB systemd[1]: miflora.service: Start request repeated too quickly.
Aug 14 11:15:15 openHAB systemd[1]: Failed to start Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon.
Aug 14 11:15:15 openHAB systemd[1]: miflora.service: Unit entered failed state.
Aug 14 11:15:15 openHAB systemd[1]: miflora.service: Failed with result 'exit-code'.`
What I am missing?
Thanks a lot for any help!
Can you please add support for Xiaomi Ropot
The protocol seems to be very similar to miflora:
basnijholt/miflora#110
Hello,
Scenario:
MiFlora work for some time and returns data but battery goes off and data stop to flow.
Openhab display value last returned over mqtt. User newer knows that sensor is offline.
I would like to propose enhancement:
In the event of lost connectivity to the sensor or failure to retrieve data, deamon could returned either "N/A" or "connection lost" value in all measurements for lost sensor.
Do you think it would be possible ?
Thanks
Jarek
Hi,
Can you please add support for Xiaomi Mijia Temperature ? Or create a new " mitemp-mqtt-daemon " repository. Thanks a lot for your good job !
It would be nice to have the firmware version in the json of the mqtt message.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.