I hope you can help me. I am an absolut beginner with Raspberry PI, Linux and especially Node Red.
I have an Raspberry PI 4 with Raspberry OS, running "Home Assistant" with mosquitto (MQTT), influxdb and Grafana.
What I want is to log my electricity usage from my whole house and get the data to Home Assistant / InfluxDB / MQTT.
So I bought an IR-Diode (Optokopf by weidmann) to read the SML-Data from my Smartmeter at the basement.
The last few days I tryed a lot and nothing works, so "finaly" discovered "node red".
I installed the "Optokopf" at my Raspberry and installed Node Red.
I tried now to get the data to MQTT or alternatively to influxdb.
At Node Red i installed the addon "node-red-contrib-smartmeter".
I managed to get the data from the smartmeter to Node Red.
As you can see, the data I need is shown at the right side (marked yellow).
My first question:
I get a lot of error messages between the data-logs from the smart meter.
What can I do, to solve this problem?
My second and more important question:
What have I to do, to get the data to my MQTT-Server?
I googled at lot and I think I have to put an "function" between the Smartmeter-Input- and MQTT-Output field, to get the yellow marked numbers.
As you can see, I already try it with an MQTT-Out and it says "connected". So this looks good in my opinion. But what I have to set as "message" (2. Screenshot).
Sorry for my bad english, I hope you get, what I want to do.
Thank you in advance.