-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome_assistant_auto_discovery_node-red.json
1 lines (1 loc) · 83.2 KB
/
home_assistant_auto_discovery_node-red.json
1
[{"id":"8343d74debefd793","type":"tab","label":"Home Assistant","disabled":false,"info":"","env":[]},{"id":"4cea44abb4732901","type":"function","z":"8343d74debefd793","name":"flow.set('prefix')","func":"flow.set('prefix', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":80,"wires":[[]]},{"id":"433c2d5a6e9fda49","type":"function","z":"8343d74debefd793","name":"flow.set('id')","func":"flow.set('id', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":120,"wires":[[]]},{"id":"f6b882a11bd816cd","type":"comment","z":"8343d74debefd793","name":"Camera Config","info":"","x":100,"y":40,"wires":[]},{"id":"dc5fd83aaba14f78","type":"inject","z":"8343d74debefd793","name":"MQTT Topic Prefix (cameras)","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"cameras","payloadType":"str","x":170,"y":80,"wires":[["4cea44abb4732901"]]},{"id":"d3a3b88664aaf895","type":"inject","z":"8343d74debefd793","name":"MQTT Client ID (115)","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"115","payloadType":"str","x":140,"y":120,"wires":[["433c2d5a6e9fda49"]]},{"id":"c24f2c8741076574","type":"inject","z":"8343d74debefd793","name":"Register Device","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":600,"wires":[["396f1bbe574a823e"]]},{"id":"128bafe60dae604c","type":"mqtt in","z":"8343d74debefd793","name":"status/smarthome/mqtt/clientid","topic":"","qos":"1","datatype":"json","broker":"8c9bd856c466f9b0","nl":false,"rap":false,"rh":0,"inputs":1,"x":440,"y":160,"wires":[["3a12d257ad9321b5"]]},{"id":"d7a0c7c65426782f","type":"function","z":"8343d74debefd793","name":"topic","func":"const command = 'status/smarthome/mqtt/clientid';\nconst topic = flow.get('prefix') + '/' + flow.get('id') + '/' + command;\n\nmsg.topic = topic;\nmsg.action = \"subscribe\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":160,"wires":[["128bafe60dae604c"]]},{"id":"881faff8f1705a6d","type":"inject","z":"8343d74debefd793","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":160,"wires":[["d7a0c7c65426782f"]]},{"id":"1b2870e69e26aec4","type":"function","z":"8343d74debefd793","name":"flow.set('clientid','ha-switch','ha-number','ha-button')","func":"flow.set('clientid', msg.payload)\n\nconst haswitch = 'homeassistant/switch/' + msg.payload + '/'\nflow.set('ha-switch', haswitch)\n\nconst hanumber = 'homeassistant/number/' + msg.payload + '/'\nflow.set('ha-number', hanumber)\n\nconst habutton = 'homeassistant/button/' + msg.payload + '/'\nflow.set('ha-button', habutton)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":910,"y":160,"wires":[[]]},{"id":"3a12d257ad9321b5","type":"change","z":"8343d74debefd793","name":"value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":160,"wires":[["1b2870e69e26aec4"]]},{"id":"396f1bbe574a823e","type":"link out","z":"8343d74debefd793","name":"link out 4","mode":"link","links":["2a3e4ad6012b6e7f","e92431819581f7cd","d506e80343f6c23c","20495f61ebe27a3a","81bafc978c70a02b","3a86074502a47f9f","1d0aee81c3ed9516","5ca0d06c67d0bee2","cee4e5013cad2394","6db20c1468c1fbf1","f96569687e9cdf7d","876359a1ea7e9ea4","006e871f7b263a6b","2c8431e5f2671227","b333e76256b42f08","08f6e2a1f9ae0e70","7acda5e407dca5a3","d38f5baca2533c94","dd6788a00e18400b","3436e5b5eecde359","3680142d41ecbba4","bce921720dfa0b81","63873e31db0ad8d5","435ba811a8a0174e","6ef906e20160b318","3e36b68030d0ede2","bd40b5af97b53a22","643cfb215be049d0","24bf1e44a0cf2bcd","eba2c3bf1e63b285","19d5706fbd974909","1a6164ed621f2b77","2992352e56e9b904","08e409ee830ec743","c2ddba12dc6ddabb","b210881b3deea906","8eb4da9d39d7db19"],"x":235,"y":600,"wires":[]},{"id":"c03813ed5a88b636","type":"comment","z":"8343d74debefd793","name":"IN-9408 2k+ Garden :: 192.168.2.115","info":"","x":170,"y":640,"wires":[]},{"id":"f81a7ff2710c36ef","type":"mqtt out","z":"8343d74debefd793","name":"/alarm_area_red/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":330,"y":720,"wires":[]},{"id":"1c9588668fcc16ec","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"alarm_area_red/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_alarm_area_red\",\n \"unique_id\": flow.get('clientid') + \"_alarm_area_red\",\n \"name\": flow.get('name') + \" Alarm Area Red\",\n \"icon\": \"mdi:camera-metering-matrix\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/areas/red/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/areas/red/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":720,"wires":[["f81a7ff2710c36ef"]]},{"id":"e92431819581f7cd","type":"link in","z":"8343d74debefd793","name":"link in 198","links":["396f1bbe574a823e"],"x":35,"y":720,"wires":[["1c9588668fcc16ec"]]},{"id":"25e49cc6c8d2f0fc","type":"mqtt in","z":"8343d74debefd793","name":"status/multimedia/overlay/name","topic":"","qos":"1","datatype":"json","broker":"8c9bd856c466f9b0","nl":false,"rap":false,"rh":0,"inputs":1,"x":450,"y":200,"wires":[["0560120da3cdf58a"]]},{"id":"3812b58df3b7b622","type":"function","z":"8343d74debefd793","name":"topic","func":"const command = 'status/multimedia/overlay/name';\nconst topic = flow.get('prefix') + '/' + flow.get('id') + '/' + command;\n\nmsg.topic = topic;\nmsg.action = \"subscribe\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":200,"wires":[["25e49cc6c8d2f0fc"]]},{"id":"e69d47fe1b292384","type":"inject","z":"8343d74debefd793","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":200,"wires":[["3812b58df3b7b622"]]},{"id":"10a4feaa32f45949","type":"function","z":"8343d74debefd793","name":"flow.set('name')","func":"flow.set('name', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":200,"wires":[[]]},{"id":"0560120da3cdf58a","type":"change","z":"8343d74debefd793","name":"value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":200,"wires":[["10a4feaa32f45949"]]},{"id":"246826ce740a6cb3","type":"mqtt in","z":"8343d74debefd793","name":"status/system/vendorinfo/vendor","topic":"","qos":"1","datatype":"json","broker":"8c9bd856c466f9b0","nl":false,"rap":false,"rh":0,"inputs":1,"x":450,"y":240,"wires":[["de1284c5521201d5"]]},{"id":"aefa3d4509fb558d","type":"function","z":"8343d74debefd793","name":"topic","func":"const command = 'status/system/vendorinfo/vendor';\nconst topic = flow.get('prefix') + '/' + flow.get('id') + '/' + command;\n\nmsg.topic = topic;\nmsg.action = \"subscribe\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":240,"wires":[["246826ce740a6cb3"]]},{"id":"5bf17d2f28b6ce9b","type":"inject","z":"8343d74debefd793","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":240,"wires":[["aefa3d4509fb558d"]]},{"id":"a760223847c4d3ae","type":"function","z":"8343d74debefd793","name":"flow.set('vendor')","func":"flow.set('vendor', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":240,"wires":[[]]},{"id":"de1284c5521201d5","type":"change","z":"8343d74debefd793","name":"value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":240,"wires":[["a760223847c4d3ae"]]},{"id":"d64cde70d2b29609","type":"mqtt in","z":"8343d74debefd793","name":"status/system/vendorinfo/series","topic":"","qos":"1","datatype":"json","broker":"8c9bd856c466f9b0","nl":false,"rap":false,"rh":0,"inputs":1,"x":450,"y":280,"wires":[["72919d4298628aac"]]},{"id":"ed4adf0c9f3e1c9b","type":"function","z":"8343d74debefd793","name":"topic","func":"const command = 'status/system/vendorinfo/series';\nconst topic = flow.get('prefix') + '/' + flow.get('id') + '/' + command;\n\nmsg.topic = topic;\nmsg.action = \"subscribe\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":280,"wires":[["d64cde70d2b29609"]]},{"id":"b86feaacbf6e7aa7","type":"inject","z":"8343d74debefd793","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":280,"wires":[["ed4adf0c9f3e1c9b"]]},{"id":"d9ac28765872a1e3","type":"function","z":"8343d74debefd793","name":"flow.set('series')","func":"flow.set('series', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":280,"wires":[[]]},{"id":"72919d4298628aac","type":"change","z":"8343d74debefd793","name":"value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":280,"wires":[["d9ac28765872a1e3"]]},{"id":"b62b45143b795c8c","type":"mqtt in","z":"8343d74debefd793","name":"status/system/vendorinfo/product","topic":"","qos":"1","datatype":"json","broker":"8c9bd856c466f9b0","nl":false,"rap":false,"rh":0,"inputs":1,"x":450,"y":320,"wires":[["3cd5f29de9fcbe73"]]},{"id":"2394f2653c1de52d","type":"function","z":"8343d74debefd793","name":"topic","func":"const command = 'status/system/vendorinfo/product';\nconst topic = flow.get('prefix') + '/' + flow.get('id') + '/' + command;\n\nmsg.topic = topic;\nmsg.action = \"subscribe\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":320,"wires":[["b62b45143b795c8c"]]},{"id":"59fd66fa615f255b","type":"inject","z":"8343d74debefd793","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":320,"wires":[["2394f2653c1de52d"]]},{"id":"c4976489630f9570","type":"function","z":"8343d74debefd793","name":"flow.set('product')","func":"flow.set('product', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":320,"wires":[[]]},{"id":"3cd5f29de9fcbe73","type":"change","z":"8343d74debefd793","name":"value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":320,"wires":[["c4976489630f9570"]]},{"id":"c82a6d6f5af94e82","type":"mqtt in","z":"8343d74debefd793","name":"status/network/config/ipaddr","topic":"","qos":"1","datatype":"json","broker":"8c9bd856c466f9b0","nl":false,"rap":false,"rh":0,"inputs":1,"x":440,"y":360,"wires":[["1edc0eb8718f41a7"]]},{"id":"e5d75b02a3d13ab1","type":"function","z":"8343d74debefd793","name":"topic","func":"const command = 'status/network/config/ipaddr';\nconst topic = flow.get('prefix') + '/' + flow.get('id') + '/' + command;\n\nmsg.topic = topic;\nmsg.action = \"subscribe\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":360,"wires":[["c82a6d6f5af94e82"]]},{"id":"8f0fa9eefda4b331","type":"inject","z":"8343d74debefd793","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":360,"wires":[["e5d75b02a3d13ab1"]]},{"id":"7876779e70da96f0","type":"function","z":"8343d74debefd793","name":"flow.set('ipaddr')","func":"flow.set('ipaddr', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":360,"wires":[[]]},{"id":"1edc0eb8718f41a7","type":"change","z":"8343d74debefd793","name":"value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":360,"wires":[["7876779e70da96f0"]]},{"id":"481f9369b870b3c3","type":"mqtt in","z":"8343d74debefd793","name":"status/network/config/httpport","topic":"","qos":"1","datatype":"json","broker":"8c9bd856c466f9b0","nl":false,"rap":false,"rh":0,"inputs":1,"x":440,"y":400,"wires":[["bdab5582c77ad4e0"]]},{"id":"fc67894683489f7a","type":"function","z":"8343d74debefd793","name":"topic","func":"const command = 'status/network/config/httpport';\nconst topic = flow.get('prefix') + '/' + flow.get('id') + '/' + command;\n\nmsg.topic = topic;\nmsg.action = \"subscribe\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":400,"wires":[["481f9369b870b3c3"]]},{"id":"c1909399b3f2e0a0","type":"inject","z":"8343d74debefd793","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":400,"wires":[["fc67894683489f7a"]]},{"id":"2d6269c8782ec75a","type":"function","z":"8343d74debefd793","name":"flow.set('httpport')","func":"flow.set('httpport', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":400,"wires":[[]]},{"id":"bdab5582c77ad4e0","type":"change","z":"8343d74debefd793","name":"value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":400,"wires":[["2d6269c8782ec75a"]]},{"id":"d2a0af26500314a6","type":"mqtt out","z":"8343d74debefd793","name":"/alarm_area_blue/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":330,"y":760,"wires":[]},{"id":"15d4301dcb898116","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"alarm_area_blue/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_alarm_area_blue\",\n \"unique_id\": flow.get('clientid') + \"_alarm_area_blue\",\n \"name\": flow.get('name') + \" Alarm Area Blue\",\n \"icon\": \"mdi:camera-metering-matrix\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/areas/blue/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/areas/blue/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":760,"wires":[["d2a0af26500314a6"]]},{"id":"d506e80343f6c23c","type":"link in","z":"8343d74debefd793","name":"link in 199","links":["396f1bbe574a823e"],"x":35,"y":760,"wires":[["15d4301dcb898116"]]},{"id":"2d0f095244850cb5","type":"mqtt out","z":"8343d74debefd793","name":"/alarm_area_green/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":330,"y":800,"wires":[]},{"id":"64867931086f3f4c","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"alarm_area_green/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_alarm_area_green\",\n \"unique_id\": flow.get('clientid') + \"_alarm_area_green\",\n \"name\": flow.get('name') + \" Alarm Area Green\",\n \"icon\": \"mdi:camera-metering-matrix\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/areas/green/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/areas/green/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":800,"wires":[["2d0f095244850cb5"]]},{"id":"20495f61ebe27a3a","type":"link in","z":"8343d74debefd793","name":"link in 200","links":["396f1bbe574a823e"],"x":35,"y":800,"wires":[["64867931086f3f4c"]]},{"id":"4612e67cce89f352","type":"mqtt out","z":"8343d74debefd793","name":"/alarm_area_yellow/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":330,"y":840,"wires":[]},{"id":"e0cc22eb05c0a60c","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"alarm_area_yellow/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_alarm_area_yellow\",\n \"unique_id\": flow.get('clientid') + \"_alarm_area_yellow\",\n \"name\": flow.get('name') + \" Alarm Area Yellow\",\n \"icon\": \"mdi:camera-metering-matrix\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/areas/yellow/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/areas/yellow/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":840,"wires":[["4612e67cce89f352"]]},{"id":"81bafc978c70a02b","type":"link in","z":"8343d74debefd793","name":"link in 201","links":["396f1bbe574a823e"],"x":35,"y":840,"wires":[["e0cc22eb05c0a60c"]]},{"id":"96ddf1d8c5fe8529","type":"mqtt out","z":"8343d74debefd793","name":"/red_area_sense/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":790,"y":720,"wires":[]},{"id":"e4f2bef07f9e5343","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"red_area_sense/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_red_area_sense\",\n \"unique_id\": flow.get('clientid') + \"_red_area_sense\",\n \"name\": flow.get('name') + \" Alarm Area Red Sensitivity\",\n \"icon\": \"mdi:camera-metering-matrix\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/areas/red/sensitivity\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/areas/red/sensitivity\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 0,\n \"max\": 100,\n \"step\": 1,\n \"unit_of_measurement\": \"%\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":720,"wires":[["96ddf1d8c5fe8529"]]},{"id":"3a86074502a47f9f","type":"link in","z":"8343d74debefd793","name":"link in 202","links":["396f1bbe574a823e"],"x":475,"y":720,"wires":[["e4f2bef07f9e5343"]]},{"id":"57d8e190ad5ca325","type":"mqtt out","z":"8343d74debefd793","name":"/blue_area_sense/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":790,"y":760,"wires":[]},{"id":"b9c02a5e76342d8e","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"blue_area_sense/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_blue_area_sense\",\n \"unique_id\": flow.get('clientid') + \"_blue_area_sense\",\n \"name\": flow.get('name') + \" Alarm Area Blue Sensitivity\",\n \"icon\": \"mdi:camera-metering-matrix\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/areas/blue/sensitivity\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/areas/blue/sensitivity\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 0,\n \"max\": 100,\n \"step\": 1,\n \"unit_of_measurement\": \"%\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":760,"wires":[["57d8e190ad5ca325"]]},{"id":"1d0aee81c3ed9516","type":"link in","z":"8343d74debefd793","name":"link in 203","links":["396f1bbe574a823e"],"x":475,"y":760,"wires":[["b9c02a5e76342d8e"]]},{"id":"a8372b4dcbf24ed6","type":"mqtt out","z":"8343d74debefd793","name":"/green_area_sense/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":790,"y":800,"wires":[]},{"id":"988ec9b9285d02f9","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"green_area_sense/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_green_area_sense\",\n \"unique_id\": flow.get('clientid') + \"_green_area_sense\",\n \"name\": flow.get('name') + \" Alarm Area Green Sensitivity\",\n \"icon\": \"mdi:camera-metering-matrix\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/areas/green/sensitivity\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/areas/green/sensitivity\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 0,\n \"max\": 100,\n \"step\": 1,\n \"unit_of_measurement\": \"%\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":800,"wires":[["a8372b4dcbf24ed6"]]},{"id":"5ca0d06c67d0bee2","type":"link in","z":"8343d74debefd793","name":"link in 204","links":["396f1bbe574a823e"],"x":475,"y":800,"wires":[["988ec9b9285d02f9"]]},{"id":"d4f12afe6f98741c","type":"mqtt out","z":"8343d74debefd793","name":"/yellow_area_sense/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":800,"y":840,"wires":[]},{"id":"1f4b638ce9a78d19","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"yellow_area_sense/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_yellow_area_sense\",\n \"unique_id\": flow.get('clientid') + \"_yellow_area_sense\",\n \"name\": flow.get('name') + \" Alarm Area Yellow Sensitivity\",\n \"icon\": \"mdi:camera-metering-matrix\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/areas/yellow/sensitivity\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/areas/yellow/sensitivity\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 0,\n \"max\": 100,\n \"step\": 1,\n \"unit_of_measurement\": \"%\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":840,"wires":[["d4f12afe6f98741c"]]},{"id":"cee4e5013cad2394","type":"link in","z":"8343d74debefd793","name":"link in 205","links":["396f1bbe574a823e"],"x":475,"y":840,"wires":[["1f4b638ce9a78d19"]]},{"id":"d38053fbd58216f6","type":"mqtt out","z":"8343d74debefd793","name":"/alarm/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":290,"y":900,"wires":[]},{"id":"5ed55384f13b0253","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"alarm/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_alarm\",\n \"unique_id\": flow.get('clientid') + \"_alarm\",\n \"name\": flow.get('name') + \" Alarm\",\n \"icon\": \"mdi:shield-home-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/actions/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/actions/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":900,"wires":[["d38053fbd58216f6"]]},{"id":"6db20c1468c1fbf1","type":"link in","z":"8343d74debefd793","name":"link in 206","links":["396f1bbe574a823e"],"x":35,"y":900,"wires":[["5ed55384f13b0253"]]},{"id":"b55d9e7d26f7f2cd","type":"mqtt out","z":"8343d74debefd793","name":"/alarm_email/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":310,"y":940,"wires":[]},{"id":"18a9080e27748f8b","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"alarm_email/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_alarm_email\",\n \"unique_id\": flow.get('clientid') + \"_alarm_email\",\n \"name\": flow.get('name') + \" Alarm Email\",\n \"icon\": \"mdi:email-alert-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/actions/email/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/actions/email/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":940,"wires":[["b55d9e7d26f7f2cd"]]},{"id":"f96569687e9cdf7d","type":"link in","z":"8343d74debefd793","name":"link in 207","links":["396f1bbe574a823e"],"x":35,"y":940,"wires":[["18a9080e27748f8b"]]},{"id":"9f73cfb9faf783a1","type":"mqtt out","z":"8343d74debefd793","name":"/pir/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":280,"y":980,"wires":[]},{"id":"f957f2a7f3b07f62","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"pir/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_pir\",\n \"unique_id\": flow.get('clientid') + \"_pir\",\n \"name\": flow.get('name') + \" PIR Sensor\",\n \"icon\": \"mdi:motion-sensor\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/actions/pir/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/actions/pir/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":980,"wires":[["9f73cfb9faf783a1"]]},{"id":"876359a1ea7e9ea4","type":"link in","z":"8343d74debefd793","name":"link in 208","links":["396f1bbe574a823e"],"x":35,"y":980,"wires":[["f957f2a7f3b07f62"]]},{"id":"e7720feec86bcb37","type":"mqtt out","z":"8343d74debefd793","name":"/pir_link/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":740,"y":900,"wires":[]},{"id":"2db27146bb04cf88","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"pir_link/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_link_pir\",\n \"unique_id\": flow.get('clientid') + \"_link_pir\",\n \"name\": flow.get('name') + \" Link PIR Sensor\",\n \"icon\": \"mdi:leak-off\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/actions/pir/link\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/actions/pir/link\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":900,"wires":[["e7720feec86bcb37"]]},{"id":"006e871f7b263a6b","type":"link in","z":"8343d74debefd793","name":"link in 209","links":["396f1bbe574a823e"],"x":475,"y":900,"wires":[["2db27146bb04cf88"]]},{"id":"6f881e5708fc234c","type":"mqtt out","z":"8343d74debefd793","name":"/alarm_trigger/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":760,"y":940,"wires":[]},{"id":"77ac73627ff8fed3","type":"function","z":"8343d74debefd793","name":"ha-button","func":"msg.topic = flow.get('ha-button') + \"alarm_trigger/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_alarm_trigger\",\n \"unique_id\": flow.get('clientid') + \"_alarm_trigger\",\n \"name\": flow.get('name') + \" Alarm Trigger\",\n \"icon\": \"mdi:alarm-light\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/pushalarm\",\n \"payload_press\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":940,"wires":[["6f881e5708fc234c"]]},{"id":"2c8431e5f2671227","type":"link in","z":"8343d74debefd793","name":"link in 210","links":["396f1bbe574a823e"],"x":475,"y":940,"wires":[["77ac73627ff8fed3"]]},{"id":"e2f604a9985373e8","type":"mqtt out","z":"8343d74debefd793","name":"/audio_detection/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":770,"y":980,"wires":[]},{"id":"04d2d276d5f46696","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"audio_detection/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_audio_detection\",\n \"unique_id\": flow.get('clientid') + \"_audio_detection\",\n \"name\": flow.get('name') + \" Audio Detection\",\n \"icon\": \"mdi:waveform\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/actions/audiodetection/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/alarm/actions/audiodetection/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":980,"wires":[["e2f604a9985373e8"]]},{"id":"b333e76256b42f08","type":"link in","z":"8343d74debefd793","name":"link in 211","links":["396f1bbe574a823e"],"x":475,"y":980,"wires":[["04d2d276d5f46696"]]},{"id":"a164346d8a832d4c","type":"mqtt out","z":"8343d74debefd793","name":"/audio_out/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":330,"y":1080,"wires":[]},{"id":"cb27e54146a2137c","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"audio_out/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_audio_out\",\n \"unique_id\": flow.get('clientid') + \"_audio_out\",\n \"name\": flow.get('name') + \" Audio Out\",\n \"icon\": \"mdi:volume-high\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/audio/out/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/audio/out/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":1080,"wires":[["a164346d8a832d4c"]]},{"id":"08f6e2a1f9ae0e70","type":"link in","z":"8343d74debefd793","name":"link in 212","links":["396f1bbe574a823e"],"x":35,"y":1080,"wires":[["cb27e54146a2137c"]]},{"id":"4a11d978b9e8a7ab","type":"mqtt out","z":"8343d74debefd793","name":"/audio_in/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":320,"y":1120,"wires":[]},{"id":"b21fbb7f130fe3d2","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"audio_in/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_audio_out\",\n \"unique_id\": flow.get('clientid') + \"_audio_out\",\n \"name\": flow.get('name') + \" Audio Out\",\n \"icon\": \"mdi:volume-high\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/audio/out/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/audio/out/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":1120,"wires":[["4a11d978b9e8a7ab"]]},{"id":"7acda5e407dca5a3","type":"link in","z":"8343d74debefd793","name":"link in 213","links":["396f1bbe574a823e"],"x":35,"y":1120,"wires":[["b21fbb7f130fe3d2"]]},{"id":"629d9fec2ffc7271","type":"comment","z":"8343d74debefd793","name":"Alarm Menu","info":"","x":90,"y":680,"wires":[]},{"id":"4b6730202c981c1e","type":"comment","z":"8343d74debefd793","name":"Multimedia Menu","info":"","x":100,"y":1040,"wires":[]},{"id":"175343b5dbc7f1be","type":"mqtt out","z":"8343d74debefd793","name":"/privacy_mask1/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":760,"y":1080,"wires":[]},{"id":"fa6da3fcc931f0d8","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"privacy_mask1/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_privacy_mask1\",\n \"unique_id\": flow.get('clientid') + \"_privacy_mask1\",\n \"name\": flow.get('name') + \" Privacy Mask 1\",\n \"icon\": \"mdi:cctv-off\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/privacy/region1/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/privacy/region1/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":1080,"wires":[["175343b5dbc7f1be"]]},{"id":"d38f5baca2533c94","type":"link in","z":"8343d74debefd793","name":"link in 214","links":["396f1bbe574a823e"],"x":475,"y":1080,"wires":[["fa6da3fcc931f0d8"]]},{"id":"93a4b4b583e0025a","type":"mqtt out","z":"8343d74debefd793","name":"/privacy_mask2/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":760,"y":1120,"wires":[]},{"id":"e5c8ccc854f9f847","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"privacy_mask2/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_privacy_mask2\",\n \"unique_id\": flow.get('clientid') + \"_privacy_mask2\",\n \"name\": flow.get('name') + \" Privacy Mask 2\",\n \"icon\": \"mdi:cctv-off\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/privacy/region2/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/privacy/region2/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":1120,"wires":[["93a4b4b583e0025a"]]},{"id":"dd6788a00e18400b","type":"link in","z":"8343d74debefd793","name":"link in 215","links":["396f1bbe574a823e"],"x":475,"y":1120,"wires":[["e5c8ccc854f9f847"]]},{"id":"de8078df9ad93dc3","type":"mqtt out","z":"8343d74debefd793","name":"/privacy_mask3/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":760,"y":1160,"wires":[]},{"id":"62a89ed45e85044d","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"privacy_mask3/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_privacy_mask3\",\n \"unique_id\": flow.get('clientid') + \"_privacy_mask3\",\n \"name\": flow.get('name') + \" Privacy Mask 3\",\n \"icon\": \"mdi:cctv-off\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/privacy/region3/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/privacy/region3/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":1160,"wires":[["de8078df9ad93dc3"]]},{"id":"3436e5b5eecde359","type":"link in","z":"8343d74debefd793","name":"link in 216","links":["396f1bbe574a823e"],"x":475,"y":1160,"wires":[["62a89ed45e85044d"]]},{"id":"d6e7a81206306d89","type":"mqtt out","z":"8343d74debefd793","name":"/privacy_mask4/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":760,"y":1200,"wires":[]},{"id":"e5305198726f02ed","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"privacy_mask4/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_privacy_mask4\",\n \"unique_id\": flow.get('clientid') + \"_privacy_mask4\",\n \"name\": flow.get('name') + \" Privacy Mask 4\",\n \"icon\": \"mdi:cctv-off\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/privacy/region4/enable\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/privacy/region4/enable\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":1200,"wires":[["d6e7a81206306d89"]]},{"id":"3680142d41ecbba4","type":"link in","z":"8343d74debefd793","name":"link in 217","links":["396f1bbe574a823e"],"x":475,"y":1200,"wires":[["e5305198726f02ed"]]},{"id":"7e52f0a2b094db27","type":"mqtt out","z":"8343d74debefd793","name":"/auto_gamma/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":340,"y":1160,"wires":[]},{"id":"3fb80332a27c45b5","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"auto_gamma/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_auto_gamma\",\n \"unique_id\": flow.get('clientid') + \"_auto_gamma\",\n \"name\": flow.get('name') + \" Auto Gamma\",\n \"icon\": \"mdi:gamma\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/gamma/auto\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/gamma/auto\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":1160,"wires":[["7e52f0a2b094db27"]]},{"id":"bce921720dfa0b81","type":"link in","z":"8343d74debefd793","name":"link in 218","links":["396f1bbe574a823e"],"x":35,"y":1160,"wires":[["3fb80332a27c45b5"]]},{"id":"c32f5885546c7a96","type":"mqtt out","z":"8343d74debefd793","name":"/gamma/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":320,"y":1200,"wires":[]},{"id":"f3077fbad81db308","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"gamma/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_gamma\",\n \"unique_id\": flow.get('clientid') + \"_gamma\",\n \"name\": flow.get('name') + \" Gamma\",\n \"icon\": \"mdi:gamma\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/gamma/preset\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/gamma/preset\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 1,\n \"max\": 18,\n \"step\": 1,\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":150,"y":1200,"wires":[["c32f5885546c7a96"]]},{"id":"63873e31db0ad8d5","type":"link in","z":"8343d74debefd793","name":"link in 219","links":["396f1bbe574a823e"],"x":35,"y":1200,"wires":[["f3077fbad81db308"]]},{"id":"f04321ad2c5aadda","type":"mqtt out","z":"8343d74debefd793","name":"/auto_denoise/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":320,"y":1260,"wires":[]},{"id":"3ea3de82389a0a2e","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"auto_denoise/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_auto_denoise\",\n \"unique_id\": flow.get('clientid') + \"_auto_denoise\",\n \"name\": flow.get('name') + \" Auto Denoise\",\n \"icon\": \"mdi:contrast-box\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/denoise/preset\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/denoise/preset\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":1260,"wires":[["f04321ad2c5aadda"]]},{"id":"435ba811a8a0174e","type":"link in","z":"8343d74debefd793","name":"link in 220","links":["396f1bbe574a823e"],"x":35,"y":1260,"wires":[["3ea3de82389a0a2e"]]},{"id":"0f0d5bdc0f44fdca","type":"mqtt out","z":"8343d74debefd793","name":"/denoise/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":320,"y":1300,"wires":[]},{"id":"ae6eee3d89ca0705","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"denoise/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_auto_denoise\",\n \"unique_id\": flow.get('clientid') + \"_auto_denoise\",\n \"name\": flow.get('name') + \" Denoise\",\n \"icon\": \"di:contrast-box\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/denoise/preset\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/denoise/preset\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 0,\n \"max\": 15,\n \"step\": 1,\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":150,"y":1300,"wires":[["0f0d5bdc0f44fdca"]]},{"id":"6ef906e20160b318","type":"link in","z":"8343d74debefd793","name":"link in 221","links":["396f1bbe574a823e"],"x":35,"y":1300,"wires":[["ae6eee3d89ca0705"]]},{"id":"edc5628ee1284768","type":"mqtt out","z":"8343d74debefd793","name":"/flip/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":300,"y":1340,"wires":[]},{"id":"c7f02f2dcc30851a","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"flip/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_flip\",\n \"unique_id\": flow.get('clientid') + \"_flip\",\n \"name\": flow.get('name') + \" Flip\",\n \"icon\": \"mdi:camera-flip-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/transform/flip\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/transform/flip\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":1340,"wires":[["edc5628ee1284768"]]},{"id":"3e36b68030d0ede2","type":"link in","z":"8343d74debefd793","name":"link in 222","links":["396f1bbe574a823e"],"x":35,"y":1340,"wires":[["c7f02f2dcc30851a"]]},{"id":"ad1560d796d2f0a2","type":"mqtt out","z":"8343d74debefd793","name":"/mirror/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":310,"y":1380,"wires":[]},{"id":"d4cd2da6bb1c49aa","type":"function","z":"8343d74debefd793","name":"ha-switch","func":"msg.topic = flow.get('ha-switch') + \"mirror/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_mirror\",\n \"unique_id\": flow.get('clientid') + \"_mirror\",\n \"name\": flow.get('name') + \" Mirror\",\n \"icon\": \"mdi:camera-flip-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/transform/mirror\",\n \"payload_on\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"payload_off\": \"{\\\"val\\\":\\\"0\\\"}\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/transform/mirror\",\n \"state_on\": 1,\n \"state_off\": 0,\n \"value_template\": \"{{ value_json.val }}\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":1380,"wires":[["ad1560d796d2f0a2"]]},{"id":"bd40b5af97b53a22","type":"link in","z":"8343d74debefd793","name":"link in 223","links":["396f1bbe574a823e"],"x":35,"y":1380,"wires":[["d4cd2da6bb1c49aa"]]},{"id":"dc29eb9d68513c66","type":"mqtt out","z":"8343d74debefd793","name":"/contrast/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":760,"y":1260,"wires":[]},{"id":"16e5d93140b81fbc","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"contrast/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_contrast\",\n \"unique_id\": flow.get('clientid') + \"_contrast\",\n \"name\": flow.get('name') + \" Contrast\",\n \"icon\": \"mdi:contrast-box\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/contrast\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/contrast\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 1,\n \"max\": 100,\n \"step\": 1,\n \"unit_of_measurement\": \"%\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":1260,"wires":[["dc29eb9d68513c66"]]},{"id":"643cfb215be049d0","type":"link in","z":"8343d74debefd793","name":"link in 224","links":["396f1bbe574a823e"],"x":475,"y":1260,"wires":[["16e5d93140b81fbc"]]},{"id":"bd38cca653970460","type":"mqtt out","z":"8343d74debefd793","name":"/saturation/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":770,"y":1300,"wires":[]},{"id":"7c4f92a0e4682a90","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"saturation/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_saturation\",\n \"unique_id\": flow.get('clientid') + \"_saturation\",\n \"name\": flow.get('name') + \" Saturation\",\n \"icon\": \"mdi:palette-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/saturation\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/saturation\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 1,\n \"max\": 100,\n \"step\": 1,\n \"unit_of_measurement\": \"%\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":1300,"wires":[["bd38cca653970460"]]},{"id":"24bf1e44a0cf2bcd","type":"link in","z":"8343d74debefd793","name":"link in 225","links":["396f1bbe574a823e"],"x":475,"y":1300,"wires":[["7c4f92a0e4682a90"]]},{"id":"532d351e1d3a5e2b","type":"mqtt out","z":"8343d74debefd793","name":"/hue/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":750,"y":1340,"wires":[]},{"id":"39fca3d8c217e743","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"hue/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_hue\",\n \"unique_id\": flow.get('clientid') + \"_hue\",\n \"name\": flow.get('name') + \" Hue\",\n \"icon\": \"mdi:palette-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/hue\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/hue\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 0,\n \"max\": 360,\n \"step\": 1,\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":1340,"wires":[["532d351e1d3a5e2b"]]},{"id":"eba2c3bf1e63b285","type":"link in","z":"8343d74debefd793","name":"link in 226","links":["396f1bbe574a823e"],"x":475,"y":1340,"wires":[["39fca3d8c217e743"]]},{"id":"5a1fec8019369328","type":"mqtt out","z":"8343d74debefd793","name":"/sharpness/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":770,"y":1380,"wires":[]},{"id":"a95b89ab4272bb53","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"sharpness/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_sharpness\",\n \"unique_id\": flow.get('clientid') + \"_sharpness\",\n \"name\": flow.get('name') + \" Sharpness\",\n \"icon\": \"mdi:shark-fin-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/sharpness\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/sharpness\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 1,\n \"max\": 100,\n \"step\": 1,\n \"unit_of_measurement\": \"%\",\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":1380,"wires":[["5a1fec8019369328"]]},{"id":"19d5706fbd974909","type":"link in","z":"8343d74debefd793","name":"link in 227","links":["396f1bbe574a823e"],"x":475,"y":1380,"wires":[["a95b89ab4272bb53"]]},{"id":"58cdc322965fe980","type":"mqtt out","z":"8343d74debefd793","name":"/vibrancy/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":320,"y":1420,"wires":[]},{"id":"9ea1aa86a00fb3ef","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"vibrancy/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_vibrancy\",\n \"unique_id\": flow.get('clientid') + \"_vibrancy\",\n \"name\": flow.get('name') + \" Vibrancy\",\n \"icon\": \"mdi:palette-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/multimedia/image/vibrancy/value\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/multimedia/image/vibrancy/value\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 1,\n \"max\": 255,\n \"step\": 1,\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":150,"y":1420,"wires":[["58cdc322965fe980"]]},{"id":"1a6164ed621f2b77","type":"link in","z":"8343d74debefd793","name":"link in 228","links":["396f1bbe574a823e"],"x":35,"y":1420,"wires":[["9ea1aa86a00fb3ef"]]},{"id":"56bdf51940255fe4","type":"mqtt out","z":"8343d74debefd793","name":"/isomax/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":760,"y":1420,"wires":[]},{"id":"8489c196f9776b04","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"isomax/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_isomax\",\n \"unique_id\": flow.get('clientid') + \"_isomax\",\n \"name\": flow.get('name') + \" Max ISO\",\n \"icon\": \"mdi:brightness-6\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/areas/red/enable\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/alarm/areas/red/enable\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 1,\n \"max\": 32,\n \"step\": 1,\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":1420,"wires":[["56bdf51940255fe4"]]},{"id":"2992352e56e9b904","type":"link in","z":"8343d74debefd793","name":"link in 229","links":["396f1bbe574a823e"],"x":475,"y":1420,"wires":[["8489c196f9776b04"]]},{"id":"1b255eb9fe34ec4a","type":"mqtt out","z":"8343d74debefd793","name":"/autoircut/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":320,"y":1520,"wires":[]},{"id":"2369214ed26a11f9","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"autoircut/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_autoircut\",\n \"unique_id\": flow.get('clientid') + \"_autoircut\",\n \"name\": flow.get('name') + \" Auto IRcut\",\n \"icon\": \"mdi:lightbulb-night-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/features/nightvision/autoircut\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/features/nightvision/autoircut\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 0,\n \"max\": 2,\n \"step\": 1,\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":150,"y":1520,"wires":[["1b255eb9fe34ec4a"]]},{"id":"08e409ee830ec743","type":"link in","z":"8343d74debefd793","name":"link in 230","links":["396f1bbe574a823e"],"x":35,"y":1520,"wires":[["2369214ed26a11f9"]]},{"id":"33a1c4f4078e1c11","type":"mqtt out","z":"8343d74debefd793","name":"/autoled/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":320,"y":1560,"wires":[]},{"id":"616ca53ae4bd33d6","type":"function","z":"8343d74debefd793","name":"ha-number","func":"msg.topic = flow.get('ha-number') + \"autoled/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_autoled\",\n \"unique_id\": flow.get('clientid') + \"_autoled\",\n \"name\": flow.get('name') + \" Auto IR LEDs\",\n \"icon\": \"mdi:lightbulb-night-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/features/nightvision/autoled\",\n \"state_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status/features/nightvision/autoled\",\n \"value_template\": \"{{ value_json.val }}\",\n \"command_template\": \"{\\\"val\\\":\\\"{{ value }}\\\"}\",\n \"min\": 0,\n \"max\": 2,\n \"step\": 1,\n \"qos\": 1\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":150,"y":1560,"wires":[["33a1c4f4078e1c11"]]},{"id":"c2ddba12dc6ddabb","type":"link in","z":"8343d74debefd793","name":"link in 231","links":["396f1bbe574a823e"],"x":35,"y":1560,"wires":[["616ca53ae4bd33d6"]]},{"id":"71548f039ce608d7","type":"comment","z":"8343d74debefd793","name":"System Menu","info":"","x":90,"y":1480,"wires":[]},{"id":"38164570c4ddaf50","type":"mqtt out","z":"8343d74debefd793","name":"/reboot/config","topic":"","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8c9bd856c466f9b0","x":320,"y":1600,"wires":[]},{"id":"165d36f7b26ddd58","type":"function","z":"8343d74debefd793","name":"ha-button","func":"msg.topic = flow.get('ha-button') + \"reboot/config\"\n\nmsg.payload = {\n \"device\": {\n \"identifiers\": flow.get('clientid'),\n \"manufacturer\": flow.get('vendor'),\n \"model\": flow.get('series'),\n \"name\": flow.get('name'),\n \"configuration_url\": \"http://\" + flow.get('ipaddr') + \":\" + flow.get('httpport')\n },\n \"availability\": {\n \"topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/status\" + flow.get('lwt'),\n \"payload_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwon') + \"\\\"}\",\n \"payload_not_available\": \"{\\\"val\\\":\\\"\" + flow.get('lwoff') + \"\\\"}\"\n },\n \"object_id\": flow.get('clientid') + \"_reboot\",\n \"unique_id\": flow.get('clientid') + \"_reboot\",\n \"name\": flow.get('name') + \" Reboot\",\n \"icon\": \"mdi:cog-refresh-outline\",\n \"command_topic\": flow.get('prefix') + \"/\" + flow.get('id') + \"/system/reboot/now\",\n \"payload_press\": \"{\\\"val\\\":\\\"1\\\"}\",\n \"qos\": 1\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":1600,"wires":[["38164570c4ddaf50"]]},{"id":"8eb4da9d39d7db19","type":"link in","z":"8343d74debefd793","name":"link in 233","links":["396f1bbe574a823e"],"x":35,"y":1600,"wires":[["165d36f7b26ddd58"]]},{"id":"0535551206a4fb5a","type":"mqtt in","z":"8343d74debefd793","name":"smarthome/mqtt/lwt","topic":"","qos":"1","datatype":"json","broker":"8c9bd856c466f9b0","nl":false,"rap":false,"rh":0,"inputs":1,"x":410,"y":440,"wires":[["1d73b0eed18c7b13"]]},{"id":"080ae48b2b3ca958","type":"function","z":"8343d74debefd793","name":"topic","func":"const command = 'status/smarthome/mqtt/lwt';\nconst topic = flow.get('prefix') + '/' + flow.get('id') + '/' + command;\n\nmsg.topic = topic;\nmsg.action = \"subscribe\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":440,"wires":[["0535551206a4fb5a"]]},{"id":"f82fea691d42e0b5","type":"inject","z":"8343d74debefd793","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":440,"wires":[["080ae48b2b3ca958"]]},{"id":"bc84085af70faecf","type":"function","z":"8343d74debefd793","name":"flow.set('lwt')","func":"flow.set('lwt', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":790,"y":440,"wires":[[]]},{"id":"1d73b0eed18c7b13","type":"change","z":"8343d74debefd793","name":"value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":440,"wires":[["bc84085af70faecf"]]},{"id":"b964a752cf1ad8ee","type":"mqtt in","z":"8343d74debefd793","name":"smarthome/mqtt/lwon","topic":"","qos":"1","datatype":"json","broker":"8c9bd856c466f9b0","nl":false,"rap":false,"rh":0,"inputs":1,"x":420,"y":480,"wires":[["b53003ed77600efc"]]},{"id":"c032c4c7dc52b257","type":"function","z":"8343d74debefd793","name":"topic","func":"const command = 'status/smarthome/mqtt/lwon';\nconst topic = flow.get('prefix') + '/' + flow.get('id') + '/' + command;\n\nmsg.topic = topic;\nmsg.action = \"subscribe\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":480,"wires":[["b964a752cf1ad8ee"]]},{"id":"30efac5b9fd2ceb8","type":"inject","z":"8343d74debefd793","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":480,"wires":[["c032c4c7dc52b257"]]},{"id":"2e36f3c4fdf3d5c0","type":"function","z":"8343d74debefd793","name":"flow.set('lwon')","func":"flow.set('lwon', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":480,"wires":[[]]},{"id":"b53003ed77600efc","type":"change","z":"8343d74debefd793","name":"value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":480,"wires":[["2e36f3c4fdf3d5c0"]]},{"id":"ca623639979b63e1","type":"mqtt in","z":"8343d74debefd793","name":"smarthome/mqtt/lwoff","topic":"","qos":"1","datatype":"json","broker":"8c9bd856c466f9b0","nl":false,"rap":false,"rh":0,"inputs":1,"x":420,"y":520,"wires":[["149f856a78c9e54b"]]},{"id":"b692cf6ae5118555","type":"function","z":"8343d74debefd793","name":"topic","func":"const command = 'status/smarthome/mqtt/lwoff';\nconst topic = flow.get('prefix') + '/' + flow.get('id') + '/' + command;\n\nmsg.topic = topic;\nmsg.action = \"subscribe\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":520,"wires":[["ca623639979b63e1"]]},{"id":"5e9b567ce1c27f2e","type":"inject","z":"8343d74debefd793","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":520,"wires":[["b692cf6ae5118555"]]},{"id":"8e68b47bc0e30dde","type":"function","z":"8343d74debefd793","name":"flow.set('lwon')","func":"flow.set('lwoff', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":520,"wires":[[]]},{"id":"149f856a78c9e54b","type":"change","z":"8343d74debefd793","name":"value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":520,"wires":[["8e68b47bc0e30dde"]]},{"id":"8c9bd856c466f9b0","type":"mqtt-broker","name":"","broker":"192.168.2.115","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"5","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]