Open NicoFilips opened 5 years ago
Hey there. I believe your issue is related to #64. Please check your config file for trailing spaces.
Hmm weird, yes I got rid of this exception, very kind, thank you Thomas!
But I still encounter no retrieved events or values:
Its even publishing the data:
but my items stay empty:
Items definition is okay, double checked it with the built in:
python3 /opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py --gen-openhab
I've rebooted and restarted/loaded the daemon .. I need a little help here, this can't be so hard, it was running perfectly and has been an very easy setup before my Pi crashed some weeks ago ..
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 💪
Maybe that'll help you. I'm using the new MQTT plugin from Openhab 2.4 with the internal broker.
Thing file:
Bridge mqtt:systemBroker:MqttBroker "MQTT Broker" [ brokerid="embedded-mqtt-broker" ]
{
Thing topic FicusBenjamin "Ficus Benjamin"
{
Channels:
Type number : light "Lichtstärke" [ stateTopic="miflora/FicusBenjamin", transformationPattern="JSONPATH:$.light" ]
Type number : battery "Batterieladung" [ stateTopic="miflora/FicusBenjamin", transformationPattern="JSONPATH:$.battery" ]
Type number : temperature "Lufttemperatur" [ stateTopic="miflora/FicusBenjamin", transformationPattern="JSONPATH:$.temperature" ]
Type number : conductivity "Bodenfruchtbarkeit" [ stateTopic="miflora/FicusBenjamin", transformationPattern="JSONPATH:$.conductivity" ]
Type number : moisture "Bodenfeuchtigkeit" [ stateTopic="miflora/FicusBenjamin", transformationPattern="JSONPATH:$.moisture" ]
}
}
Item File:
Number:Illuminance Miflora_Ficus_Light "Lichtstärke Ficus [%d lx]" <light> { channel="mqtt:topic:MqttBroker:FicusBenjamin:light" }
Number:Dimensionless Miflora_Ficus_Battery "Batterieladung Ficus [%d %%]" <battery> { channel="mqtt:topic:MqttBroker:FicusBenjamin:battery" }
Number:Temperature Miflora_Ficus_Temperature "Lufttemperatur Ficus [%.1f °C]" <temperature> { channel="mqtt:topic:MqttBroker:FicusBenjamin:temperature" }
Number Miflora_Ficus_Conductivity "Bodenfruchtbarkeit Ficus [%d µS/cm]" <lawnmower> { channel="mqtt:topic:MqttBroker:FicusBenjamin:conductivity" }
Number:Dimensionless Miflora_Ficus_Moisture "Bodenfeuchtigkeit Ficus [%d %%]" <humidity> { channel="mqtt:topic:MqttBroker:FicusBenjamin:moisture" }
Thanks @Markkuuss !
Even though this is not the future of what this daemon will encourage, would you like to add your example to the end of the README as a PR? That would for sure be helpful
@ThomDietrich Oh allright, didn't noticed that the mqtt config changed! Thanks for helping. Would be a good thing to update the Readme file expecially for other members, who are like me, not unbelievable familiar with the mqtt configuration :) besides that, great repo! @Markkuuss Thank you ! I will try it when I'm at home. Really helped me out :)
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?