1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

fixed switch node example#8 imported as flow

This commit is contained in:
Hiroyasu Nishiyama 2020-06-18 13:56:01 +09:00
parent bc87210ce3
commit c3a058a479

View File

@ -1 +1 @@
[{"id":"7e4b3910.6cefb8","type":"tab","label":"Route a message based on one of its properties","disabled":false,"info":""},{"id":"7ca55649.268c78","type":"comment","z":"7e4b3910.6cefb8","name":"Route a message based on one of its properties","info":"Switch node can route a message to different flows according to the value of any property (e.g. `msg.topic`).\n\nSee Node-RED cookbook [item](https://cookbook.nodered.org/basic/route-on-property).","x":240,"y":60,"wires":[]},{"id":"f2cbd8ce.34c4c8","type":"switch","z":"7e4b3910.6cefb8","name":"Route ","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"temperature","vt":"str"},{"t":"eq","v":"humidity","vt":"str"},{"t":"eq","v":"pressure","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":370,"y":160,"wires":[["50651c06.281524"],["2786389.31cc5c8"],["e4db256d.a80ca8"]]},{"id":"c4de36a5.f14bc8","type":"inject","z":"7e4b3910.6cefb8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"temperature","payload":"27","payloadType":"num","x":180,"y":120,"wires":[["f2cbd8ce.34c4c8"]]},{"id":"96073ecd.9207f","type":"inject","z":"7e4b3910.6cefb8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"humidity","payload":"45","payloadType":"num","x":170,"y":160,"wires":[["f2cbd8ce.34c4c8"]]},{"id":"50651c06.281524","type":"debug","z":"7e4b3910.6cefb8","name":"Temperature","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":550,"y":120,"wires":[]},{"id":"2786389.31cc5c8","type":"debug","z":"7e4b3910.6cefb8","name":"Humidity","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":540,"y":160,"wires":[]},{"id":"e4db256d.a80ca8","type":"debug","z":"7e4b3910.6cefb8","name":"Pressure","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":540,"y":200,"wires":[]},{"id":"11b023ef.147c9c","type":"inject","z":"7e4b3910.6cefb8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pressure","payload":"1001","payloadType":"num","x":170,"y":200,"wires":[["f2cbd8ce.34c4c8"]]}]
[{"id":"7ca55649.268c78","type":"comment","z":"7e4b3910.6cefb8","name":"Route a message based on one of its properties","info":"Switch node can route a message to different flows according to the value of any property (e.g. `msg.topic`).\n\nSee Node-RED cookbook [item](https://cookbook.nodered.org/basic/route-on-property).","x":240,"y":60,"wires":[]},{"id":"f2cbd8ce.34c4c8","type":"switch","z":"7e4b3910.6cefb8","name":"Route ","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"temperature","vt":"str"},{"t":"eq","v":"humidity","vt":"str"},{"t":"eq","v":"pressure","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":370,"y":160,"wires":[["50651c06.281524"],["2786389.31cc5c8"],["e4db256d.a80ca8"]]},{"id":"c4de36a5.f14bc8","type":"inject","z":"7e4b3910.6cefb8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"temperature","payload":"27","payloadType":"num","x":180,"y":120,"wires":[["f2cbd8ce.34c4c8"]]},{"id":"96073ecd.9207f","type":"inject","z":"7e4b3910.6cefb8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"humidity","payload":"45","payloadType":"num","x":170,"y":160,"wires":[["f2cbd8ce.34c4c8"]]},{"id":"50651c06.281524","type":"debug","z":"7e4b3910.6cefb8","name":"Temperature","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":550,"y":120,"wires":[]},{"id":"2786389.31cc5c8","type":"debug","z":"7e4b3910.6cefb8","name":"Humidity","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":540,"y":160,"wires":[]},{"id":"e4db256d.a80ca8","type":"debug","z":"7e4b3910.6cefb8","name":"Pressure","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":540,"y":200,"wires":[]},{"id":"11b023ef.147c9c","type":"inject","z":"7e4b3910.6cefb8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pressure","payload":"1001","payloadType":"num","x":170,"y":200,"wires":[["f2cbd8ce.34c4c8"]]}]