-
Notifications
You must be signed in to change notification settings - Fork 5
/
PTZ_CAMERA_2_v2.json
1 lines (1 loc) · 33.8 KB
/
PTZ_CAMERA_2_v2.json
1
[{"id":"44f70637.039dd8","type":"inject","z":"2057e882.e0d458","name":"store global PTZ variables","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":300,"y":60,"wires":[["c25a2ae2.45eaa8"]]},{"id":"ad4ba0f4.9c761","type":"udp out","z":"2057e882.e0d458","name":"CAM2","addr":"192.168.0.200","iface":"","port":"52381","ipv":"udp4","outport":"5250","base64":false,"multicast":"false","x":2410,"y":1060,"wires":[]},{"id":"937df734.c31308","type":"function","z":"2057e882.e0d458","name":"Recall Preset 1","func":"msg.payload = flow.get(\"recall_preset_1\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":160,"wires":[["c8115e35.7d835"]]},{"id":"c8115e35.7d835","type":"function","z":"2057e882.e0d458","name":"format with init message","func":"var m = [];\n\nm[0] = { payload: flow.get(\"ptz_init\") };\n\nm[1] = { payload: msg.payload };\n\nreturn m;","outputs":2,"noerr":0,"x":2150,"y":1060,"wires":[["ad4ba0f4.9c761"],["ad4ba0f4.9c761"]]},{"id":"c25a2ae2.45eaa8","type":"function","z":"2057e882.e0d458","name":"FLOW PTZ CONTROL VARIABLES","func":"flow.set(\"ptz_init\", Buffer.from('020000010000000001', 'hex'));\n\nflow.set(\"recall_preset_1\", Buffer.from('01000007000000648101043f0200ff', 'hex'));\nflow.set(\"recall_preset_2\", Buffer.from('01000007000000648101043f0201ff', 'hex'));\nflow.set(\"recall_preset_3\", Buffer.from('01000007000000648101043f0202ff', 'hex'));\nflow.set(\"recall_preset_4\", Buffer.from('01000007000000648101043f0203ff', 'hex'));\nflow.set(\"recall_preset_5\", Buffer.from('01000007000000648101043f0204ff', 'hex'));\nflow.set(\"recall_preset_6\", Buffer.from('01000007000000648101043f0205ff', 'hex'));\n\nflow.set(\"save_preset_1\", Buffer.from('01000007000000108101043f0100ff', 'hex'));\nflow.set(\"save_preset_2\", Buffer.from('01000007000000108101043f0101ff', 'hex'));\nflow.set(\"save_preset_3\", Buffer.from('01000007000000108101043f0102ff', 'hex'));\nflow.set(\"save_preset_4\", Buffer.from('01000007000000108101043f0103ff', 'hex'));\nflow.set(\"save_preset_5\", Buffer.from('01000007000000108101043f0104ff', 'hex'));\nflow.set(\"save_preset_6\", Buffer.from('01000007000000108101043f0105ff', 'hex'));\n\nflow.set('ptz_on', Buffer.from('010000060000000c8101040002ff', 'hex'));\nflow.set('ptz_off', Buffer.from('010000060000000c8101040003ff', 'hex'));\n\nflow.set('ptz_up_left', Buffer.from('0100000900000099810106010c080101ff', 'hex'));\nflow.set('ptz_up', Buffer.from('010000090000009b810106010c080301ff', 'hex'));\nflow.set('ptz_up_right', Buffer.from('010000090000009d810106010c080201ff', 'hex'));\nflow.set('ptz_left', Buffer.from('01000009000000a3810106010c080103ff', 'hex'));\nflow.set('ptz_right', Buffer.from('01000009000000a5810106010c080203ff', 'hex'));\nflow.set('ptz_down_left', Buffer.from('01000009000000a7810106010c080102ff', 'hex'));\nflow.set('ptz_down', Buffer.from('01000009000000a9810106010c080302ff', 'hex'));\nflow.set('ptz_down_right', Buffer.from('01000009000000ab810106010c080202ff', 'hex'));\nflow.set('ptz_stop', Buffer.from('01000009000000ac810106010c080303ff', 'hex'));\n\nflow.set('ptz_zoom_in', Buffer.from('01000006000000b78101040723ff', 'hex'));\nflow.set('ptz_zoom_out', Buffer.from('01000006000000b98101040733ff', 'hex'));\nflow.set('ptz_zoom_stop', Buffer.from('01000006000000ba8101040700ff', 'hex'));\n\nflow.set('ptz_iris_up', Buffer.from('01000006000003148101040b02ff', 'hex'));\nflow.set('ptz_iris_down', Buffer.from('01000006000003168101040b03ff', 'hex'));\nflow.set('ptz_shutter_up', Buffer.from('01000006000003148101040a02ff', 'hex'));\nflow.set('ptz_shutter_down', Buffer.from('01000006000003168101040a03ff', 'hex'));\nflow.set('ptz_gain_up', Buffer.from('01000006000003148101040c02ff', 'hex'));\nflow.set('ptz_gain_down', Buffer.from('01000006000003168101040c03ff', 'hex'));\nflow.set('ptz_iris_priority', Buffer.from('0100000600000009810104390Bff', 'hex'));\nflow.set('ptz_shutter_priority', Buffer.from('0100000600000009810104390Aff', 'hex'));\nflow.set('ptz_bright_mode', Buffer.from('0100000600000009810104390Dff', 'hex'));\nflow.set('ptz_bright_up', Buffer.from('01000006000000098101040D02ff', 'hex'));\nflow.set('ptz_bright_down', Buffer.from('01000006000000098101040D03ff', 'hex'));\nflow.set('ptz_awb', Buffer.from('01000006000003148101043500ff', 'hex'));\nflow.set('ptz_onetouch_wb', Buffer.from('01000006000003148101043503ff', 'hex'));\nflow.set('ptz_onetouch_wb_trigger', Buffer.from('01000006000003148101041005ff', 'hex')); \nflow.set('ptz_manual_wb', Buffer.from('01000006000003148101043505ff', 'hex'));\nflow.set('ptz_full_auto', Buffer.from('01000006000000098101043900ff', 'hex'));\nflow.set('ptz_manual_exposure', Buffer.from('01000006000003168101043903ff', 'hex'));\nflow.set('ptz_fx_off', Buffer.from('01000006000003148101046300ff', 'hex'));\nflow.set('ptz_fx_neg', Buffer.from('01000006000000098101046302ff', 'hex'));\nflow.set('ptz_fx_bw', Buffer.from('01000006000003168101046304ff', 'hex'));\n\nflow.set('ptz_onscreen_on', Buffer.from('010000060000000c81017e011802ff', 'hex'));\nflow.set('ptz_onscreen_off', Buffer.from('010000060000000c81017e011803ff', 'hex'));\n\nflow.set('ptz_up_left_flag', 0);\nflow.set('ptz_up_flag', 0);\nflow.set('ptz_up_right_flag', 0);\nflow.set('ptz_left_flag', 0);\nflow.set('ptz_right_flag', 0);\nflow.set('ptz_down_left_flag', 0);\nflow.set('ptz_down_flag', 0);\nflow.set('ptz_down_right_flag', 0);\n\nflow.set('ptz_zoom_in_flag', 0);\nflow.set('ptz_zoom_out_flag', 0);\n","outputs":1,"noerr":0,"x":610,"y":60,"wires":[[]]},{"id":"8e561ae7.627348","type":"ui_button","z":"2057e882.e0d458","name":"Recall Preset 1","group":"46fe4902.f25ed8","order":0,"width":0,"height":0,"passthru":false,"label":"Recall Preset 1","color":"#FFFFFF","bgcolor":"green","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":160,"wires":[["937df734.c31308"]]},{"id":"38daab48.070054","type":"function","z":"2057e882.e0d458","name":"Recall Preset 2","func":"msg.payload = flow.get(\"recall_preset_2\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":240,"wires":[["c8115e35.7d835"]]},{"id":"54c5e743.93a1e8","type":"ui_button","z":"2057e882.e0d458","name":"Recall Preset 2","group":"46fe4902.f25ed8","order":0,"width":0,"height":0,"passthru":false,"label":"Recall Preset 2","color":"#FFFFFF","bgcolor":"green","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":240,"wires":[["38daab48.070054"]]},{"id":"4f952fa5.b77c3","type":"function","z":"2057e882.e0d458","name":"Recall Preset 3","func":"msg.payload = flow.get(\"recall_preset_3\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":320,"wires":[["c8115e35.7d835"]]},{"id":"10cb0559.96c05b","type":"ui_button","z":"2057e882.e0d458","name":"Recall Preset 3","group":"46fe4902.f25ed8","order":0,"width":0,"height":0,"passthru":false,"label":"Recall Preset 3","color":"#FFFFFF","bgcolor":"green","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":320,"wires":[["4f952fa5.b77c3"]]},{"id":"f7c38098.34718","type":"function","z":"2057e882.e0d458","name":"Recall Preset 4","func":"msg.payload = flow.get(\"recall_preset_4\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":400,"wires":[["c8115e35.7d835"]]},{"id":"f428040f.33fba8","type":"ui_button","z":"2057e882.e0d458","name":"Recall Preset 4","group":"46fe4902.f25ed8","order":0,"width":0,"height":0,"passthru":false,"label":"Recall Preset 4","color":"#FFFFFF","bgcolor":"green","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":400,"wires":[["f7c38098.34718"]]},{"id":"db7791b9.958f7","type":"function","z":"2057e882.e0d458","name":"Recall Preset 5","func":"msg.payload = flow.get(\"recall_preset_5\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":480,"wires":[["c8115e35.7d835"]]},{"id":"1aed05e7.4a068a","type":"ui_button","z":"2057e882.e0d458","name":"Recall Preset 5","group":"46fe4902.f25ed8","order":0,"width":0,"height":0,"passthru":false,"label":"Recall Preset 5","color":"#FFFFFF","bgcolor":"green","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":480,"wires":[["db7791b9.958f7"]]},{"id":"4b7d8618.eb2e38","type":"function","z":"2057e882.e0d458","name":"Recall Preset 6","func":"msg.payload = flow.get(\"recall_preset_6\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":560,"wires":[["c8115e35.7d835"]]},{"id":"3c6de40b.6df41c","type":"ui_button","z":"2057e882.e0d458","name":"Recall Preset 6","group":"46fe4902.f25ed8","order":0,"width":0,"height":0,"passthru":false,"label":"Recall Preset 6","color":"#FFFFFF","bgcolor":"green","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":560,"wires":[["4b7d8618.eb2e38"]]},{"id":"bd36af84.be39d","type":"function","z":"2057e882.e0d458","name":"Save Preset 1","func":"msg.payload = flow.get(\"save_preset_1\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":120,"wires":[["c8115e35.7d835"]]},{"id":"e3f4c138.d2724","type":"ui_button","z":"2057e882.e0d458","name":"Save Preset 1","group":"ae526e18.5ea7","order":0,"width":0,"height":0,"passthru":false,"label":"Save Preset 1","color":"#FFFFFF","bgcolor":"red","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":120,"wires":[["bd36af84.be39d"]]},{"id":"bbec6359.e833a","type":"function","z":"2057e882.e0d458","name":"Save Preset 2","func":"msg.payload = flow.get(\"save_preset_2\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":200,"wires":[["c8115e35.7d835"]]},{"id":"2d305764.729ca8","type":"ui_button","z":"2057e882.e0d458","name":"Save Preset 2","group":"ae526e18.5ea7","order":0,"width":0,"height":0,"passthru":false,"label":"Save Preset 2","color":"#FFFFFF","bgcolor":"red","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":200,"wires":[["bbec6359.e833a"]]},{"id":"a8fdbbb.b9b8d48","type":"function","z":"2057e882.e0d458","name":"Save Preset 3","func":"msg.payload = flow.get(\"save_preset_3\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":280,"wires":[["c8115e35.7d835"]]},{"id":"70502d2a.302944","type":"ui_button","z":"2057e882.e0d458","name":"Save Preset 3","group":"ae526e18.5ea7","order":0,"width":0,"height":0,"passthru":false,"label":"Save Preset 3","color":"#FFFFFF","bgcolor":"red","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":280,"wires":[["a8fdbbb.b9b8d48"]]},{"id":"8464b3c9.6c79e","type":"function","z":"2057e882.e0d458","name":"Save Preset 4","func":"msg.payload = flow.get(\"save_preset_4\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":360,"wires":[["c8115e35.7d835"]]},{"id":"a1c940e7.88b83","type":"ui_button","z":"2057e882.e0d458","name":"Save Preset 4","group":"ae526e18.5ea7","order":0,"width":0,"height":0,"passthru":false,"label":"Save Preset 4","color":"#FFFFFF","bgcolor":"red","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":360,"wires":[["8464b3c9.6c79e"]]},{"id":"1b358005.4ccb5","type":"function","z":"2057e882.e0d458","name":"Save Preset 5","func":"msg.payload = flow.get(\"save_preset_5\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":440,"wires":[["c8115e35.7d835"]]},{"id":"ca376d3.2b6c29","type":"ui_button","z":"2057e882.e0d458","name":"Save Preset 5","group":"ae526e18.5ea7","order":0,"width":0,"height":0,"passthru":false,"label":"Save Preset 5","color":"#FFFFFF","bgcolor":"red","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":440,"wires":[["1b358005.4ccb5"]]},{"id":"a9739051.1ff26","type":"function","z":"2057e882.e0d458","name":"Save Preset 6","func":"msg.payload = flow.get(\"save_preset_6\");\n\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":520,"wires":[["c8115e35.7d835"]]},{"id":"cf92ad70.c7e71","type":"ui_button","z":"2057e882.e0d458","name":"Save Preset 6","group":"ae526e18.5ea7","order":0,"width":0,"height":0,"passthru":false,"label":"Save Preset 6","color":"#FFFFFF","bgcolor":"red","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":520,"wires":[["a9739051.1ff26"]]},{"id":"22deeffd.de696","type":"ui_switch","z":"2057e882.e0d458","name":"PTZ On/Off","label":"Power ON/OFF","group":"c6a9c771.0a3ef8","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":910,"y":60,"wires":[["7c1c4fc8.3296b"]]},{"id":"7c1c4fc8.3296b","type":"function","z":"2057e882.e0d458","name":"Power On/Off","func":"var power_msg = {};\nif(msg.payload){\n power_msg = { payload: flow.get(\"ptz_on\")};\n}\nelse {\n power_msg = { payload: flow.get(\"ptz_off\")};\n}\n\nreturn power_msg;","outputs":1,"noerr":0,"x":1140,"y":60,"wires":[["c8115e35.7d835"]]},{"id":"e8bfa8e.b151258","type":"function","z":"2057e882.e0d458","name":"UP-LEFT","func":"var flag = flow.get(\"ptz_up_left_flag\");\nif(flag===0){\n msg.payload = flow.get(\"ptz_up_left\");\n flow.set(\"ptz_up_left_flag\", 1);\n}\nelse {\n msg.payload = flow.get(\"ptz_stop\");\n flow.set(\"ptz_up_left_flag\", 0);\n}\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":620,"wires":[["c8115e35.7d835"]]},{"id":"ee774549.3f0e88","type":"ui_button","z":"2057e882.e0d458","name":"UP-LEFT","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"UP-LEFT","color":"#FFFFFF","bgcolor":"orange","icon":"","payload":"1","payloadType":"num","topic":"","x":400,"y":620,"wires":[["e8bfa8e.b151258"]]},{"id":"d4b620d2.4d433","type":"function","z":"2057e882.e0d458","name":"UP","func":"var flag = flow.get(\"ptz_up_flag\");\nif(flag===0){\n msg.payload = flow.get(\"ptz_up\");\n flow.set(\"ptz_up_flag\", 1);\n}\nelse {\n msg.payload = flow.get(\"ptz_stop\");\n flow.set(\"ptz_up_flag\", 0);\n}\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":660,"wires":[["c8115e35.7d835"]]},{"id":"8817e7c0.583178","type":"ui_button","z":"2057e882.e0d458","name":"UP","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"UP","color":"#FFFFFF","bgcolor":"orange","icon":"","payload":"1","payloadType":"num","topic":"","x":390,"y":660,"wires":[["d4b620d2.4d433"]]},{"id":"e5bcb7a5.533878","type":"function","z":"2057e882.e0d458","name":"UP-RIGHT","func":"var flag = flow.get(\"ptz_up_right_flag\");\nif(flag===0){\n msg.payload = flow.get(\"ptz_up_right\");\n flow.set(\"ptz_up_right_flag\", 1);\n}\nelse {\n msg.payload = flow.get(\"ptz_stop\");\n flow.set(\"ptz_up_right_flag\", 0);\n}\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":700,"wires":[["c8115e35.7d835"]]},{"id":"67ea7de2.2e4444","type":"ui_button","z":"2057e882.e0d458","name":"UP-RIGHT","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"UP-RIGHT","color":"#FFFFFF","bgcolor":"orange","icon":"","payload":"1","payloadType":"num","topic":"","x":410,"y":700,"wires":[["e5bcb7a5.533878"]]},{"id":"c980058d.0e8988","type":"function","z":"2057e882.e0d458","name":"LEFT","func":"var flag = flow.get(\"ptz_left_flag\");\nif(flag===0){\n msg.payload = flow.get(\"ptz_left\");\n flow.set(\"ptz_left_flag\", 1);\n}\nelse {\n msg.payload = flow.get(\"ptz_stop\");\n flow.set(\"ptz_left_flag\", 0);\n}\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":740,"wires":[["c8115e35.7d835"]]},{"id":"900ba4e5.d88f78","type":"ui_button","z":"2057e882.e0d458","name":"LEFT","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"LEFT","color":"#FFFFFF","bgcolor":"orange","icon":"","payload":"1","payloadType":"num","topic":"","x":390,"y":740,"wires":[["c980058d.0e8988"]]},{"id":"161b719b.df77ce","type":"function","z":"2057e882.e0d458","name":"RIGHT","func":"var flag = flow.get(\"ptz_right_flag\");\nif(flag===0){\n msg.payload = flow.get(\"ptz_right\");\n flow.set(\"ptz_right_flag\", 1);\n}\nelse {\n msg.payload = flow.get(\"ptz_stop\");\n flow.set(\"ptz_right_flag\", 0);\n}\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":780,"wires":[["c8115e35.7d835"]]},{"id":"13eced26.f12cb3","type":"ui_button","z":"2057e882.e0d458","name":"RIGHT","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"RIGHT","color":"#FFFFFF","bgcolor":"orange","icon":"","payload":"1","payloadType":"num","topic":"","x":390,"y":780,"wires":[["161b719b.df77ce"]]},{"id":"6cb0555f.cfbd0c","type":"function","z":"2057e882.e0d458","name":"DOWN-LEFT","func":"var flag = flow.get(\"ptz_down_left_flag\");\nif(flag===0){\n msg.payload = flow.get(\"ptz_down_left\");\n flow.set(\"ptz_down_left_flag\", 1);\n}\nelse {\n msg.payload = flow.get(\"ptz_stop\");\n flow.set(\"ptz_down_left_flag\", 0);\n}\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":820,"wires":[["c8115e35.7d835"]]},{"id":"bd3f31b9.120eb","type":"ui_button","z":"2057e882.e0d458","name":"DOWN-LEFT","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"DOWN-LEFT","color":"#FFFFFF","bgcolor":"orange","icon":"","payload":"1","payloadType":"num","topic":"","x":410,"y":820,"wires":[["6cb0555f.cfbd0c"]]},{"id":"1c525a7.9c937a6","type":"function","z":"2057e882.e0d458","name":"DOWN","func":"var flag = flow.get(\"ptz_down_flag\");\nif(flag===0){\n msg.payload = flow.get(\"ptz_down\");\n flow.set(\"ptz_down_flag\", 1);\n}\nelse {\n msg.payload = flow.get(\"ptz_stop\");\n flow.set(\"ptz_down_flag\", 0);\n}\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":860,"wires":[["c8115e35.7d835"]]},{"id":"c83daef5.2ad7","type":"ui_button","z":"2057e882.e0d458","name":"DOWN","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"DOWN","color":"#FFFFFF","bgcolor":"orange","icon":"","payload":"1","payloadType":"num","topic":"","x":400,"y":860,"wires":[["1c525a7.9c937a6"]]},{"id":"1fff802b.099b9","type":"function","z":"2057e882.e0d458","name":"DOWN-RIGHT","func":"var flag = flow.get(\"ptz_down_right_flag\");\nif(flag===0){\n msg.payload = flow.get(\"ptz_down_right\");\n flow.set(\"ptz_down_right_flag\", 1);\n}\nelse {\n msg.payload = flow.get(\"ptz_stop\");\n flow.set(\"ptz_down_right_flag\", 0);\n}\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":900,"wires":[["c8115e35.7d835"]]},{"id":"63b93ff5.14fe5","type":"ui_button","z":"2057e882.e0d458","name":"DOWN-RIGHT","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"DOWN-RIGHT","color":"#FFFFFF","bgcolor":"orange","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":900,"wires":[["1fff802b.099b9"]]},{"id":"30f16c2a.cf2014","type":"function","z":"2057e882.e0d458","name":"STOP","func":"msg.payload = flow.get(\"ptz_stop\");\nflow.set(\"ptz_down_right_flag\", 0);\nflow.set(\"ptz_down_left_flag\", 0);\nflow.set(\"ptz_down_flag\", 0);\nflow.set(\"ptz_right_flag\", 0);\nflow.set(\"ptz_left_flag\", 0);\nflow.set(\"ptz_up_right_flag\", 0);\nflow.set(\"ptz_up_left_flag\", 0);\nflow.set(\"ptz_up_flag\", 0);\n\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":960,"wires":[["c8115e35.7d835"]]},{"id":"41f1ad16.13ea94","type":"ui_button","z":"2057e882.e0d458","name":"STOP","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"STOP","color":"#FFFFFF","bgcolor":"red","icon":"","payload":"1","payloadType":"num","topic":"","x":390,"y":960,"wires":[["30f16c2a.cf2014"]]},{"id":"8f5b92ef.2ac81","type":"function","z":"2057e882.e0d458","name":"ZOOM-IN","func":"var flag = flow.get(\"ptz_zoom_in_flag\");\nif(flag===0){\n msg.payload = flow.get(\"ptz_zoom_in\");\n flow.set(\"ptz_zoom_in_flag\", 1);\n}\nelse {\n msg.payload = flow.get(\"ptz_zoom_stop\");\n flow.set(\"ptz_zoom_in_flag\", 0);\n}\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":1000,"wires":[["c8115e35.7d835"]]},{"id":"44233c12.e73df4","type":"ui_button","z":"2057e882.e0d458","name":"ZOOM-IN","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"ZOOM-IN","color":"#FFFFFF","bgcolor":"blue","icon":"","payload":"1","payloadType":"num","topic":"","x":400,"y":1000,"wires":[["8f5b92ef.2ac81"]]},{"id":"9befcc32.39042","type":"function","z":"2057e882.e0d458","name":"ZOOM-OUT","func":"var flag = flow.get(\"ptz_zoom_out_flag\");\nif(flag===0){\n msg.payload = flow.get(\"ptz_zoom_out\");\n flow.set(\"ptz_zoom_out_flag\", 1);\n}\nelse {\n msg.payload = flow.get(\"ptz_zoom_stop\");\n flow.set(\"ptz_zoom_out_flag\", 0);\n}\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":1040,"wires":[["c8115e35.7d835"]]},{"id":"82212f49.437d7","type":"ui_button","z":"2057e882.e0d458","name":"ZOOM-OUT","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"ZOOM-OUT","color":"#FFFFFF","bgcolor":"blue","icon":"","payload":"1","payloadType":"num","topic":"","x":410,"y":1040,"wires":[["9befcc32.39042"]]},{"id":"d2850c2d.5dbab","type":"function","z":"2057e882.e0d458","name":"STOP ZOOM","func":"msg.payload = flow.get(\"ptz_zoom_stop\");\nflow.set(\"ptz_zoom_in_flag\", 0);\nflow.set(\"ptz_zoom_out_flag\", 0);\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":1080,"wires":[["c8115e35.7d835"]]},{"id":"abf09e51.5abcf","type":"ui_button","z":"2057e882.e0d458","name":"STOP ZOOM","group":"684a12df.665b0c","order":0,"width":0,"height":0,"passthru":false,"label":"STOP ZOOM","color":"#FFFFFF","bgcolor":"red","icon":"","payload":"1","payloadType":"num","topic":"","x":420,"y":1080,"wires":[["d2850c2d.5dbab"]]},{"id":"8f2ebc75.f9ad4","type":"ui_switch","z":"2057e882.e0d458","name":"Menu Display On/Off","label":"Menu Display ON/OFF","group":"c6a9c771.0a3ef8","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":940,"y":100,"wires":[["4586f548.fb494c"]]},{"id":"4586f548.fb494c","type":"function","z":"2057e882.e0d458","name":"Menu Display ON/OFF","func":"var menu_msg = {};\nif(msg.payload){\n menu_msg = { payload: flow.get(\"ptz_onscreen_on\")};\n}\nelse {\n menu_msg = { payload: flow.get(\"ptz_onscreen_off\")};\n}\n\nreturn menu_msg;","outputs":1,"noerr":0,"x":1160,"y":100,"wires":[["c8115e35.7d835"]]},{"id":"f3f01082.69675","type":"function","z":"2057e882.e0d458","name":"Iris UP","func":"msg.payload = flow.get(\"ptz_iris_up\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1371,"y":800,"wires":[["c8115e35.7d835"]]},{"id":"19c1e35e.e781bd","type":"ui_button","z":"2057e882.e0d458","name":"Iris UP","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"Iris UP","color":"#FFFFFF","bgcolor":"purple","icon":"","payload":"1","payloadType":"num","topic":"","x":1151,"y":800,"wires":[["f3f01082.69675"]]},{"id":"7ec422ce.3f9b0c","type":"function","z":"2057e882.e0d458","name":"Iris DOWN","func":"msg.payload = flow.get(\"ptz_iris_down\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1391,"y":840,"wires":[["c8115e35.7d835"]]},{"id":"9d12878b.cfe0f8","type":"ui_button","z":"2057e882.e0d458","name":"Iris DOWN","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"Iris DOWN","color":"#FFFFFF","bgcolor":"purple","icon":"","payload":"1","payloadType":"num","topic":"","x":1171,"y":840,"wires":[["7ec422ce.3f9b0c"]]},{"id":"6e8ff79a.d462b8","type":"function","z":"2057e882.e0d458","name":"Gain UP","func":"msg.payload = flow.get(\"ptz_gain_up\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1380,"y":880,"wires":[["c8115e35.7d835"]]},{"id":"c0f81e1d.6927","type":"ui_button","z":"2057e882.e0d458","name":"Gain UP","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"Gain UP","color":"#FFFFFF","bgcolor":"purple","icon":"","payload":"1","payloadType":"num","topic":"","x":1160,"y":880,"wires":[["6e8ff79a.d462b8"]]},{"id":"633fa7dd.433a58","type":"function","z":"2057e882.e0d458","name":"Gain DOWN","func":"msg.payload = flow.get(\"ptz_gain_down\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1390,"y":920,"wires":[["c8115e35.7d835"]]},{"id":"4b8ff2d4.f09a1c","type":"ui_button","z":"2057e882.e0d458","name":"Gain DOWN","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"Gain DOWN","color":"#FFFFFF","bgcolor":"purple","icon":"","payload":"1","payloadType":"num","topic":"","x":1170,"y":920,"wires":[["633fa7dd.433a58"]]},{"id":"6cca2d37.51e714","type":"function","z":"2057e882.e0d458","name":"Shutter UP","func":"msg.payload = flow.get(\"ptz_shutter_up\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1390,"y":960,"wires":[["c8115e35.7d835"]]},{"id":"57c8ab88.c677c4","type":"ui_button","z":"2057e882.e0d458","name":"Shutter UP","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"Shutter UP","color":"#FFFFFF","bgcolor":"purple","icon":"","payload":"1","payloadType":"num","topic":"","x":1170,"y":960,"wires":[["6cca2d37.51e714"]]},{"id":"6ac926ff.aca0b8","type":"function","z":"2057e882.e0d458","name":"Shutter DOWN","func":"msg.payload = flow.get(\"ptz_shutter_down\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1400,"y":1000,"wires":[["c8115e35.7d835"]]},{"id":"666b8ab2.ca1074","type":"ui_button","z":"2057e882.e0d458","name":"Shutter DOWN","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"Shutter DOWN","color":"#FFFFFF","bgcolor":"purple","icon":"","payload":"1","payloadType":"num","topic":"","x":1180,"y":1000,"wires":[["6ac926ff.aca0b8"]]},{"id":"ca68dd82.e3f14","type":"function","z":"2057e882.e0d458","name":"Bright UP","func":"msg.payload = flow.get(\"ptz_bright_up\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1380,"y":1040,"wires":[["c8115e35.7d835"]]},{"id":"d0929060.32a4b","type":"ui_button","z":"2057e882.e0d458","name":"Bright UP","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"Bright UP","color":"#FFFFFF","bgcolor":"purple","icon":"","payload":"1","payloadType":"num","topic":"","x":1160,"y":1040,"wires":[["ca68dd82.e3f14"]]},{"id":"5d9a6ab0.1d94a4","type":"function","z":"2057e882.e0d458","name":"Bright DOWN","func":"msg.payload = flow.get(\"ptz_bright_down\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1400,"y":1080,"wires":[["c8115e35.7d835"]]},{"id":"2a711c.855caee4","type":"ui_button","z":"2057e882.e0d458","name":"Bright DOWN","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"Bright DOWN","color":"#FFFFFF","bgcolor":"purple","icon":"","payload":"1","payloadType":"num","topic":"","x":1180,"y":1080,"wires":[["5d9a6ab0.1d94a4"]]},{"id":"a30903f0.bc368","type":"function","z":"2057e882.e0d458","name":"Iris Priority","func":"msg.payload = flow.get(\"ptz_iris_priority\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1390,"y":1200,"wires":[["c8115e35.7d835"]]},{"id":"55e49c1d.9d76b4","type":"ui_button","z":"2057e882.e0d458","name":"Iris Priority","group":"ff3e87f3.deae78","order":2,"width":0,"height":0,"passthru":false,"label":"Iris Priority","color":"#FFFFFF","bgcolor":"pink","icon":"","payload":"1","payloadType":"num","topic":"","x":1170,"y":1200,"wires":[["a30903f0.bc368"]]},{"id":"5672020.4ac84","type":"function","z":"2057e882.e0d458","name":"Shutter Priority","func":"msg.payload = flow.get(\"ptz_shutter_priority\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1400,"y":1240,"wires":[["c8115e35.7d835"]]},{"id":"430c80d2.e3409","type":"ui_button","z":"2057e882.e0d458","name":"Shutter Priority","group":"ff3e87f3.deae78","order":3,"width":0,"height":0,"passthru":false,"label":"Shutter Priority","color":"#FFFFFF","bgcolor":"pink","icon":"","payload":"1","payloadType":"num","topic":"","x":1180,"y":1240,"wires":[["5672020.4ac84"]]},{"id":"55ad93d8.e6921c","type":"function","z":"2057e882.e0d458","name":"Bright Mode","func":"msg.payload = flow.get(\"ptz_bright_mode\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1390,"y":1280,"wires":[["c8115e35.7d835"]]},{"id":"f578053f.b98898","type":"ui_button","z":"2057e882.e0d458","name":"Bright Mode","group":"ff3e87f3.deae78","order":4,"width":0,"height":0,"passthru":false,"label":"Bright Mode","color":"#FFFFFF","bgcolor":"pink","icon":"","payload":"1","payloadType":"num","topic":"","x":1170,"y":1280,"wires":[["55ad93d8.e6921c"]]},{"id":"bb96c2.3e19a94","type":"function","z":"2057e882.e0d458","name":"Auto White Balance","func":"msg.payload = flow.get(\"ptz_awb\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1370,"y":1360,"wires":[["c8115e35.7d835"]]},{"id":"88eacaff.f2f4e8","type":"ui_button","z":"2057e882.e0d458","name":"Auto White Balance","group":"ff3e87f3.deae78","order":6,"width":0,"height":0,"passthru":false,"label":"Auto White Balance","color":"#FFFFFF","bgcolor":"grey","icon":"","payload":"1","payloadType":"num","topic":"","x":1130,"y":1360,"wires":[["bb96c2.3e19a94"]]},{"id":"b4ee7855.043bf8","type":"function","z":"2057e882.e0d458","name":"Full Auto","func":"msg.payload = flow.get(\"ptz_full_auto\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1380,"y":1160,"wires":[["c8115e35.7d835"]]},{"id":"c9ec1bb4.867118","type":"ui_button","z":"2057e882.e0d458","name":"Full Auto","group":"ff3e87f3.deae78","order":1,"width":0,"height":0,"passthru":false,"label":"Full Auto","color":"#FFFFFF","bgcolor":"pink","icon":"","payload":"1","payloadType":"num","topic":"","x":1160,"y":1160,"wires":[["b4ee7855.043bf8"]]},{"id":"f6f6c43a.6db298","type":"function","z":"2057e882.e0d458","name":"1-touch White Balance","func":"msg.payload = flow.get(\"ptz_onetouch_wb\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1380,"y":1400,"wires":[["c8115e35.7d835"]]},{"id":"3f0e3230.dda8be","type":"ui_button","z":"2057e882.e0d458","name":"1-touch White Balance","group":"ff3e87f3.deae78","order":7,"width":0,"height":0,"passthru":false,"label":"1-touch White Balance","color":"#FFFFFF","bgcolor":"grey","icon":"","payload":"1","payloadType":"num","topic":"","x":1140,"y":1400,"wires":[["f6f6c43a.6db298"]]},{"id":"c91ad4f0.4611c8","type":"function","z":"2057e882.e0d458","name":"1-touch White Bal. Trigger","func":"msg.payload = flow.get(\"ptz_onetouch_wb_trigger\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1390,"y":1440,"wires":[["c8115e35.7d835"]]},{"id":"442a4752.20e718","type":"ui_button","z":"2057e882.e0d458","name":"1-touch White Bal Trigger","group":"ff3e87f3.deae78","order":8,"width":0,"height":0,"passthru":false,"label":"1-touch White Bal Trigger","color":"#FFFFFF","bgcolor":"grey","icon":"","payload":"1","payloadType":"num","topic":"","x":1150,"y":1440,"wires":[["c91ad4f0.4611c8"]]},{"id":"ca8e4e61.1b6d9","type":"function","z":"2057e882.e0d458","name":"Manual White Balance","func":"msg.payload = flow.get(\"ptz_manual_wb\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1380,"y":1480,"wires":[["c8115e35.7d835"]]},{"id":"c84c4894.47d3a8","type":"ui_button","z":"2057e882.e0d458","name":"Manual White Balance","group":"ff3e87f3.deae78","order":9,"width":0,"height":0,"passthru":false,"label":"Manual White Balance","color":"#FFFFFF","bgcolor":"grey","icon":"","payload":"1","payloadType":"num","topic":"","x":1140,"y":1480,"wires":[["ca8e4e61.1b6d9"]]},{"id":"475a012.c28b9","type":"function","z":"2057e882.e0d458","name":"Manual Exposure","func":"msg.payload = flow.get(\"ptz_manual_exposure\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1370,"y":1520,"wires":[["c8115e35.7d835"]]},{"id":"fa7710a8.8b8e9","type":"ui_button","z":"2057e882.e0d458","name":"Manual Exposure","group":"ff3e87f3.deae78","order":5,"width":0,"height":0,"passthru":false,"label":"Manual Exposure","color":"#FFFFFF","bgcolor":"grey","icon":"","payload":"1","payloadType":"num","topic":"","x":1130,"y":1520,"wires":[["475a012.c28b9"]]},{"id":"df5c226.46339e","type":"function","z":"2057e882.e0d458","name":"FX Off","func":"msg.payload = flow.get(\"ptz_fx_off\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1330,"y":1640,"wires":[["c8115e35.7d835"]]},{"id":"c6122092.42b85","type":"ui_button","z":"2057e882.e0d458","name":"FX Off","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"FX Off","color":"#FFFFFF","bgcolor":"black","icon":"","payload":"1","payloadType":"num","topic":"","x":1090,"y":1640,"wires":[["df5c226.46339e"]]},{"id":"6ff12f8c.55be","type":"function","z":"2057e882.e0d458","name":"FX Negative","func":"msg.payload = flow.get(\"ptz_fx_neg\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1350,"y":1680,"wires":[["c8115e35.7d835"]]},{"id":"d32773ba.4e6b","type":"ui_button","z":"2057e882.e0d458","name":"FX Negative","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"FX Negative","color":"#FFFFFF","bgcolor":"black","icon":"","payload":"1","payloadType":"num","topic":"","x":1110,"y":1680,"wires":[["6ff12f8c.55be"]]},{"id":"451a33c6.d55b4c","type":"function","z":"2057e882.e0d458","name":"FX Black & White","func":"msg.payload = flow.get(\"ptz_fx_bw\");\n\nreturn msg;","outputs":1,"noerr":0,"x":1370,"y":1720,"wires":[["c8115e35.7d835"]]},{"id":"420ddf68.1c4df","type":"ui_button","z":"2057e882.e0d458","name":"FX Black & White","group":"42f6732.b676d8c","order":0,"width":0,"height":0,"passthru":false,"label":"FX Black & White","color":"#FFFFFF","bgcolor":"black","icon":"","payload":"1","payloadType":"num","topic":"","x":1130,"y":1720,"wires":[["451a33c6.d55b4c"]]},{"id":"2931d287.c2105e","type":"link in","z":"2057e882.e0d458","name":"PTZ 1 Master Preset In","links":["8381be6a.d1596"],"x":35,"y":340,"wires":[["97c30957.722538"]]},{"id":"97c30957.722538","type":"switch","z":"2057e882.e0d458","name":"Select Preset by name","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Preset 1","vt":"str"},{"t":"eq","v":"Preset 2","vt":"str"},{"t":"eq","v":"Preset 3","vt":"str"},{"t":"eq","v":"Preset 4","vt":"str"},{"t":"eq","v":"Preset 5","vt":"str"},{"t":"eq","v":"Preset 6","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":180,"y":340,"wires":[["937df734.c31308"],["38daab48.070054"],["4f952fa5.b77c3"],["f7c38098.34718"],["db7791b9.958f7"],["4b7d8618.eb2e38"]]},{"id":"46fe4902.f25ed8","type":"ui_group","z":"","name":"PTZ Recall Presets","tab":"fee3bb1b.363958","order":5,"disp":true,"width":"6","collapse":false},{"id":"ae526e18.5ea7","type":"ui_group","z":"","name":"PTZ Save Presets","tab":"fee3bb1b.363958","order":6,"disp":true,"width":"6","collapse":false},{"id":"c6a9c771.0a3ef8","type":"ui_group","z":"","name":"PTZ Utilities","tab":"fee3bb1b.363958","order":1,"disp":true,"width":"6","collapse":false},{"id":"684a12df.665b0c","type":"ui_group","z":"","name":"Pan-Tilt-Zoom","tab":"fee3bb1b.363958","order":2,"disp":true,"width":"6","collapse":false},{"id":"42f6732.b676d8c","type":"ui_group","z":"","name":"Image FX","tab":"fee3bb1b.363958","order":4,"disp":true,"width":"6","collapse":false},{"id":"ff3e87f3.deae78","type":"ui_group","z":"","name":"Image Modes","tab":"fee3bb1b.363958","order":3,"disp":true,"width":"6","collapse":false},{"id":"fee3bb1b.363958","type":"ui_tab","z":"","name":"PTZ Camera 2","icon":"dashboard","order":3}]