Switch Function dont treat any informations received

Hello!

Trying to get my wallmote quad usable in Red-node and facing an issue:
Followed thoses recommandations Forum link but the switch block doesn’t looks to deal with the input as nothings makes it react: i’m sur i miss a small thing and i’m becoming insane :slight_smile:

here’s what it looks like:
image

the debug block correctly receive informations as expected

{"entity_id":"zwave.aeon_labs_zw130_wallmote_quad","node_id":5,"scene_id":2,"scene_data":0}

and if i copy path it looks correct as what i’m trying to deal with: payload.event.node_id

here’s the block code:

[{"id":"88671688.d10e28","type":"server-events","z":"332a7a59.32aba6","name":"Zwave Scenes","server":"1a8176b8.732339","event_type":"zwave.scene_activated","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":420,"y":740,"wires":[["c4ddf675.d00eb","9b5985ec.1ea6d"]]},{"id":"c4ddf675.d00eb","type":"switch","z":"332a7a59.32aba6","name":"Node_ID","property":"payload.event.node_id","propertyType":"msg","rules":[{"t":"eq","v":"5","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":660,"y":740,"wires":[[]]},{"id":"9b5985ec.1ea6d","type":"debug","z":"332a7a59.32aba6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":690,"y":840,"wires":[]},{"id":"1a8176b8.732339","type":"server","z":"","name":"Home Assistant","addon":true}]

what am i doing wrong? xD

based on the payload object you posted, you are looking for the node id in the wrong place.
node_id’s location is msg.payload.node_id but you set the switch for msg.payload.event.node_id

image

Thanks for your reply,
it does not work with the correct property aswell. :-/
image

here’s what debug output:

changed the payload and it is working like below now.

[{"id":"776f4c6b.60e294","type":"switch","z":"294e4f5f.46b07","name":"Node_ID","property":"payload.event.node_id","propertyType":"msg","rules":[{"t":"eq","v":"5","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":1740,"wires":[["abd03e5a.4372"]]},{"id":"abd03e5a.4372","type":"debug","z":"294e4f5f.46b07","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":550,"y":1740,"wires":[]},{"id":"cf893dd3.364c8","type":"inject","z":"294e4f5f.46b07","name":"","topic":"","payload":"{\"event\":{\"entity_id\":\"zwave.aeon_labs_zw130_wallmote_quad\",\"node_id\":5,\"scene_id\":2,\"scene_data\":0}}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":1740,"wires":[["776f4c6b.60e294"]]}]
1 Like

Strange as if i hit the inject button, nothing reacts on the switch side again.

strange. try to change it to number, instead of string

image

Hey!
its’ working!
i was expecting the switch to return infos about the status but it does not work that way.
Everything is OK - Many thanks for your help!