Uploaded by zdedwflncbgbuucteg

NODE RELAY

advertisement
[{"id":"6bf3701b.46e61","type":"tab","label":"Flow
1","disabled":false,"info":""},{"id":"63f7a0e9.b1c03","type":"rpi-gpio
out","z":"6bf3701b.46e61","name":"RELAY1","pin":"3","set":true,"level":"1","freq":"","out":"out","x
":620,"y":220,"wires":[]},{"id":"406d6630.97a218","type":"http
in","z":"6bf3701b.46e61","name":"","url":"/RELAY/on1","method":"get","upload":false,"swaggerDo
c":"","x":180,"y":180,"wires":[["9e75714d.6e1998","439ce486.b98414"]]},{"id":"462e3c9f.6e2f44","t
ype":"http
in","z":"6bf3701b.46e61","name":"","url":"/RELAY/on2","method":"get","upload":false,"swaggerDo
c":"","x":180,"y":280,"wires":[["9e75714d.6e1998","439ce486.b98414"]]},{"id":"9e75714d.6e1998",
"type":"function","z":"6bf3701b.46e61","name":"RELAYS ON-OFF","func":"var T = msg.req.url;\nvar
var1 = null;\nvar var2 = null;\nvar var3 = null;\nvar var4 = null;\n\nswitch(T)\n{\n case
\"/RELAY/on1\":\n
var1 = {payload: 0};\n
break;\n case \"/RELAY/off1\":\n
var1 =
{payload: 1};\n
break;\n case \"/RELAY/on2\":\n
var2 = {payload: 0};\n
break;\n case
\"/RELAY/off2\":\n
var2 = {payload: 1};\n
break;\n case \"/RELAY/on3\":\n
var3 =
{payload: 0};\n
break;\n case \"/RELAY/off3\":\n
var3 = {payload: 1};\n
break;\n case
\"/RELAY/on4\":\n
var4 = {payload: 0};\n
break;\n case \"/RELAY/off4\":\n
var4 =
{payload: 1};\n
break;\n}\nreturn [var1, var2, var3,
var4];\n\n\n\n\n","outputs":4,"noerr":0,"x":430,"y":320,"wires":[["63f7a0e9.b1c03"],["9e9458b8.c3
8f28"],["a2212f02.249dd"],["7d793759.789d68"]]},{"id":"b466756d.52f538","type":"http
in","z":"6bf3701b.46e61","name":"","url":"/RELAY/off1","method":"get","upload":false,"swaggerDo
c":"","x":180,"y":220,"wires":[["9e75714d.6e1998","439ce486.b98414"]]},{"id":"f4a5de1.332b9a","t
ype":"http
in","z":"6bf3701b.46e61","name":"","url":"/RELAY/off2","method":"get","upload":false,"swaggerDo
c":"","x":180,"y":320,"wires":[["9e75714d.6e1998","439ce486.b98414"]]},{"id":"c6e63dd6.3f763","t
ype":"http
in","z":"6bf3701b.46e61","name":"","url":"/RELAY/on3","method":"get","upload":false,"swaggerDo
c":"","x":180,"y":380,"wires":[["9e75714d.6e1998","439ce486.b98414"]]},{"id":"21f00d16.9e38ca","
type":"http
in","z":"6bf3701b.46e61","name":"","url":"/RELAY/off3","method":"get","upload":false,"swaggerDo
c":"","x":180,"y":420,"wires":[["9e75714d.6e1998","439ce486.b98414"]]},{"id":"33f862ba.0b881e","
type":"http
in","z":"6bf3701b.46e61","name":"","url":"/RELAY/on4","method":"get","upload":false,"swaggerDo
c":"","x":180,"y":480,"wires":[["9e75714d.6e1998","439ce486.b98414"]]},{"id":"6802cd5f.f3edd4","
type":"http
in","z":"6bf3701b.46e61","name":"","url":"/RELAY/off4","method":"get","upload":false,"swaggerDo
c":"","x":180,"y":520,"wires":[["9e75714d.6e1998","439ce486.b98414"]]},{"id":"9e9458b8.c38f28","
type":"rpi-gpio
out","z":"6bf3701b.46e61","name":"RELAY2","pin":"5","set":true,"level":"1","freq":"","out":"out","x
":640,"y":280,"wires":[]},{"id":"a2212f02.249dd","type":"rpi-gpio
out","z":"6bf3701b.46e61","name":"RELAY3","pin":"7","set":true,"level":"1","freq":"","out":"out","x
":620,"y":340,"wires":[]},{"id":"7d793759.789d68","type":"rpi-gpio
out","z":"6bf3701b.46e61","name":"RELAY4","pin":"11","set":true,"level":"1","freq":"","out":"out","
x":620,"y":400,"wires":[]},{"id":"439ce486.b98414","type":"http
response","z":"6bf3701b.46e61","name":"","statusCode":"","headers":{},"x":430,"y":460,"wires":[]}]
Download