|
[{"id":"1b949ecf.f33b41","type":"inject","z":"2272ece0.497ba4","name":"","topic":"","payload":"{\"topic\":\"light\",\"value\":\"Wet\"}","payloadType":"json","repeat":"","crontab":"","once":false,"x":441,"y":262,"wires":[["16b8612.36ccb9f"]]},{"id":"314e84eb.c287ac","type":"debug","z":"2272ece0.497ba4","name":"","active":true,"console":"false","complete":"true","x":1022,"y":335,"wires":[]},{"id":"3a63a4d7.bbd84c","type":"websocket in","z":"2272ece0.497ba4","name":"Water Sensor","server":"","client":"3858e3d9.c0d48c","x":214,"y":384,"wires":[["2b393086.6272e","1bf4e50f.af010b"]]},{"id":"16b8612.36ccb9f","type":"switch","z":"2272ece0.497ba4","name":"Wet Only","property":"payload.data","propertyType":"msg","rules":[{"t":"eq","v":"Wet","vt":"str"}],"checkall":"true","outputs":1,"x":578,"y":355,"wires":[["709d6120.9a6d4","da2d7a47.e67738"]]},{"id":"4a5977f.7edb788","type":"http request","z":"2272ece0.497ba4","name":"Turn Off Water Valve","method":"POST","ret":"txt","url":"https://api.jilia.io----CHANGE THIS TO YOURS---","tls":"","x":1049,"y":519,"wires":[["af1a6d1a.ba5c6"]]},{"id":"709d6120.9a6d4","type":"change","z":"2272ece0.497ba4","name":"Set Action","rules":[{"t":"set","p":"payload","pt":"msg","to":"action=Toggle","tot":"str"},{"t":"set","p":"headers","pt":"msg","to":"{\"content-type\":\"application/x-www-form-urlencoded\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":746,"y":412,"wires":[["4a5977f.7edb788","314e84eb.c287ac"]]},{"id":"2b393086.6272e","type":"json","z":"2272ece0.497ba4","name":"","x":407,"y":358,"wires":[["16b8612.36ccb9f"]]},{"id":"da2d7a47.e67738","type":"debug","z":"2272ece0.497ba4","name":"","active":true,"console":"false","complete":"true","x":751,"y":327,"wires":[]},{"id":"af1a6d1a.ba5c6","type":"debug","z":"2272ece0.497ba4","name":"","active":true,"console":"false","complete":"true","x":1290,"y":315,"wires":[]},{"id":"1bf4e50f.af010b","type":"debug","z":"2272ece0.497ba4","name":"","active":true,"console":"false","complete":"false","x":193,"y":311,"wires":[]},{"id":"165f0c20.b35ff4","type":"comment","z":"2272ece0.497ba4","name":"This INJECT node can be used to test the program if you do not have a water sensor","info":"","x":432,"y":218,"wires":[]},{"id":"7d230fb6.95545","type":"comment","z":"2272ece0.497ba4","name":"Add your own Wss URL ","info":"","x":205,"y":437,"wires":[]},{"id":"139d76a1.5cfde9","type":"comment","z":"2272ece0.497ba4","name":"Add your own http URL ","info":"","x":1050,"y":565,"wires":[]},{"id":"c506e85e.757538","type":"comment","z":"2272ece0.497ba4","name":"Action=Toggle will toggle the Appliance module","info":"There are other actions available if you would like to turn OFF or turn ON\nNeeded headers are also set","x":733,"y":468,"wires":[]},{"id":"e4628298.43f74","type":"comment","z":"2272ece0.497ba4","name":"More Info","info":"Test if the sensor has returned WET.","x":581,"y":316,"wires":[]},{"id":"3858e3d9.c0d48c","type":"websocket-client","z":"2272ece0.497ba4","path":"wss://api.jilia.io------CHANGE THIS TO YOURS---","wholemsg":"false"}] |