[{"id":"ee922008.d6158","type":"tab","label":"云台控制","disabled":false,"info":""},{"id":"c04c8b41.ae7c08","type":"inject","z":"ee922008.d6158","name":"左转关","topic":"","payload":"1-0","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":191,"y":250,"wires":[["e68a0401.621f18"]]},{"id":"10a4d2f8.f284ad","type":"inject","z":"ee922008.d6158","name":"左转开","topic":"","payload":"1-1","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":191,"y":290,"wires":[["e68a0401.621f18"]]},{"id":"7695e94d.851b18","type":"inject","z":"ee922008.d6158","name":"停止关","topic":"","payload":"2-0","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":191,"y":350,"wires":[["e68a0401.621f18"]]},{"id":"b071d5ac.d14858","type":"inject","z":"ee922008.d6158","name":"停止开","topic":"","payload":"2-1","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":191,"y":390,"wires":[["e68a0401.621f18"]]},{"id":"46434f02.07de2","type":"inject","z":"ee922008.d6158","name":"右转关","topic":"","payload":"3-0","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":191,"y":450,"wires":[["e68a0401.621f18"]]},{"id":"a06d6cad.1eaca","type":"inject","z":"ee922008.d6158","name":"右转开","topic":"","payload":"3-1","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":191,"y":490,"wires":[["e68a0401.621f18"]]},{"id":"e68a0401.621f18","type":"switch","z":"ee922008.d6158","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1-1","vt":"str"},{"t":"eq","v":"1-0","vt":"str"},{"t":"eq","v":"2-1","vt":"str"},{"t":"eq","v":"2-0","vt":"str"},{"t":"eq","v":"3-1","vt":"str"},{"t":"eq","v":"3-0","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":432,"y":337,"wires":[["e21cfa79.194fe8","7b9100b6.8fee9"],["7b9100b6.8fee9"],["335fb401.299a2c"],["48e0d1eb.95683"],["f0ddbb5c.8b26e8","b7b2e94b.b3a6f8"],["b7b2e94b.b3a6f8"]]},{"id":"c61eab02.2da318","type":"function","z":"ee922008.d6158","name":"左转开","func":"msg.payload = new Buffer([0xFF,0x01,0x00,0x04,0x3F,0x00,0x44]);\nreturn msg;","outputs":1,"noerr":0,"x":805,"y":294,"wires":[["29472a57.11cfd6"]]},{"id":"7b9100b6.8fee9","type":"function","z":"ee922008.d6158","name":"左转关","func":"msg.payload = new Buffer([0xFF,0x01,0x00,0x00,0x00,0x00,0x01 ]);\nreturn msg;","outputs":1,"noerr":0,"x":805,"y":254,"wires":[["29472a57.11cfd6"]]},{"id":"48e0d1eb.95683","type":"function","z":"ee922008.d6158","name":"停止开","func":"msg.payload = new Buffer([0xFF,0x01,0x00,0x00,0x00,0x00,0x01 ]);\nreturn msg;","outputs":1,"noerr":0,"x":805,"y":394,"wires":[["29472a57.11cfd6"]]},{"id":"335fb401.299a2c","type":"function","z":"ee922008.d6158","name":"停止关","func":"msg.payload = new Buffer([0xFF,0x01,0x00,0x00,0x00,0x00,0x01 ]);\nreturn msg;","outputs":1,"noerr":0,"x":805,"y":354,"wires":[["29472a57.11cfd6"]]},{"id":"2158f8b6.ade818","type":"function","z":"ee922008.d6158","name":"右转开","func":"msg.payload = new Buffer([0xFF,0x01,0x00,0x02,0x20,0x00,0x23]);\nreturn msg;","outputs":1,"noerr":0,"x":805,"y":494,"wires":[["29472a57.11cfd6"]]},{"id":"b7b2e94b.b3a6f8","type":"function","z":"ee922008.d6158","name":"右转关","func":"msg.payload = new Buffer([0xFF,0x01,0x00,0x00,0x00,0x00,0x01 ]);\nreturn msg;","outputs":1,"noerr":0,"x":804,"y":441,"wires":[["29472a57.11cfd6"]]},{"id":"a14d226f.ada47","type":"mqtt in","z":"ee922008.d6158","name":"","topic":"cmnd/485/POWER","qos":"0","datatype":"auto","broker":"ace9fb1d.26f248","x":169,"y":148,"wires":[["e68a0401.621f18","9d3d8316.c8c01"]]},{"id":"6508ece8.895034","type":"function","z":"ee922008.d6158","name":"","func":"msg.payload = msg.payload[6]\nreturn msg;","outputs":1,"noerr":0,"x":339,"y":671,"wires":[["1b9189c0.8cb886","9f6723ce.067b9"]]},{"id":"1b9189c0.8cb886","type":"switch","z":"ee922008.d6158","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"68","vt":"num"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"35","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":542,"y":671,"wires":[["61f9663f.5e7ee8"],["61c29b10.69a264"],["37cb9f36.8a801"],["c0e91a77.d43618"],["629e4f2c.16c54"],["bcff6c3d.53d11"]]},{"id":"61f9663f.5e7ee8","type":"change","z":"ee922008.d6158","name":"返回左转开状态","rules":[{"t":"set","p":"payload","pt":"msg","to":"1-1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":817,"y":579,"wires":[["cce87743.f95dd8"]]},{"id":"61c29b10.69a264","type":"change","z":"ee922008.d6158","name":"返回左转关状态","rules":[{"t":"set","p":"payload","pt":"msg","to":"1-0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":816,"y":615,"wires":[["cce87743.f95dd8"]]},{"id":"cce87743.f95dd8","type":"mqtt out","z":"ee922008.d6158","name":"","topic":"stat/485/POWER","qos":"0","retain":"true","broker":"ace9fb1d.26f248","x":1195,"y":674,"wires":[]},{"id":"37cb9f36.8a801","type":"change","z":"ee922008.d6158","name":"返回停止开状态","rules":[{"t":"set","p":"payload","pt":"msg","to":"2-1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":816,"y":655,"wires":[["cce87743.f95dd8"]]},{"id":"c0e91a77.d43618","type":"change","z":"ee922008.d6158","name":"返回停止关状态","rules":[{"t":"set","p":"payload","pt":"msg","to":"2-0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":816,"y":695,"wires":[["cce87743.f95dd8"]]},{"id":"629e4f2c.16c54","type":"change","z":"ee922008.d6158","name":"返回右转开状态","rules":[{"t":"set","p":"payload","pt":"msg","to":"3-1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":815,"y":735,"wires":[["cce87743.f95dd8"]]},{"id":"bcff6c3d.53d11","type":"change","z":"ee922008.d6158","name":"返回右转关状态","rules":[{"t":"set","p":"payload","pt":"msg","to":"3-0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":815,"y":775,"wires":[["cce87743.f95dd8"]]},{"id":"e21cfa79.194fe8","type":"delay","z":"ee922008.d6158","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":626.5,"y":220,"wires":[["c61eab02.2da318"]]},{"id":"f0ddbb5c.8b26e8","type":"delay","z":"ee922008.d6158","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":606.5,"y":468,"wires":[["2158f8b6.ade818"]]},{"id":"89685537.c8d238","type":"debug","z":"ee922008.d6158","name":"接口返回","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":359,"y":535,"wires":[]},{"id":"9f6723ce.067b9","type":"debug","z":"ee922008.d6158","name":"函数输出数字","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","x":559,"y":535,"wires":[]},{"id":"9d3d8316.c8c01","type":"debug","z":"ee922008.d6158","name":"MQTT","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":500,"y":99,"wires":[]},{"id":"e1f9beab.24a1f","type":"tcp in","z":"ee922008.d6158","name":"","server":"client","host":"192.168.2.252","port":"9999","datamode":"stream","datatype":"buffer","newline":"","topic":"","base64":false,"x":141,"y":673,"wires":[["6508ece8.895034","89685537.c8d238"]]},{"id":"29472a57.11cfd6","type":"tcp out","z":"ee922008.d6158","host":"192.168.2.253","port":"9999","beserver":"server","base64":false,"end":false,"name":"Tcp_Server","x":1250,"y":386,"wires":[]},{"id":"ace9fb1d.26f248","type":"mqtt-broker","z":"","name":"","broker":"192.168.2.253","port":"1883","clientid":"node-red","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]