"Capacity, setpoint" node emits:
Change node has:
The next node gets:
I'm so confused. Where is getting those numbers? Even the date is wrong. It's picking the local time as UTC.
"Capacity, setpoint" node emits:
Change node has:
The next node gets:
I'm so confused. Where is getting those numbers? Even the date is wrong. It's picking the local time as UTC.
I do not understand. So you posted what is in the JSONATA code, so you can directly see, where the numbers came from. So the date came from $millis() etc.
A reboot has fixed that output. But I'm still wondering what could cause that.
If you open the JSONATA editor , you have also a function reference
The right values are at the first debug image, that I got from a debug node before the change node.
The wrong values are the second ones, that I got the same way but after the change node.
The right battery measurement was 57, not 52. And setpoint was negative. I don't know if the input of a node can "hang" but the battery had 52v early in the morning.
Ok I donāt understand as well, so I canāt help you. Power should be 331 instead of -226 etc.
Apparently the change node (I don't know if something else) input stuck at around 10h of this morning (It's 17:30h). It was receiving new messages but processing the old one. Or that "variable" became readonly.
I'm just surprised because I never thought that was possible. I noticed because my home battery was getting overcharged. Ok, that's not possible because the charger limit it's still there, but I found very dangerous if something like this can happen.
This is why I hate function nodes. May be the function node sends more than one msg. The function node is the only one which would save a value within a context. The change node, with the code you posted has no context. In my opinion the output of your function node does not match the out put of the change node can only, that the function node sends additional messages.
Try setting (say) msg.old
to ms.payload
in the change node before changing msg.payload
, this would show the before & after versions of msg.payload
at the input to check mickym2's thought of more than one output from function node
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.