I suspect the problem is the payload
going into the switch
node is an object
.
I'm not sure that is supported.
You could try making a TWO new part(s) of the msg.
if that structure is needed else where down the flow.
So it could be something like:
msg = {
"payload":{"key":key,"stats":status of key},
"key":key,
"stats":status of key}
I know it is painful, but.....
Then you edit the switch
node and change payload
to either key
or status
depending on which you want to parse.
But.....
I'm guessing you will have to use two switch
nodes.
One to determine the key
and one to determine the status
.
Actually more than 2, but it is implied to be two LAYERS.
eg:
[{"id":"c729e8d30418e78a","type":"switch","z":"d83300ecf7ff5383","name":"Status","property":"status","propertyType":"msg","rules":[{"t":"eq","v":"pressed","vt":"str"},{"t":"eq","v":"relaesed","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":210,"y":2160,"wires":[["04c79baf1ff7bbad"],["c0e008e714aa0ea0"]]},{"id":"04c79baf1ff7bbad","type":"switch","z":"d83300ecf7ff5383","name":"Pressed","property":"key","propertyType":"msg","rules":[{"t":"eq","v":"F1","vt":"str"},{"t":"eq","v":"F2","vt":"str"},{"t":"eq","v":"F3","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":410,"y":2080,"wires":[["6b0d19258d6fcf1e"],["48b6aab087dca819"],["dbc89f74b528d39a"]]},{"id":"c0e008e714aa0ea0","type":"switch","z":"d83300ecf7ff5383","name":"Released","property":"key","propertyType":"msg","rules":[{"t":"eq","v":"F1","vt":"str"},{"t":"eq","v":"F2","vt":"str"},{"t":"eq","v":"F3","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":410,"y":2240,"wires":[["965719ac6288f021"],["d135f2c2e8f78074"],["a6d204638af7e3c8"]]},{"id":"6b0d19258d6fcf1e","type":"debug","z":"d83300ecf7ff5383","name":"F1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2040,"wires":[]},{"id":"48b6aab087dca819","type":"debug","z":"d83300ecf7ff5383","name":"F2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2080,"wires":[]},{"id":"dbc89f74b528d39a","type":"debug","z":"d83300ecf7ff5383","name":"F3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2120,"wires":[]},{"id":"965719ac6288f021","type":"debug","z":"d83300ecf7ff5383","name":"F1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2200,"wires":[]},{"id":"d135f2c2e8f78074","type":"debug","z":"d83300ecf7ff5383","name":"F2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2240,"wires":[]},{"id":"a6d204638af7e3c8","type":"debug","z":"d83300ecf7ff5383","name":"F3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2280,"wires":[]}]
Or:
[{"id":"c729e8d30418e78a","type":"switch","z":"d83300ecf7ff5383","name":"Key","property":"key","propertyType":"msg","rules":[{"t":"eq","v":"F1","vt":"str"},{"t":"eq","v":"F2","vt":"str"},{"t":"eq","v":"F3","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":210,"y":2160,"wires":[["04c79baf1ff7bbad"],["c601f7f4b83f4121"],["f859749fba212f3f"]]},{"id":"04c79baf1ff7bbad","type":"switch","z":"d83300ecf7ff5383","name":"Status","property":"status","propertyType":"msg","rules":[{"t":"eq","v":"pressed","vt":"str"},{"t":"eq","v":"repleased","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":400,"y":2080,"wires":[["6b0d19258d6fcf1e"],["965719ac6288f021"]]},{"id":"c601f7f4b83f4121","type":"switch","z":"d83300ecf7ff5383","name":"Status","property":"status","propertyType":"msg","rules":[{"t":"eq","v":"pressed","vt":"str"},{"t":"eq","v":"repleased","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":400,"y":2160,"wires":[["48b6aab087dca819"],["d135f2c2e8f78074"]]},{"id":"f859749fba212f3f","type":"switch","z":"d83300ecf7ff5383","name":"Status","property":"status","propertyType":"msg","rules":[{"t":"eq","v":"pressed","vt":"str"},{"t":"eq","v":"repleased","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":2260,"wires":[["dbc89f74b528d39a"],["a6d204638af7e3c8"]]},{"id":"6b0d19258d6fcf1e","type":"debug","z":"d83300ecf7ff5383","name":"F1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2040,"wires":[]},{"id":"965719ac6288f021","type":"debug","z":"d83300ecf7ff5383","name":"F1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2100,"wires":[]},{"id":"48b6aab087dca819","type":"debug","z":"d83300ecf7ff5383","name":"F2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2140,"wires":[]},{"id":"d135f2c2e8f78074","type":"debug","z":"d83300ecf7ff5383","name":"F2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2190,"wires":[]},{"id":"dbc89f74b528d39a","type":"debug","z":"d83300ecf7ff5383","name":"F3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2230,"wires":[]},{"id":"a6d204638af7e3c8","type":"debug","z":"d83300ecf7ff5383","name":"F3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":2280,"wires":[]}]