Hi there,
I'm a beginner and was hoping someone could help me.
I have a Tasoma IR-Reader for my digital electricity meter. I configured MQTT, set the topic to "smartmeter" and then added an mqtt in node.
I configured the server to the IP of the Raspberry Pi4 running Node-RED and set the topic to "tele/smartmeter/SENSOR".
(QoS = 2; Output= parsed JSON)
a debug node (msg.payload) shows me all the data, so I suppose it is working the way that it should.
object
Time: "2024-11-23T21:16:14"
SML: object
Total_in: 14886.8561
Total_out: 0
Power_curr: 256
Volt_p1: 231.5
[...]
)
Now I only want the Power_curr. So I put a change node right to the mqtt in. that didn't work, and i found this thread: Change msg.payload to msg.payload.ANYNAME
i tried to apply it to my situation
so this is what i did.
but if i debug it with the output "msg.payload.SML.Power_curr" i still get:
23.11.2024, 21:59:49node: debug 1
tele/smartmeter/SENSOR : msg.payload.SML.Power_curr : Object
object
Time: "2024-11-23T21:59:45"
SML: object
Total_in: 14887.1382
Total_out: 0
Power_curr: 284
Volt_p1: 231.8
Volt_p2: 231
Volt_p3: 231.2
Amperage_p1: 1.8
Amperage_p2: 0.6
Amperage_p3: 0.6
phase_angle_p1: -62
phase_angle_p2: -62
phase_angle_p3: -69
frequency: 50
What do i have to do to just get the value for "Power_curr" (284)?
Greetings, Tom