Hey There,
I have a long journey behind me of getting modbus raw data into hass.io. I finally managed through the node-red plugin, where I connect to my modbus devices and read out the data, convert it and send it through mqtt.
The ariving data format I see in my mosqitto:
Nachricht 1 empfangen auf stromzaehler/1/ um 21:46:
{
“Energiebedarf_Waermepumpe”: [
3548.8540000000003
]
}
QoS: 0 - Retain: false
it seems to be a standard json format, but I am to stupid to get it into my configuration in a proper manner to see as as a sensor value in hass.io…
My yaml config is:
- platform: mqtt
name: “Energiezaehler_Waermepumpe”
state_topic: “stromzaehler/1/”
unit_of_measurement: “kWh”
value_template: ‘{{ value_json.Energiebedarf_Waermepumpe.0}}’
availability:- topic: “homeassistant/status”
payload_available: “online”
payload_not_available: “offline”
json_attributes_topic: “home/sensor1/attributes”
value_template: >
{{ value.split(’;’)[0] }}
- topic: “homeassistant/status”
but i do not get it running with the value in the sensorvalue. it always shows me the same:
I go crazy, can someone help me?
Thanks alot!
Alex