Suslik
14 January 2023 22:05
1
Hello Together,
I am new in using node-red and need your help.
I have this one as input as mqqt in node-red and i am interesting in getting an output value just for the Power_curr value.´
The change node does not work when copying the value Power_curr it is "payload[""].Power_curr" and the node change marks it as red...
Has someone any ides?
Thanks
hover over the copy path and click on it to see what that give you
Your payload looks a bit odd for tasmota, what sensor is this for ?
Normally there is the sensor type object containing the data eg
Yes I was also was reading it like it is missing a property name, this is strange, never seen this before (how is it even possible ?)
Colin
15 January 2023 07:33
5
Out of interest, what do you see if you tell the mqtt node to return a string? Also what if it returns a buffer? I wonder if there is an unprintable character as the key name.
Suslik
15 January 2023 07:44
6
hi i used it and it gave me this here
payload[""].Power_curr"
Suslik
15 January 2023 07:50
7
it a sensor for smart meter to read out and show the current power electricity usage of the house
Suslik
15 January 2023 08:01
8
this how it looks inside the console
Try setting your MQTT node to keep it as a string and then do a replace "" to something like "xx" in a change node then feed onto the JSON node and you should be able to get a sensible reference to it
payload.xx.Power_curr
I'm using Tasmota 12.3.1 (yours says 12.3.1.3) on a Wemos D1 Mini connected to a PZEM-004T to send readings to Node-RED via MQTT.
I have a MQTT-In node configured like this..
Which gives object-data like this in a debug node...
Note: I have a section named ENERGY, which seems to be missing in your object.
Using my Node-RED flow, I just pull-out the data I need and display on my dashboard.
You can see the object name is "" in that shot, not sure why, did you change any settings relating to topics structure on tasmota setup ?
May be worth asking on tasmota discord
Does the sensor actually have a name in the tasmota config, what kind of module is it and/or are you using a template ?
Suslik
15 January 2023 17:45
13
Thanks to all your support
not really.
I habe used now a different smart meter code and i have now this one.
now i have main instead ""
using a change node
but still i do not get a single value
i get this one.
i changed also the version to 12.3.1
i need just the single value for power
Can you please try my idea and see if it works for you - it works for me
Suslik
15 January 2023 18:07
15
it worked now. Thanks to everyone.
I needed to delete the debug node and recreate it. Something was there wrong.
Thanks
1 Like
system
Closed
16 March 2023 18:08
16
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.