From my plotter I MQTT messages with the values I would like to create sensors with logging for. I get speed like this
Topic
madmax/madmaxfart
Payload:
25
The value is in knots, but I don’t know if that matters.
Depth under transducer:
madmax/madmaxdybde
1.4
That’s in meters.
And finally temp:
madmax/madmaxvanntemperatur
Today this is the payload:
13
In Celcius.
So these I would like to create custom sensors for. I see that template sensor is probably what I need, but I tried putting it in an automation, and that didn’t do anything at all. Could anybody please give me a pointer or five?
Not all that difficult, with a bit of reading. The only annoying thing is that “knots” isn’t a valid speed unit, so I just had to name it “knop” (Norwegian for knots). Temp, depth, speed:
CaptTom, I have omitted a step there… The plotter is a Garmin GPSMap, which sends out regular NMEA0183. I take that via an USB RS-232 plugged into the Pi, and a SignalK server on the Pi converts it to MQTT with the plug-in MQTT Gateway. Then I have Node-RED read the MQTT message and reformat it in a function node to an easy format and send it out again to the MQTT broker, and that’s what comes into Hass. So only one Pi does that, and a lot of other stuff. I use a Pi 4 4 gig RAM, but that’s mostly because I have J.River Media Center on it as well, with a library of around 200 000 tracks.