Code: Select all
[{"id":"8e5a105e.07342","type":"exec","z":"736f96d8.8efd4","command":"piTest -w","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Write","x":870,"y":100,"wires":[["b859e6dc.a7d2a8","71cbe882.c96c18"],[],[]]},{"id":"b859e6dc.a7d2a8","type":"debug","z":"736f96d8.8efd4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1130,"y":88,"wires":[]},{"id":"c19089b3.e78f58","type":"exec","z":"736f96d8.8efd4","command":"piTest -1 -q -r","addpay":true,"append":"","useSpawn":"false","timer":"1","oldrc":false,"name":"Read","x":870,"y":260,"wires":[["fd362a7f.5a8d5","d19977fd.b0fe5"],[],[]]},{"id":"45f4c742.65a65","type":"inject","z":"736f96d8.8efd4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Do_3","payload":"DOutBit_3","payloadType":"str","x":320,"y":240,"wires":[["c19089b3.e78f58"]]},{"id":"fd362a7f.5a8d5","type":"string","z":"736f96d8.8efd4","name":"","methods":[{"name":"toInteger","params":[]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1070,"y":245,"wires":[["99c51a9.cc5b7e8","5abf7277.8cfc44"]]},{"id":"99c51a9.cc5b7e8","type":"debug","z":"736f96d8.8efd4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1290,"y":240,"wires":[]},{"id":"2806e995.28d876","type":"switch","z":"736f96d8.8efd4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":100,"wires":[["e8701f33.94366"],["22ae3cdf.adab34"]]},{"id":"22ae3cdf.adab34","type":"change","z":"736f96d8.8efd4","name":"DOutBit_3,0","rules":[{"t":"set","p":"payload","pt":"msg","to":"DOutBit_3,0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":120,"wires":[["8e5a105e.07342"]]},{"id":"e8701f33.94366","type":"change","z":"736f96d8.8efd4","name":"DOutBit_3,1","rules":[{"t":"set","p":"payload","pt":"msg","to":"DOutBit_3,1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":80,"wires":[["8e5a105e.07342"]]},{"id":"b2bbc32f.3d1548","type":"change","z":"736f96d8.8efd4","name":"Check","rules":[{"t":"set","p":"payload","pt":"msg","to":"DOutBit_3","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"DOutBit_3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":220,"wires":[["c19089b3.e78f58"]]},{"id":"ba0d1d0c.38e498","type":"inject","z":"736f96d8.8efd4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Di_3","payload":"DInBit_3","payloadType":"str","x":310,"y":280,"wires":[["c19089b3.e78f58"]]},{"id":"de6283cc.7ac8c8","type":"comment","z":"736f96d8.8efd4","name":"-----------------Di and Do are wired-------------------","info":"","x":740,"y":40,"wires":[]},{"id":"abed8278.d3bcd","type":"comment","z":"736f96d8.8efd4","name":"Write DOutBit_3","info":"","x":948,"y":200,"wires":[]},{"id":"eed43532.8807e","type":"comment","z":"736f96d8.8efd4","name":"Check DOutBit_3","info":"","x":948,"y":360,"wires":[]},{"id":"5001463e.71dba8","type":"trigger","z":"736f96d8.8efd4","name":"","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"2","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":420,"y":100,"wires":[["2806e995.28d876"]]},{"id":"3da3f614.c47242","type":"inject","z":"736f96d8.8efd4","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":290,"y":100,"wires":[["5001463e.71dba8"]]},{"id":"f90c0f63.12aeb8","type":"exec","z":"736f96d8.8efd4","command":"piTest -1 -q -r","addpay":true,"append":"","useSpawn":"false","timer":"1","oldrc":false,"name":"Read","x":870,"y":420,"wires":[["7e955647.802a3"],[],[]]},{"id":"7e955647.802a3","type":"string","z":"736f96d8.8efd4","name":"","methods":[{"name":"toInteger","params":[]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1070,"y":405,"wires":[["d0506a84.a7fa6","5abf7277.8cfc44"]]},{"id":"d0506a84.a7fa6","type":"debug","z":"736f96d8.8efd4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1310,"y":400,"wires":[]},{"id":"6d0ab698.540c78","type":"change","z":"736f96d8.8efd4","name":"Check","rules":[{"t":"set","p":"payload","pt":"msg","to":"DInBit_3","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"DInBit_3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":420,"wires":[["f90c0f63.12aeb8"]]},{"id":"5abf7277.8cfc44","type":"join","z":"736f96d8.8efd4","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1210,"y":320,"wires":[["5b60d555.c41f44"]]},{"id":"d19977fd.b0fe5","type":"delay","z":"736f96d8.8efd4","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":690,"y":360,"wires":[["6d0ab698.540c78"]]},{"id":"5b60d555.c41f44","type":"debug","z":"736f96d8.8efd4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1350,"y":320,"wires":[]},{"id":"71cbe882.c96c18","type":"delay","z":"736f96d8.8efd4","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":690,"y":180,"wires":[["b2bbc32f.3d1548"]]}]