but not for me
Hi there,
i would like a build a Switch Node with the Payload Data from mqtt input.
If payload Data AAA4178400C8XXXXXX then Switch output 1.
Thanks for help!
but not for me
Hi there,
i would like a build a Switch Node with the Payload Data from mqtt input.
If payload Data AAA4178400C8XXXXXX then Switch output 1.
Thanks for help!
Your payload is still a JSON string, make sure you convert it to an object using either the JSON node or by setting the MQTT input node to parse JSON.
Yes although in your switch you will need msg.payload.RfRaw.Data
Try payload.RfRaw.Data
Yup typo on my end.
You should use the copy button in the debug window - no more typos.
There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.
Typo was on my side not his (in my reply)
I had already tried. does not work either
is this right???
Sorry. My mistake. Still true for the OP though
That does look ok
Is it possible there's a newline at the end of your incoming string ? Can you try to replace ==
by contains
?
no
I do not understand that...
I thought I understood that
Lol - I'll summarise...
Just hover the debug item and use the copy path button - helps you get the path to the item of interest without any mistakes. Then you just paste it into the change or switch node. No fuss no muss.
Alternatively to the approach of adding a JSON node behind an MQTT-in, you could also edit in the MQTT node that it should give output as parsed JSON, if you do that you can skip the json node.
Do I have. the path is correct
there is a good tip, thanks. you don't need an additional JSON node. But unfortunately the result is the same