Hi everybody, I’m getting a bit frustrated with mqtt auto discovery. Maybe there is some ace on here that can help me out.
Current Situation
I run a raspberry zero w to collect sensor data from my heat pump by using node-red.
There is quite a lot of information available from the serial port. This works great!
What I would like to achieve
Since Homeassistant provides mqtt auto discovery, I would like to enable my configuration in node-red to enable that. So far I have read a lot of blogs and installed node-red add-ons, but no luck.
For example this temperature sensor.
The function node on the left returns the temperature value like this
var newMsg = { payload: temperatureValue };
What do I need to configure exactly in node-red to make HA recognise this sensor in the mqtt auto discovery?
I’m sure that mosquito is properly configured already as I have a DTU sensor working fine with it.
Also playing with the inject node did not help.
msg.topic
homeassistant/sensor/aerosmart/120/aktuelleinnentemperatur/config
msg.payload
{
"name": "Sonstiges Aktuelle Innentemperature",
"stat_t": "homeassistant/sensor/aerosmart/120/aktuelleinnentemperatur",
"uniq_id": "aerosmart_120_aktuelleinnentemperatur",
"dev": {
"name": "Frischluftheizung",
"ids": "73722946-9bd0-4fc0-a0c1-ecf6a8036248",
"cu": "http://10.111.0.30",
"mf": "Drexel und Weiss",
"mdl": "Aerosmart m",
"sw": "1.0"
}
}
Thanks a lot, Ike.