INSTAR Deutschland GmbH

IOBroker Visualisation



VIS installation

The vis adapter allows you to build your personal admin dashboard inside ioBroker. Head over to the Adapter tab and install Visualisation to get started:


ioBroker Installation

Vis is free for personal use but still requires you to get a license key from ioBroker:


ioBroker Installation

Head over to https://iobroker.net/login and login to your account (create a free account if you don't have one yet):


ioBroker Installation

Go to https://iobroker.net/accountLicenses and choose the free / private version of Iobroker.vis or the full version for commercial use:


ioBroker Installation

Click on show and copy the license key:


ioBroker Installation

Go back to the Vis Adapter configuration in ioBroker, paste your key in and click on Check License:


ioBroker Installation

The VIS Admin Panel

Now switch to the Instances tab and open your Vis Admin Panel in a new browser tab:


ioBroker Installation

ioBroker Installation

Go to Views and add a new view:


ioBroker Installation

ioBroker Installation

Communication via MQTT

We already set up the Mosquitto MQTT Server and installed the MQTT Adapter for ioBroker - so we are able to GET information from our IP camera, as well as sending command to our camera to SET values. Let's now configure the MQTT adapter to subscribe to every topic that starts with iobroker/:


ioBroker Installation

Copy the GET Flow below and import to Node-RED. The flow collects all variables that are used in Alarm Menu of an INSTAR HD Camera - the Trigger Node on top contains the login information for your camera - double-click it to add your camera's IP address and your Admin username and password. Deploy the flow and wait for the Trigger Node to trigger all the scripts below - you will see a small timestamp under every function node, once it got triggered:


ioBroker Installation

You can also use MQTT.fx to test your MQTT setup:


ioBroker Installation

All MQTT topics that were triggered - either by the Node-RED flow or MQTT.fx - will show up in the Objects list in ioBroker and can be used in VIS:


ioBroker Installation

Display Camera Settings

For example, we can drag a String Widget into our VIS view and bind it to a value that is published through MQTT:


ioBroker Installation

Select Object ID and choose the mdemailsnapswitch object we saw in the screenshot earlier - it will display it's payload value Alarm Email Deactivated in VIS:


ioBroker Installation

Display the Camera Live Stream

We can make use of our Snapshot Upload that we created earlier to use an Image Widget to display our camera's live video - in form of a JPG stream:


ioBroker Installation

Add the URL to your snapshot and set a refresh interval (in Milliseconds) - alternatively, you can use MotionEye to get your camera's live video into VIS.


ioBroker Installation

You can now open the web interface in a new tab:


ioBroker Installation

We added a few more String Widget to display more of our camera settings:


ioBroker Installation

Use VIS to Change Camera Settings

Go and copy the SET Flow below and import it to Node-RED. Then drag and drop a Stateful Button Widget into VIS. Click on Object ID and select one of the Objects (MQTT Topics) that set variables on your camera. Above we displayed the state of the Alarm Email Notification - we can now add a button that sets this state for us:


ioBroker Installation

The objects we need alarmemail_enable and alarmemail_disable will show up automatically when you retrigger the GET flow above (Click the Inject Node to re-set your camera login). Alternatively use the Buttons we added to the SET Flow:


ioBroker Installation

If you go to your Node-RED Dashboard, you will see the corresponding buttons. Just click the ones you need and they will show up in the ioBroker Object list:


ioBroker Installation

Select alarmemail_enable for the Enable Alarm Email button:


ioBroker Installation

Select alarmemail_disable for the Disable Alarm Email button:


ioBroker Installation

ioBroker Installation

Open the VIS interface and try your new buttons - the animation below shows that clicking the Disable Alarm Email button changes the state on our camera - as we can see from the String Widget next to the button and verify in the camera webUI:


ioBroker Installation

We prepared a collection of ioBroker VIS Widget that utilize the SET Flow we added to Node-RED. To use it, you first have to install the Metro Style Widgets from the Adapters list in ioBroker:


ioBroker Installation

Then copy the VIS Widgets below and import them into VIS:


ioBroker Installation

The result should look something like this:


ioBroker Installation

Open the VIS interface and verify that everything is working (we use the Node-RED dashboard to trigger an alarm - the Node-RED Flow behind it will automatically start a video recording and switch the IR LEDs to automatic. This function allows you to only use the PIR sensor of your INSTAR Full HD camera to detect motions - once detected the IR nightvision switches on and the recording starts rolling. You can adjust the duration inside the Node-RED flow.):


ioBroker Installation

GET Flow

[{"id":"9a1b363e.ef3978","type":"tab","label":"IOBroker GET","disabled":false,"info":""},{"id":"efb5b9f8.53c718","type":"http request","z":"9a1b363e.ef3978","name":"getptztour","method":"GET","ret":"txt","url":"","tls":"","x":656,"y":180,"wires":[["511039b9.2d0cb8"]]},{"id":"24a5c25e.47cace","type":"http request","z":"9a1b363e.ef3978","name":"getmdalarm&-aname=snap","method":"GET","ret":"txt","url":"","tls":"","x":710,"y":300,"wires":[["215390a7.ed068"]]},{"id":"6afbffad.b9b63","type":"http request","z":"9a1b363e.ef3978","name":"getmdalarm&-aname=record","method":"GET","ret":"txt","url":"","tls":"","x":700,"y":362,"wires":[["7a7b759.b4d218c"]]},{"id":"2e32ae86.039ee2","type":"http request","z":"9a1b363e.ef3978","name":"getmdalarm&-aname=ftprec","method":"GET","ret":"txt","url":"","tls":"","x":698,"y":422,"wires":[["29e745e0.c5f87a"]]},{"id":"d96cc446.892758","type":"http request","z":"9a1b363e.ef3978","name":"getmdalarm&-aname=relay","method":"GET","ret":"txt","url":"","tls":"","x":698,"y":482,"wires":[["1a9bb5e6.90fe6a"]]},{"id":"fb6915e2.613c78","type":"http request","z":"9a1b363e.ef3978","name":"getmdalarm&-aname=ftpsnap","method":"GET","ret":"txt","url":"","tls":"","x":698,"y":542,"wires":[["edd0b65c.7e9f68"]]},{"id":"f6dd2055.cedb7","type":"http request","z":"9a1b363e.ef3978","name":"getmdalarm&-aname=sound","method":"GET","ret":"txt","url":"","tls":"","x":698,"y":602,"wires":[["36f66e36.5047b2"]]},{"id":"4e1f8920.ac3f98","type":"http request","z":"9a1b363e.ef3978","name":"getmdalarm&-aname=type","method":"GET","ret":"txt","url":"","tls":"","x":688,"y":662,"wires":[["5b82d67c.112f48"]]},{"id":"dd033a6a.a67bd8","type":"http request","z":"9a1b363e.ef3978","name":"getaudioalarmattr","method":"GET","ret":"txt","url":"","tls":"","x":708,"y":754,"wires":[["ae9db7f.488cc48"]]},{"id":"ae9db7f.488cc48","type":"string","z":"9a1b363e.ef3978","name":"toJSON","methods":[{"name":"delRightMost","params":[{"type":"str","value":";"}]},{"name":"append","params":[{"type":"str","value":" }"}]},{"name":"prepend","params":[{"type":"str","value":"{ "}]},{"name":"replaceAll","params":[{"type":"str","value":"var "},{"type":"str","value":"\""}]},{"name":"replaceAll","params":[{"type":"str","value":"="},{"type":"str","value":"\":"}]},{"name":"replaceAll","params":[{"type":"str","value":";"},{"type":"str","value":","}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":858,"y":754,"wires":[["3bc0ec0c.8770a4"]]},{"id":"3bc0ec0c.8770a4","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":978,"y":754,"wires":[["a48f6929.96e7e8","b0a0bca2.bcd62","d071bfeb.f1219"]]},{"id":"17c660c4.5f81ef","type":"http request","z":"9a1b363e.ef3978","name":"getioattr","method":"GET","ret":"txt","url":"","tls":"","x":618,"y":872,"wires":[["24a8c0b3.f38c9"]]},{"id":"24a8c0b3.f38c9","type":"string","z":"9a1b363e.ef3978","name":"toJSON","methods":[{"name":"delRightMost","params":[{"type":"str","value":";"}]},{"name":"append","params":[{"type":"str","value":" }"}]},{"name":"prepend","params":[{"type":"str","value":"{ "}]},{"name":"replaceAll","params":[{"type":"str","value":"var "},{"type":"str","value":"\""}]},{"name":"replaceAll","params":[{"type":"str","value":"="},{"type":"str","value":"\":"}]},{"name":"replaceAll","params":[{"type":"str","value":";"},{"type":"str","value":","}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":738,"y":872,"wires":[["1b04e06b.41b23"]]},{"id":"1b04e06b.41b23","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":858,"y":872,"wires":[["8175451b.5abe38","cbe7e542.7b3d28"]]},{"id":"8175451b.5abe38","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.io_enable","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1024,"y":852,"wires":[["edfb10dc.b6fa1"]]},{"id":"cbe7e542.7b3d28","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.io_flag","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1024,"y":892,"wires":[["ed57e29b.52bd3"]]},{"id":"98692023.6adce","type":"http request","z":"9a1b363e.ef3978","name":"getpirattr","method":"GET","ret":"txt","url":"","tls":"","x":650,"y":1280,"wires":[["8ec9b67d.9b20f8"]]},{"id":"8ec9b67d.9b20f8","type":"string","z":"9a1b363e.ef3978","name":"toJSON","methods":[{"name":"delRightMost","params":[{"type":"str","value":";"}]},{"name":"append","params":[{"type":"str","value":" }"}]},{"name":"prepend","params":[{"type":"str","value":"{ "}]},{"name":"replaceAll","params":[{"type":"str","value":"var "},{"type":"str","value":"\""}]},{"name":"replaceAll","params":[{"type":"str","value":"="},{"type":"str","value":"\":"}]},{"name":"replaceAll","params":[{"type":"str","value":";"},{"type":"str","value":","}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":780,"y":1280,"wires":[["9877dd36.d618a"]]},{"id":"9877dd36.d618a","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":900,"y":1280,"wires":[["e16906ae.407688","90e8e869.1a9be8"]]},{"id":"e16906ae.407688","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.pir_enable","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1073,"y":1260,"wires":[["41dbb98e.f123d8"]]},{"id":"90e8e869.1a9be8","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.pir_flag","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1073,"y":1300,"wires":[["ec1084cd.f4a4b8"]]},{"id":"9060263e.cf71a8","type":"http request","z":"9a1b363e.ef3978","name":"getalarmsnapattr","method":"GET","ret":"txt","url":"","tls":"","x":707,"y":1069,"wires":[["5fb8408.b937cc"]]},{"id":"5fb8408.b937cc","type":"string","z":"9a1b363e.ef3978","name":"toJSON","methods":[{"name":"delRightMost","params":[{"type":"str","value":";"}]},{"name":"append","params":[{"type":"str","value":" }"}]},{"name":"prepend","params":[{"type":"str","value":"{ "}]},{"name":"replaceAll","params":[{"type":"str","value":"var "},{"type":"str","value":"\""}]},{"name":"replaceAll","params":[{"type":"str","value":"="},{"type":"str","value":"\":"}]},{"name":"replaceAll","params":[{"type":"str","value":";"},{"type":"str","value":","}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":857,"y":1069,"wires":[["b576a17a.3031f"]]},{"id":"b576a17a.3031f","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":977,"y":1069,"wires":[["a7c3dd7b.cbe6b","b6d7e6f7.86a068","d19edda4.601e1","2eadf9.3dc39208","8b63c430.e80a58","545544f1.7cc5ec","69ffcd42.5bfe24"]]},{"id":"a74f5f1b.926b4","type":"change","z":"9a1b363e.ef3978","name":"change 1/0","rules":[{"t":"change","p":"payload.snap_name_mode","pt":"msg","from":"0","fromt":"str","to":"fixed name","tot":"str"},{"t":"change","p":"payload.snap_name_mode","pt":"msg","from":"1","fromt":"str","to":"timestamp","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1290,"y":1068,"wires":[["5aa5f3ae.8c32dc"]]},{"id":"573a96f0.68edd8","type":"http request","z":"9a1b363e.ef3978","name":"getmdattr","method":"GET","ret":"txt","url":"","tls":"","x":648,"y":2639,"wires":[["92c0b016.92a8f"]]},{"id":"92c0b016.92a8f","type":"string","z":"9a1b363e.ef3978","name":"toJSON","methods":[{"name":"delRightMost","params":[{"type":"str","value":";"}]},{"name":"append","params":[{"type":"str","value":" }"}]},{"name":"prepend","params":[{"type":"str","value":"{ "}]},{"name":"replaceAll","params":[{"type":"str","value":"var "},{"type":"str","value":"\""}]},{"name":"replaceAll","params":[{"type":"str","value":"="},{"type":"str","value":"\":"}]},{"name":"replaceAll","params":[{"type":"str","value":";"},{"type":"str","value":","}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":778,"y":2639,"wires":[["c59a5757.556ca8"]]},{"id":"c59a5757.556ca8","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":898,"y":2639,"wires":[["dff157d9.47d218","5111316e.b6fc3","72a7289b.f60d68","14f754c6.15ec2b","30784835.936c48","91464312.91197","da2ec2be.8e5d4","26d08150.09876e","665065f5.becbfc","bb519b4e.33cc48","c72ef999.616e98","4b397847.812818","4f2ebed8.f74e4","615cfd68.fd0534","978cacb2.0d9b2","1c1897d8.42cb28","113d64f2.9c70bb","667520d2.b3bc7","959e39ac.86c388","1cbcab8.31bbb55","bed3f968.7e5598","dd39efbf.848af","5c5ebc4.0c32f44","cf648c68.e0d38","d1bb1a08.4f9218","a88bfeae.97036","2b9d155e.6d9e3a","d282075e.f78f98"]]},{"id":"c6b5a5f9.501948","type":"http request","z":"9a1b363e.ef3978","name":"getscheduleex&-ename=md","method":"GET","ret":"txt","url":"","tls":"","x":718,"y":1862,"wires":[["1b7ad576.03102b"]]},{"id":"1b7ad576.03102b","type":"string","z":"9a1b363e.ef3978","name":"toJSON","methods":[{"name":"delRightMost","params":[{"type":"str","value":";"}]},{"name":"append","params":[{"type":"str","value":" }"}]},{"name":"prepend","params":[{"type":"str","value":"{ "}]},{"name":"replaceAll","params":[{"type":"str","value":"var "},{"type":"str","value":"\""}]},{"name":"replaceAll","params":[{"type":"str","value":"="},{"type":"str","value":"\":"}]},{"name":"replaceAll","params":[{"type":"str","value":";"},{"type":"str","value":","}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":900,"y":1862,"wires":[["64828d5b.725834"]]},{"id":"64828d5b.725834","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":1016,"y":1862,"wires":[["21123770.f56de8","99e94a11.ecf0d8","331821f8.41f03e","798b572a.27b8b8","13da789e.a75297","57119483.5fac4c","4385c3d7.a60a4c","93086b62.39c698"]]},{"id":"7a8bf3d9.e3862c","type":"function","z":"9a1b363e.ef3978","name":"getmdattr","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getmdattr\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdattr&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":368,"y":2639,"wires":[["ee246f5f.0f5ce"]]},{"id":"4e7d0375.692bcc","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":2639,"wires":[["4be040f1.b9925"]]},{"id":"4be040f1.b9925","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":238,"y":2639,"wires":[["7a8bf3d9.e3862c"]]},{"id":"ee246f5f.0f5ce","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":508,"y":2639,"wires":[["573a96f0.68edd8"]]},{"id":"97562de5.bad1e","type":"function","z":"9a1b363e.ef3978","name":"getscheduleex","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getscheduleex\";\nmsg.payload = ip+\"/param.cgi?cmd=getscheduleex&-ename=md&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":378,"y":1862,"wires":[["2504c011.fa326"]]},{"id":"7bb7529b.0992fc","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":1862,"wires":[["99cefb67.911d58"]]},{"id":"99cefb67.911d58","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":238,"y":1862,"wires":[["97562de5.bad1e"]]},{"id":"2504c011.fa326","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":528,"y":1862,"wires":[["c6b5a5f9.501948"]]},{"id":"1829b90f.26b117","type":"function","z":"9a1b363e.ef3978","name":"getpirattr","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getpirattr\";\nmsg.payload = ip+\"/param.cgi?cmd=getpirattr&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":1280,"wires":[["bfd286b4.fa9c78"]]},{"id":"84de651b.ec9078","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":91,"y":1280,"wires":[["696a8202.b09a5c"]]},{"id":"696a8202.b09a5c","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":240,"y":1280,"wires":[["1829b90f.26b117"]]},{"id":"bfd286b4.fa9c78","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":1280,"wires":[["98692023.6adce"]]},{"id":"4d60a619.f015c8","type":"function","z":"9a1b363e.ef3978","name":"getalarmsnapattr","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getalarmsnapattr\";\nmsg.payload = ip+\"/param.cgi?cmd=getalarmsnapattr&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":387,"y":1069,"wires":[["9d123b5b.596268"]]},{"id":"63d41bdc.885cf4","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":1069,"wires":[["336913c0.d91b0c"]]},{"id":"336913c0.d91b0c","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":236,"y":1069,"wires":[["4d60a619.f015c8"]]},{"id":"9d123b5b.596268","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":547,"y":1069,"wires":[["9060263e.cf71a8"]]},{"id":"c5f5e8c5.464b88","type":"function","z":"9a1b363e.ef3978","name":"getaudioalarmattr","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getaudioalarmattr\";\nmsg.payload = ip+\"/param.cgi?cmd=getaudioalarmattr&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":388,"y":754,"wires":[["21503e4b.0d4032"]]},{"id":"409ed07e.e7645","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":754,"wires":[["2ecbb476.ff6ecc"]]},{"id":"2ecbb476.ff6ecc","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":238,"y":754,"wires":[["c5f5e8c5.464b88"]]},{"id":"21503e4b.0d4032","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":548,"y":754,"wires":[["dd033a6a.a67bd8"]]},{"id":"5ed42a97.f9e6b4","type":"function","z":"9a1b363e.ef3978","name":"getioattr","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getioattr\";\nmsg.payload = ip+\"/param.cgi?cmd=getioattr&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":358,"y":872,"wires":[["5d07be89.b7075"]]},{"id":"779d1583.763b2c","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":872,"wires":[["1ff10807.c8a218"]]},{"id":"1ff10807.c8a218","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":238,"y":872,"wires":[["5ed42a97.f9e6b4"]]},{"id":"5d07be89.b7075","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":488,"y":872,"wires":[["17c660c4.5f81ef"]]},{"id":"309cc813.ad90d8","type":"function","z":"9a1b363e.ef3978","name":"getmdalarm","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getmdalarm\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=sound&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":368,"y":602,"wires":[["8f473ba9.046988"]]},{"id":"add1398f.bcb5a8","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":602,"wires":[["1d1adb40.f1d385"]]},{"id":"1d1adb40.f1d385","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":238,"y":602,"wires":[["309cc813.ad90d8"]]},{"id":"8f473ba9.046988","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":508,"y":602,"wires":[["f6dd2055.cedb7"]]},{"id":"88ce7ff4.955ec","type":"function","z":"9a1b363e.ef3978","name":"getmdalarm","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getmdalarm\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=type&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":368,"y":662,"wires":[["3bd67cb4.d08f54"]]},{"id":"7b3ce700.22d628","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":662,"wires":[["da836824.9789a8"]]},{"id":"da836824.9789a8","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":238,"y":662,"wires":[["88ce7ff4.955ec"]]},{"id":"3bd67cb4.d08f54","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":508,"y":662,"wires":[["4e1f8920.ac3f98"]]},{"id":"5d496dff.9063b4","type":"function","z":"9a1b363e.ef3978","name":"getmdalarm","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getmdalarm\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=relay&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":368,"y":482,"wires":[["e0b775df.448db8"]]},{"id":"e1c4d17a.2e45c","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":482,"wires":[["d770ece1.23a2f"]]},{"id":"d770ece1.23a2f","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":238,"y":482,"wires":[["5d496dff.9063b4"]]},{"id":"e0b775df.448db8","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":508,"y":482,"wires":[["d96cc446.892758"]]},{"id":"4f90cc71.bd3584","type":"function","z":"9a1b363e.ef3978","name":"getmdalarm","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getmdalarm\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=ftpsnap&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":368,"y":542,"wires":[["a885c0cd.091e3"]]},{"id":"3230337b.7afe2c","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":542,"wires":[["43ed16c1.ce88e8"]]},{"id":"43ed16c1.ce88e8","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":238,"y":542,"wires":[["4f90cc71.bd3584"]]},{"id":"a885c0cd.091e3","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":508,"y":542,"wires":[["fb6915e2.613c78"]]},{"id":"5a370de5.3435d4","type":"function","z":"9a1b363e.ef3978","name":"getmdalarm","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getmdalarm\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=record&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":362,"wires":[["5f2d725b.82f81c"]]},{"id":"5942a73b.07ef98","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":362,"wires":[["98f8ddf.db0ff2"]]},{"id":"98f8ddf.db0ff2","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":239,"y":362,"wires":[["5a370de5.3435d4"]]},{"id":"5f2d725b.82f81c","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":362,"wires":[["6afbffad.b9b63"]]},{"id":"d5aea2f7.074aa","type":"function","z":"9a1b363e.ef3978","name":"getmdalarm","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getmdalarm\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=ftprec&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":368,"y":422,"wires":[["c1bc06db.978ea8"]]},{"id":"636d43d8.bdb01c","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":422,"wires":[["b7b2d74e.084178"]]},{"id":"b7b2d74e.084178","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":238,"y":422,"wires":[["d5aea2f7.074aa"]]},{"id":"c1bc06db.978ea8","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":508,"y":422,"wires":[["2e32ae86.039ee2"]]},{"id":"4a520677.fc2e78","type":"function","z":"9a1b363e.ef3978","name":"emailsnap","func":"// var ip = global.ip;\n// var user = global.user;\n// var password = global.password;\nvar ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"emailsnap\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=emailsnap&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":379,"y":180,"wires":[["d9e5a499.ebb308"]]},{"id":"d9e5a499.ebb308","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":516,"y":180,"wires":[["efb5b9f8.53c718"]]},{"id":"91f185f9.82e598","type":"function","z":"9a1b363e.ef3978","name":"getmdalarm","func":"var ip = msg.payload.ip;\nvar user = msg.payload.user;\nvar password = msg.payload.password;\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"getmdalarm\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=snap&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":300,"wires":[["3df561ab.d3ec3e"]]},{"id":"5713eabc.0ac984","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":88,"y":300,"wires":[["382efe5f.9a8e32"]]},{"id":"382efe5f.9a8e32","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":250,"y":300,"wires":[["91f185f9.82e598"]]},{"id":"3df561ab.d3ec3e","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":300,"wires":[["24a5c25e.47cace"]]},{"id":"9811824d.96002","type":"change","z":"9a1b363e.ef3978","name":"Set Global Login","rules":[{"t":"set","p":"ip","pt":"global","to":"payload.ip","tot":"msg"},{"t":"set","p":"password","pt":"global","to":"payload.password","tot":"msg"},{"t":"set","p":"user","pt":"global","to":"payload.user","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":282,"y":54.5,"wires":[["fc57ff06.79986","1579b51b.fcc8ab","9d269ff7.4aea","990b587c.835a88"]]},{"id":"fc57ff06.79986","type":"mqtt out","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":270,"y":120,"wires":[]},{"id":"a605b17d.107dc","type":"inject","z":"9a1b363e.ef3978","name":"5min Trigger","topic":"Global Login","payload":"{\"ip\":\"192.168.2.113\", \"user\":\"admin\", \"password\":\"1029384756\"}","payloadType":"json","repeat":"18000","crontab":"","once":true,"onceDelay":"25","x":110,"y":54.5,"wires":[["9811824d.96002"]]},{"id":"95c92daf.37abc","type":"mqtt in","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":93,"y":180,"wires":[["30ddf6e8.633dea"]]},{"id":"30ddf6e8.633dea","type":"json","z":"9a1b363e.ef3978","name":"","property":"payload","action":"","pretty":false,"x":245,"y":180,"wires":[["4a520677.fc2e78"]]},{"id":"4d53558d.3c41cc","type":"mqtt out","z":"9a1b363e.ef3978","name":"Alarm Video to SD","topic":"iobroker/ipcam/alarmget/md_record_switch","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1042,"y":362,"wires":[]},{"id":"d279968e.850aa8","type":"mqtt out","z":"9a1b363e.ef3978","name":"Alarm Video to FTP","topic":"iobroker/ipcam/alarmget/md_ftprec_switch","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1042,"y":420,"wires":[]},{"id":"21e2c54d.4b8b1a","type":"mqtt out","z":"9a1b363e.ef3978","name":"Alarm Out Relay","topic":"iobroker/ipcam/alarmget/md_relay_switch","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1028,"y":482,"wires":[]},{"id":"d90d8efa.285b1","type":"mqtt out","z":"9a1b363e.ef3978","name":"Alarm Snapshot to FTP","topic":"iobroker/ipcam/alarmget/md_ftpsnap_switch","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1053,"y":540,"wires":[]},{"id":"c8fca19f.bf7b5","type":"mqtt out","z":"9a1b363e.ef3978","name":"Audio Alarm Signal","topic":"iobroker/ipcam/alarmget/md_sound_switch","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1040,"y":602,"wires":[]},{"id":"6ba912f6.1d2b3c","type":"mqtt out","z":"9a1b363e.ef3978","name":"Areas & Input","topic":"iobroker/ipcam/alarmget/md_alarm_type","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1023,"y":662,"wires":[]},{"id":"93aa5f41.940e7","type":"mqtt out","z":"9a1b363e.ef3978","name":"Audio Detection","topic":"iobroker/ipcam/alarmget/aa_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1447,"y":714,"wires":[]},{"id":"499264c2.89468c","type":"mqtt out","z":"9a1b363e.ef3978","name":"Sensitivity","topic":"iobroker/ipcam/alarmget/aa_value","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1308,"y":754,"wires":[]},{"id":"d19e3f3c.a9197","type":"mqtt out","z":"9a1b363e.ef3978","name":"Duration","topic":"iobroker/ipcam/alarmget/aa_time","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1310,"y":794,"wires":[]},{"id":"5efeac60.c22a14","type":"mqtt out","z":"9a1b363e.ef3978","name":"Alarm Input","topic":"iobroker/ipcam/alarmget/io_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1300,"y":852,"wires":[]},{"id":"5f9c4ee9.12def","type":"mqtt out","z":"9a1b363e.ef3978","name":"Circuit","topic":"iobroker/ipcam/alarmget/io_flag","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1289,"y":892,"wires":[]},{"id":"2eadf9.3dc39208","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.snap_chn","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1128,"y":949,"wires":[["925988b7.aeded8"]]},{"id":"d19edda4.601e1","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.snap_name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1131,"y":988,"wires":[["bbaf498a.9f2d78"]]},{"id":"b6d7e6f7.86a068","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.snap_timer_name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1132,"y":1029,"wires":[["212848f.12ecfb8"]]},{"id":"a7c3dd7b.cbe6b","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.snap_name_mode","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1133,"y":1068,"wires":[["a74f5f1b.926b4"]]},{"id":"8b63c430.e80a58","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.snap_count","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1134,"y":1108,"wires":[["12ecf2e.ba6490d"]]},{"id":"545544f1.7cc5ec","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.email_snap_count","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1134,"y":1148,"wires":[["7ac4244d.d2614c"]]},{"id":"69ffcd42.5bfe24","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.ftp_snap_count","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1133,"y":1188,"wires":[["a443d20.e6e423"]]},{"id":"ecb45c5b.e7705","type":"mqtt out","z":"9a1b363e.ef3978","name":"Alarm Snapshot","topic":"iobroker/ipcam/alarmget/snap_chn","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1427,"y":949,"wires":[]},{"id":"bbaf498a.9f2d78","type":"mqtt out","z":"9a1b363e.ef3978","name":"File Name (Alarm)","topic":"iobroker/ipcam/alarmget/snap_name","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1313,"y":988,"wires":[]},{"id":"212848f.12ecfb8","type":"mqtt out","z":"9a1b363e.ef3978","name":"File Name (Photoseries)","topic":"iobroker/ipcam/alarmget/snap_timer_name","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1321,"y":1029,"wires":[]},{"id":"5aa5f3ae.8c32dc","type":"mqtt out","z":"9a1b363e.ef3978","name":"Filename by","topic":"iobroker/ipcam/alarmget/snap_name_mode","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1429,"y":1067,"wires":[]},{"id":"12ecf2e.ba6490d","type":"mqtt out","z":"9a1b363e.ef3978","name":"SD Card Snapshots","topic":"iobroker/ipcam/alarmget/snap_count","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1313,"y":1108,"wires":[]},{"id":"7ac4244d.d2614c","type":"mqtt out","z":"9a1b363e.ef3978","name":"Email Snapshots","topic":"iobroker/ipcam/alarmget/email_snap_count","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1313,"y":1148,"wires":[]},{"id":"a443d20.e6e423","type":"mqtt out","z":"9a1b363e.ef3978","name":"FTP Snapshots","topic":"iobroker/ipcam/alarmget/ftp_snap_count","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1302,"y":1187,"wires":[]},{"id":"e795fb49.601198","type":"mqtt out","z":"9a1b363e.ef3978","name":"PIR Sensor","topic":"iobroker/ipcam/alarmget/pir_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1350,"y":1260,"wires":[]},{"id":"c7b783ca.f4681","type":"mqtt out","z":"9a1b363e.ef3978","name":"Circuit","topic":"iobroker/ipcam/alarmget/pir_flag","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1340,"y":1300,"wires":[]},{"id":"71e03054.7f6ca","type":"mqtt out","z":"9a1b363e.ef3978","name":"ETM","topic":"iobroker/ipcam/alarmget/etm","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1334,"y":1723,"wires":[]},{"id":"af2f294e.1d8798","type":"mqtt out","z":"9a1b363e.ef3978","name":"Sunday","topic":"iobroker/ipcam/alarmget/week0","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1334,"y":1760,"wires":[]},{"id":"6fbe21a3.2c5a1","type":"mqtt out","z":"9a1b363e.ef3978","name":"Monday","topic":"iobroker/ipcam/alarmget/week1","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1334,"y":1801,"wires":[]},{"id":"e59ca243.39aa6","type":"mqtt out","z":"9a1b363e.ef3978","name":"Tuesday","topic":"iobroker/ipcam/alarmget/week2","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1334,"y":1841,"wires":[]},{"id":"65098db0.b00c04","type":"mqtt out","z":"9a1b363e.ef3978","name":"Wednesday","topic":"iobroker/ipcam/alarmget/week3","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1344,"y":1881,"wires":[]},{"id":"815fd207.ccf0a","type":"mqtt out","z":"9a1b363e.ef3978","name":"Thursday","topic":"iobroker/ipcam/alarmget/week4","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1346,"y":1921,"wires":[]},{"id":"59e87f92.c487d","type":"mqtt out","z":"9a1b363e.ef3978","name":"Friday","topic":"iobroker/ipcam/alarmget/week5","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1336,"y":1961,"wires":[]},{"id":"800edf47.4579a","type":"mqtt out","z":"9a1b363e.ef3978","name":"Saturday","topic":"iobroker/ipcam/alarmget/week6","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1346,"y":2001,"wires":[]},{"id":"92fce5d2.250ca8","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 1 Threshold","topic":"iobroker/ipcam/alarmget/m1_threshold","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1340,"y":2164,"wires":[]},{"id":"c62369f4.2baed8","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 1 X Axis Origin","topic":"iobroker/ipcam/alarmget/m1_x","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1340,"y":2204,"wires":[]},{"id":"9f528d10.2447e","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 1 Y Axis Origin","topic":"iobroker/ipcam/alarmget/m1_y","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1338,"y":2244,"wires":[]},{"id":"47d056a3.3b9c68","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 1 Width","topic":"iobroker/ipcam/alarmget/m1_w","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1328,"y":2284,"wires":[]},{"id":"f772df18.17b36","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 1 Height","topic":"iobroker/ipcam/alarmget/m1_h","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1328,"y":2324,"wires":[]},{"id":"ff5223c3.a540f","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 2 Threshold","topic":"iobroker/ipcam/alarmget/m2_threshold","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1339,"y":2464,"wires":[]},{"id":"f2005df1.18f4c","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 2 X Axis Origin","topic":"iobroker/ipcam/alarmget/m2_x","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1339,"y":2504,"wires":[]},{"id":"5fef3559.44c1ec","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 2 Y Axis Origin","topic":"iobroker/ipcam/alarmget/m2_y","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1339,"y":2544,"wires":[]},{"id":"27c47c87.cbf954","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 2 Width","topic":"iobroker/ipcam/alarmget/m2_w","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1329,"y":2584,"wires":[]},{"id":"72bd5d8c.3969c4","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 2 Height","topic":"iobroker/ipcam/alarmget/m2_h","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1329,"y":2624,"wires":[]},{"id":"49ae45ba.56139c","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 3 Threshold","topic":"iobroker/ipcam/alarmget/m3_threshold","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1340,"y":2764,"wires":[]},{"id":"5a7b1c84.8767b4","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 3 X Axis Origin","topic":"iobroker/ipcam/alarmget/m3_x","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1340,"y":2804,"wires":[]},{"id":"79cb4513.21687c","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 3 Y Axis Origin","topic":"iobroker/ipcam/alarmget/m3_y","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1340,"y":2844,"wires":[]},{"id":"4eb36fa5.1a449","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 3 Width","topic":"iobroker/ipcam/alarmget/m3_w","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1330,"y":2884,"wires":[]},{"id":"51465506.9f401c","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 3 Height","topic":"iobroker/ipcam/alarmget/m3_h","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1330,"y":2924,"wires":[]},{"id":"8962d2a4.1c5c7","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 4 Threshold","topic":"iobroker/ipcam/alarmget/m4_threshold","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1341,"y":3067,"wires":[]},{"id":"a6e3fd96.8a25a","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 4 X Axis Origin","topic":"iobroker/ipcam/alarmget/m4_x","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1341,"y":3107,"wires":[]},{"id":"e88c350e.d72118","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 4 Y Axis Origin","topic":"iobroker/ipcam/alarmget/m4_y","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1341,"y":3147,"wires":[]},{"id":"a1af00c.3cba","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 4 Width","topic":"iobroker/ipcam/alarmget/m4_w","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1331,"y":3187,"wires":[]},{"id":"9527a4f2.a991c8","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 4 Height","topic":"iobroker/ipcam/alarmget/m4_h","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1331,"y":3227,"wires":[]},{"id":"511039b9.2d0cb8","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_emailsnap_switch=\"off\";"},{"type":"str","value":"Alarm Email Deactivated"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_emailsnap_switch=\"on\";"},{"type":"str","value":"Alarm Email Activated"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":786,"y":180,"wires":[["42bcc262.e0d70c"]]},{"id":"42bcc262.e0d70c","type":"mqtt out","z":"9a1b363e.ef3978","name":"Alarm Email","topic":"iobroker/ipcam/alarmget/md_emailsnap_switch","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":916,"y":180,"wires":[]},{"id":"215390a7.ed068","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_snap_switch=\"off\";"},{"type":"str","value":"Alarm Snapshot to SD Card Deactivated"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_snap_switch=\"on\";"},{"type":"str","value":"Alarm Snapshot to SD Card Activated"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":892,"y":300,"wires":[["200fb42f.195f7c"]]},{"id":"200fb42f.195f7c","type":"mqtt out","z":"9a1b363e.ef3978","name":"Alarm Snap to SD","topic":"iobroker/ipcam/alarmget/md_snap_switch","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1044,"y":300,"wires":[]},{"id":"7a7b759.b4d218c","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_record_switch=\"off\";"},{"type":"str","value":"Alarm Video to SD Card Deactivated"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_record_switch=\"on\";"},{"type":"str","value":"Alarm Video to SD Card Activated"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":890,"y":362,"wires":[["4d53558d.3c41cc"]]},{"id":"29e745e0.c5f87a","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_ftprec_switch=\"off\";"},{"type":"str","value":"Alarm Video to FTP Deactivated"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_ftprec_switch=\"on\";"},{"type":"str","value":"Alarm Video to FTP Activated"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":883,"y":420,"wires":[["d279968e.850aa8"]]},{"id":"1a9bb5e6.90fe6a","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_relay_switch=\"off\";"},{"type":"str","value":"Alarm-Out Deactivated"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_relay_switch=\"on\";"},{"type":"str","value":"Alarm-Out Activated"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":883,"y":482,"wires":[["21e2c54d.4b8b1a"]]},{"id":"edd0b65c.7e9f68","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_ftpsnap_switch=\"off\";"},{"type":"str","value":"Alarm Snapshot to FTP Deactivated"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_ftpsnap_switch=\"on\";"},{"type":"str","value":"Alarm Snapshot to FTP Activated"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":883,"y":540,"wires":[["d90d8efa.285b1"]]},{"id":"36f66e36.5047b2","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_sound_switch=\"off\";"},{"type":"str","value":"Alarm Audio Signal Deactivated"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_sound_switch=\"on\";"},{"type":"str","value":"Alarm Audio Signal Activated"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":883,"y":602,"wires":[["c8fca19f.bf7b5"]]},{"id":"5b82d67c.112f48","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_alarm_type=\"off\";"},{"type":"str","value":"Areas & PIR Not Coupled"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_alarm_type=\"on\";"},{"type":"str","value":"Areas & PIR Coupled"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":870,"y":662,"wires":[["6ba912f6.1d2b3c"]]},{"id":"e42faa2b.77dca8","type":"mqtt out","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login/password","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":665,"y":114,"wires":[]},{"id":"bfc2a4b5.3023f8","type":"mqtt out","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login/user","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":655,"y":67,"wires":[]},{"id":"1fb97ed4.8c48e1","type":"mqtt out","z":"9a1b363e.ef3978","name":"","topic":"iobroker/ipcam/login/ip","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":645,"y":20,"wires":[]},{"id":"1579b51b.fcc8ab","type":"change","z":"9a1b363e.ef3978","name":"ip","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.ip","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":481,"y":20,"wires":[["1fb97ed4.8c48e1"]]},{"id":"9d269ff7.4aea","type":"change","z":"9a1b363e.ef3978","name":"user","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.user","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":481,"y":67,"wires":[["bfc2a4b5.3023f8"]]},{"id":"990b587c.835a88","type":"change","z":"9a1b363e.ef3978","name":"user","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.password","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":481,"y":114,"wires":[["e42faa2b.77dca8"]]},{"id":"a48f6929.96e7e8","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.aa_enable","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1139,"y":714,"wires":[["31aca376.56df4c"]]},{"id":"b0a0bca2.bcd62","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.aa_value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1139,"y":754,"wires":[["499264c2.89468c"]]},{"id":"d071bfeb.f1219","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.aa_time","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1139,"y":794,"wires":[["d19e3f3c.a9197"]]},{"id":"31aca376.56df4c","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"0"},{"type":"str","value":"Audio Detection Disabled"}]},{"name":"replaceAll","params":[{"type":"str","value":"1"},{"type":"str","value":"Audio Detection Enabled"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1297,"y":714,"wires":[["93aa5f41.940e7"]]},{"id":"925988b7.aeded8","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"11"},{"type":"str","value":"Alarm Snapshot in High resolution"}]},{"name":"replaceAll","params":[{"type":"str","value":"12"},{"type":"str","value":"Alarm Snapshot in Medium resolution"}]},{"name":"replaceAll","params":[{"type":"str","value":"13"},{"type":"str","value":"Alarm Snapshot in Low Resolution"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1283,"y":949,"wires":[["ecb45c5b.e7705"]]},{"id":"edfb10dc.b6fa1","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"0"},{"type":"str","value":"Alarm Input Disabled"}]},{"name":"replaceAll","params":[{"type":"str","value":"1"},{"type":"str","value":"Alarm Input Enabled"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1173,"y":852,"wires":[["5efeac60.c22a14"]]},{"id":"ed57e29b.52bd3","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"1"},{"type":"str","value":"N.O."}]},{"name":"replaceAll","params":[{"type":"str","value":"0"},{"type":"str","value":"N.C."}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1173,"y":892,"wires":[["5f9c4ee9.12def"]]},{"id":"41dbb98e.f123d8","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"0"},{"type":"str","value":"PIR Disabled"}]},{"name":"replaceAll","params":[{"type":"str","value":"1"},{"type":"str","value":"PIR Enabled"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1220,"y":1260,"wires":[["e795fb49.601198"]]},{"id":"ec1084cd.f4a4b8","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"1"},{"type":"str","value":"N.O."}]},{"name":"replaceAll","params":[{"type":"str","value":"0"},{"type":"str","value":"N.C."}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1218,"y":1300,"wires":[["c7b783ca.f4681"]]},{"id":"21123770.f56de8","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.etm","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1188,"y":1724,"wires":[["71e03054.7f6ca"]]},{"id":"99e94a11.ecf0d8","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.week0","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1187,"y":1760,"wires":[["af2f294e.1d8798"]]},{"id":"331821f8.41f03e","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.week0","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1188,"y":1801,"wires":[["6fbe21a3.2c5a1"]]},{"id":"798b572a.27b8b8","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.week0","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1189,"y":1841,"wires":[["e59ca243.39aa6"]]},{"id":"13da789e.a75297","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.week0","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":1881,"wires":[["65098db0.b00c04"]]},{"id":"57119483.5fac4c","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.week0","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1193,"y":1921,"wires":[["815fd207.ccf0a"]]},{"id":"4385c3d7.a60a4c","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.week0","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1193,"y":1961,"wires":[["59e87f92.c487d"]]},{"id":"93086b62.39c698","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.week0","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1193,"y":2000,"wires":[["800edf47.4579a"]]},{"id":"a052d3fe.300fb","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 1","topic":"iobroker/ipcam/alarmget/m1_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1429,"y":2080,"wires":[]},{"id":"99e17574.aaef98","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 1 Sensitivity","topic":"iobroker/ipcam/alarmget/m1_sensitivity","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1341,"y":2120,"wires":[]},{"id":"dff157d9.47d218","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m1_enable","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1151,"y":2080,"wires":[["418cec97.9bb664"]]},{"id":"5111316e.b6fc3","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m1_sensitivity","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1150,"y":2120,"wires":[["99e17574.aaef98"]]},{"id":"418cec97.9bb664","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"0"},{"type":"str","value":"Area 1 Disabled"}]},{"name":"replaceAll","params":[{"type":"str","value":"1"},{"type":"str","value":"Area 1 Enabled"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1310,"y":2080,"wires":[["a052d3fe.300fb"]]},{"id":"bdad01dd.e57a6","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 2","topic":"iobroker/ipcam/alarmget/m2_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1427,"y":2384,"wires":[]},{"id":"e308d7d2.2e4cb8","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 2 Sensitivity","topic":"iobroker/ipcam/alarmget/m2_sensitivity","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1338,"y":2424,"wires":[]},{"id":"72a7289b.f60d68","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m2_enable","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1149,"y":2384,"wires":[["f81496ac.ffe908"]]},{"id":"14f754c6.15ec2b","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m2_sensitivity","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1149,"y":2424,"wires":[["e308d7d2.2e4cb8"]]},{"id":"f81496ac.ffe908","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"0"},{"type":"str","value":"Area 2 Disabled"}]},{"name":"replaceAll","params":[{"type":"str","value":"1"},{"type":"str","value":"Area 2 Enabled"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1313,"y":2384,"wires":[["bdad01dd.e57a6"]]},{"id":"e8d21035.c4d2a","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 3","topic":"iobroker/ipcam/alarmget/m3_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1429,"y":2686,"wires":[]},{"id":"15a55512.eb67eb","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 3 Sensitivity","topic":"iobroker/ipcam/alarmget/m3_sensitivity","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1340,"y":2725,"wires":[]},{"id":"30784835.936c48","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m3_enable","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1151,"y":2685,"wires":[["ddbe2724.f9a608"]]},{"id":"91464312.91197","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m3_sensitivity","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1151,"y":2725,"wires":[["15a55512.eb67eb"]]},{"id":"ddbe2724.f9a608","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"0"},{"type":"str","value":"Area 3 Disabled"}]},{"name":"replaceAll","params":[{"type":"str","value":"1"},{"type":"str","value":"Area 3 Enabled"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1315,"y":2686,"wires":[["e8d21035.c4d2a"]]},{"id":"df45f7f4.dd8ba8","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 4 Sensitivity","topic":"iobroker/ipcam/alarmget/m4_sensitivity","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1339,"y":3027,"wires":[]},{"id":"1c0e1a4b.8eacc6","type":"mqtt out","z":"9a1b363e.ef3978","name":"Area 4","topic":"iobroker/ipcam/alarmget/m4_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1428,"y":2989,"wires":[]},{"id":"da2ec2be.8e5d4","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m4_enable","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1151,"y":2990,"wires":[["702e1642.f32e98"]]},{"id":"26d08150.09876e","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m4_sensitivity","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1151,"y":3027,"wires":[["df45f7f4.dd8ba8"]]},{"id":"702e1642.f32e98","type":"string","z":"9a1b363e.ef3978","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"0"},{"type":"str","value":"Area 4 Disabled"}]},{"name":"replaceAll","params":[{"type":"str","value":"1"},{"type":"str","value":"Area 4 Enabled"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1313,"y":2990,"wires":[["1c0e1a4b.8eacc6"]]},{"id":"665065f5.becbfc","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m1_threshold","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1147,"y":2164,"wires":[["92fce5d2.250ca8"]]},{"id":"bb519b4e.33cc48","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m1_x","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1145,"y":2205,"wires":[["c62369f4.2baed8"]]},{"id":"c72ef999.616e98","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m1_y","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1145,"y":2244,"wires":[["9f528d10.2447e"]]},{"id":"4b397847.812818","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m1_w","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1148,"y":2284,"wires":[["47d056a3.3b9c68"]]},{"id":"4f2ebed8.f74e4","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m1_h","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1148,"y":2323,"wires":[["f772df18.17b36"]]},{"id":"615cfd68.fd0534","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m2_threshold","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1152,"y":2464,"wires":[["ff5223c3.a540f"]]},{"id":"978cacb2.0d9b2","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m2_x","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1149,"y":2505,"wires":[["f2005df1.18f4c"]]},{"id":"1c1897d8.42cb28","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m2_y","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1149,"y":2544,"wires":[["5fef3559.44c1ec"]]},{"id":"113d64f2.9c70bb","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m2_w","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1152,"y":2584,"wires":[["27c47c87.cbf954"]]},{"id":"667520d2.b3bc7","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m2_h","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1152,"y":2623,"wires":[["72bd5d8c.3969c4"]]},{"id":"959e39ac.86c388","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m3_threshold","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1152,"y":2764,"wires":[["49ae45ba.56139c"]]},{"id":"1cbcab8.31bbb55","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m3_x","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1149,"y":2805,"wires":[["5a7b1c84.8767b4"]]},{"id":"bed3f968.7e5598","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m3_y","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1149,"y":2844,"wires":[["79cb4513.21687c"]]},{"id":"dd39efbf.848af","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m3_w","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1152,"y":2884,"wires":[["4eb36fa5.1a449"]]},{"id":"5c5ebc4.0c32f44","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m3_h","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1152,"y":2923,"wires":[["51465506.9f401c"]]},{"id":"cf648c68.e0d38","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m4_threshold","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1156,"y":3067,"wires":[["8962d2a4.1c5c7"]]},{"id":"d1bb1a08.4f9218","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m4_x","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1153,"y":3108,"wires":[["a6e3fd96.8a25a"]]},{"id":"a88bfeae.97036","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m4_y","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1153,"y":3147,"wires":[["e88c350e.d72118"]]},{"id":"2b9d155e.6d9e3a","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m4_w","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1156,"y":3187,"wires":[["a1af00c.3cba"]]},{"id":"d282075e.f78f98","type":"change","z":"9a1b363e.ef3978","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.m4_h","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1156,"y":3226,"wires":[["9527a4f2.a991c8"]]},{"id":"80fd9eab.17aa2","type":"mqtt-broker","z":"","name":"openhabian MQTT Broker","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

SET Flow

[{"id":"55fbaa78.039334","type":"tab","label":"IOBroker SET","disabled":false,"info":""},{"id":"ce061c32.ed8a9","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Email","topic":"iobroker/ipcam/alarmset/alarmemail_enable","qos":"1","broker":"c27c1878.5dace8","x":80,"y":135,"wires":[["3d4ea78.0d75f58"]]},{"id":"3d4ea78.0d75f58","type":"function","z":"55fbaa78.039334","name":"Email Enabled","func":"// var ip = msg.payload.ip;\n// var user = msg.payload.user;\n// var password = msg.payload.password;\nvar ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"emailsnap\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=emailsnap&-switch=on&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=emailsnap&-switch=on&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":230,"y":133,"wires":[["8ee3f58.4efff08"]]},{"id":"3ff0f7c8.514448","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"true"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Parameter Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":630,"y":133,"wires":[["84be7f59.2e18b","bcc76210.285e6"]]},{"id":"8ee3f58.4efff08","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":133,"wires":[["3b96aaeb.cee226"]]},{"id":"3b96aaeb.cee226","type":"http request","z":"55fbaa78.039334","name":"emailsnap","method":"GET","ret":"txt","url":"","tls":"","x":500,"y":133,"wires":[["3ff0f7c8.514448","96766ee.6f6f99"]]},{"id":"240b7fdb.1e45a","type":"mqtt out","z":"55fbaa78.039334","name":"Enable Email","topic":"iobroker/ipcam/alarmset/alarmemail_enable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":250,"y":41,"wires":[]},{"id":"7949981b.85be28","type":"ui_button","z":"55fbaa78.039334","name":"Enable Email","group":"3d67cd48.de9b32","order":0,"width":0,"height":0,"passthru":true,"label":"Enable Email","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"true","payloadType":"bool","topic":"emailsnap","x":92,"y":41,"wires":[["240b7fdb.1e45a"]]},{"id":"39e9d23d.4fa5fe","type":"ui_button","z":"55fbaa78.039334","name":"Disable Email","group":"3d67cd48.de9b32","order":0,"width":0,"height":0,"passthru":true,"label":"Disable Email","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"false","payloadType":"bool","topic":"emailsnap","x":92,"y":87,"wires":[["e2f6734d.18db3"]]},{"id":"e09a83bb.b05dc","type":"function","z":"55fbaa78.039334","name":"Email Disabled","func":"// var ip = msg.payload.ip;\n// var user = msg.payload.user;\n// var password = msg.payload.password;\nvar ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"emailsnap\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=emailsnap&-switch=off&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=emailsnap&-switch=off&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":230,"y":181,"wires":[["b7ae91dc.3209e"]]},{"id":"b7ae91dc.3209e","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":181,"wires":[["4007a0d7.3104c"]]},{"id":"4007a0d7.3104c","type":"http request","z":"55fbaa78.039334","name":"emailsnap","method":"GET","ret":"txt","url":"","tls":"","x":500,"y":181,"wires":[["96b171e6.bba66","b8552e6a.b0dfe"]]},{"id":"96b171e6.bba66","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Parameter Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":629,"y":181,"wires":[["84be7f59.2e18b","a7b7ae2e.0e76b"]]},{"id":"ad1632a.72cf6d","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Snap","topic":"iobroker/ipcam/alarmset/alarmsnap_enable","qos":"1","broker":"c27c1878.5dace8","x":80,"y":380,"wires":[["df8278df.92b918"]]},{"id":"df8278df.92b918","type":"function","z":"55fbaa78.039334","name":"Snap Enabled","func":"var ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"snap\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=snap&-switch=on&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=snap&-switch=on&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":232,"y":380,"wires":[["c7cb749b.e8d1f8"]]},{"id":"eeb95450.95a868","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"true"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Parameter Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":619,"y":380,"wires":[["ab0867c1.204ea8"]]},{"id":"c7cb749b.e8d1f8","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":372,"y":380,"wires":[["3fe077d8.5b1a68"]]},{"id":"3fe077d8.5b1a68","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":492,"y":380,"wires":[["eeb95450.95a868"]]},{"id":"848124ee.35ee58","type":"ui_button","z":"55fbaa78.039334","name":"Enable Snap","group":"18ed0f6.6a79cf1","order":0,"width":0,"height":0,"passthru":true,"label":"Enable Snap","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{\"val\" : \"ON\"}","payloadType":"json","topic":"snap","x":90,"y":297,"wires":[["af041ca0.80ba3"]]},{"id":"fcd6368f.0d88d8","type":"ui_button","z":"55fbaa78.039334","name":"Disable Snap","group":"18ed0f6.6a79cf1","order":0,"width":0,"height":0,"passthru":true,"label":"Disable Snap","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{\"val\" : \"OFF\"}","payloadType":"json","topic":"snap","x":90,"y":340,"wires":[["8c8e38c2.36c6e8"]]},{"id":"b63d358a.edad08","type":"function","z":"55fbaa78.039334","name":"Snap Disabled","func":"var ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"snap\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=snap&-switch=off&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=snap&-switch=off&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":232,"y":420,"wires":[["65446394.b1557c"]]},{"id":"65446394.b1557c","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":372,"y":420,"wires":[["c611c1b4.76d1e"]]},{"id":"c611c1b4.76d1e","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":492,"y":420,"wires":[["2254359e.79ccea"]]},{"id":"2254359e.79ccea","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Param Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":618,"y":420,"wires":[["ab0867c1.204ea8"]]},{"id":"8e3c6e6d.bc6a9","type":"mqtt in","z":"55fbaa78.039334","name":"Enable FTP Snap","topic":"iobroker/ipcam/alarmset/ftpsnap_enable","qos":"1","broker":"c27c1878.5dace8","x":90,"y":620,"wires":[["df66e716.0d6958"]]},{"id":"df66e716.0d6958","type":"function","z":"55fbaa78.039334","name":"FTPSnap Enabled","func":"var ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"ftpsnap\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=ftpsnap&-switch=on&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=ftpsnap&-switch=on&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":260,"y":621,"wires":[["95192b15.023cc8"]]},{"id":"e7c46856.2dc168","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"true"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Parameter Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":646,"y":621,"wires":[["d9529528.b97a18"]]},{"id":"95192b15.023cc8","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":621,"wires":[["5ae796df.6d67a8"]]},{"id":"5ae796df.6d67a8","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":530,"y":621,"wires":[["e7c46856.2dc168"]]},{"id":"75426bde.4816b4","type":"mqtt out","z":"55fbaa78.039334","name":"Enable FTP Snap","topic":"iobroker/ipcam/alarmset/ftpsnap_enable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":281,"y":540,"wires":[]},{"id":"1c044604.45841a","type":"ui_button","z":"55fbaa78.039334","name":"Disable FTP Snap","group":"ff46617f.a2a15","order":3,"width":0,"height":0,"passthru":true,"label":"Disable FTP Snap","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{\"val\" : \"OFF\"}","payloadType":"json","topic":"snap","x":101,"y":580,"wires":[["8338f6a5.eeba08"]]},{"id":"90c01baf.0f7378","type":"function","z":"55fbaa78.039334","name":"FTPSnap Disabled","func":"var ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"ftpsnap\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=ftpsnap&-switch=off&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=ftpsnap&-switch=off&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":260,"y":661,"wires":[["5dbdc1a3.6fba9"]]},{"id":"5dbdc1a3.6fba9","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":661,"wires":[["245600af.1315b"]]},{"id":"245600af.1315b","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":530,"y":661,"wires":[["75b991a2.a08d1"]]},{"id":"75b991a2.a08d1","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Parameter Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":646,"y":661,"wires":[["d9529528.b97a18"]]},{"id":"2620d456.8ba81c","type":"ui_button","z":"55fbaa78.039334","name":"Enable FTP Snap","group":"ff46617f.a2a15","order":2,"width":0,"height":0,"passthru":true,"label":"Enable FTP Snap","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{\"val\" : \"ON\"}","payloadType":"json","topic":"snap","x":101,"y":540,"wires":[["75426bde.4816b4"]]},{"id":"74ccc178.f846a","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Rec","topic":"iobroker/ipcam/alarmset/alarmrec_enable","qos":"1","broker":"c27c1878.5dace8","x":80,"y":860,"wires":[["5296e9b1.6bff68"]]},{"id":"5296e9b1.6bff68","type":"function","z":"55fbaa78.039334","name":"Recording Enabled","func":"var ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"record\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=record&-switch=on&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=record&-switch=on&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":237,"y":860,"wires":[["d3124d66.ce847"]]},{"id":"e941922c.34826","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"true"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Parameter Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":628,"y":860,"wires":[["c6c3d3c0.ab83"]]},{"id":"d3124d66.ce847","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":387,"y":860,"wires":[["d5ee53.a00ed1b"]]},{"id":"d5ee53.a00ed1b","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":507,"y":860,"wires":[["e941922c.34826"]]},{"id":"1f063a27.282fa6","type":"mqtt out","z":"55fbaa78.039334","name":"Enable Rec","topic":"iobroker/ipcam/alarmset/alarmrec_enable","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":260,"y":780,"wires":[]},{"id":"152ca609.e5ed7a","type":"ui_button","z":"55fbaa78.039334","name":"Disable Recording","group":"4a68bd5e.07e164","order":3,"width":0,"height":0,"passthru":false,"label":"Disable Recording","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{\"val\" : \"OFF\"}","payloadType":"json","topic":"snap","x":100,"y":820,"wires":[["ebb67c72.8eb7f"]]},{"id":"e41812d5.5845d","type":"function","z":"55fbaa78.039334","name":"Recording Disabled","func":"var ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"record\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=record&-switch=off&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=record&-switch=off&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":237,"y":900,"wires":[["7e8dd39a.2eb17c"]]},{"id":"7e8dd39a.2eb17c","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":387,"y":900,"wires":[["8aed0420.17d678"]]},{"id":"8aed0420.17d678","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":507,"y":900,"wires":[["fbb889e1.f89c78"]]},{"id":"fbb889e1.f89c78","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Parameter Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":627,"y":900,"wires":[["c6c3d3c0.ab83"]]},{"id":"c5694d63.c0432","type":"ui_button","z":"55fbaa78.039334","name":"Enable Recording","group":"4a68bd5e.07e164","order":2,"width":0,"height":0,"passthru":false,"label":"Enable Recording","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{\"val\" : \"ON\"}","payloadType":"json","topic":"snap","x":100,"y":780,"wires":[["1f063a27.282fa6"]]},{"id":"654e4bd9.d77014","type":"mqtt in","z":"55fbaa78.039334","name":"Enable FTP Rec","topic":"iobroker/ipcam/alarmset/ftprec_enable","qos":"1","broker":"c27c1878.5dace8","x":90,"y":1100,"wires":[["fe4a7fbe.e2a0f"]]},{"id":"fe4a7fbe.e2a0f","type":"function","z":"55fbaa78.039334","name":"FTP Recording Enabled","func":"var ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"ftprec\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=ftprec&-switch=on&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=ftprec&-switch=on&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":270,"y":1100,"wires":[["f7bc28b9.f5cf98"]]},{"id":"a98d49e0.014a88","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"true"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Parameter Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":666,"y":1100,"wires":[["3b914507.e42c1a"]]},{"id":"f7bc28b9.f5cf98","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":425,"y":1100,"wires":[["65cad7f9.ff0888"]]},{"id":"65cad7f9.ff0888","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":545,"y":1100,"wires":[["a98d49e0.014a88"]]},{"id":"383309e9.048d86","type":"mqtt out","z":"55fbaa78.039334","name":"Enable FTP Rec","topic":"iobroker/ipcam/alarmset/ftprec_enable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":292,"y":1020,"wires":[]},{"id":"ccf1ddf4.cc5b9","type":"ui_button","z":"55fbaa78.039334","name":"Disable FTP Recording","group":"76d78eaa.c2978","order":3,"width":0,"height":0,"passthru":false,"label":"Disable FTP Recording","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{\"val\" : \"OFF\"}","payloadType":"json","topic":"snap","x":110,"y":1060,"wires":[["83e97eb1.17d6f"]]},{"id":"5929ce7d.05514","type":"function","z":"55fbaa78.039334","name":"FTP Recording Disabled","func":"var ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"record\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=ftprec&-switch=off&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=ftprec&-switch=off&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":270,"y":1140,"wires":[["67899db9.55f3e4"]]},{"id":"67899db9.55f3e4","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":425,"y":1140,"wires":[["5d1cb6a4.1fe408"]]},{"id":"5d1cb6a4.1fe408","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":545,"y":1140,"wires":[["b38db682.4811d8"]]},{"id":"b38db682.4811d8","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Parameter Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":665,"y":1140,"wires":[["3b914507.e42c1a"]]},{"id":"b2da6b3a.a40118","type":"ui_button","z":"55fbaa78.039334","name":"Enable FTP Recording","group":"76d78eaa.c2978","order":2,"width":0,"height":0,"passthru":false,"label":"Enable FTP Recording","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{\"val\" : \"ON\"}","payloadType":"json","topic":"snap","x":110,"y":1020,"wires":[["383309e9.048d86"]]},{"id":"95aab3ae.fa414","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Alarm Out","topic":"iobroker/ipcam/alarmset/alarmout_enable","qos":"1","broker":"c27c1878.5dace8","x":90,"y":1340,"wires":[["864da753.3d6698"]]},{"id":"864da753.3d6698","type":"function","z":"55fbaa78.039334","name":"Relay Enabled","func":"var ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// Update the status with current timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd  = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm  = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss  = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nvar currenttime= hh + \":\" + mmm + \":\" + ss;\nvar currentdate= dd + \".\" + mm + \".\" + yyyy;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Last update: \" + currentdate + \" - \" + currenttime});\n\nmsg.topic = \"relay\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=relay&-switch=on&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=relay&-switch=on&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":263,"y":1340,"wires":[["290f947d.be3c5c"]]},{"id":"6c72eaff.a28c34","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"true"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"Parameter Error"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":640,"y":1340,"wires":[["c84878e4.8eb968"]]},{"id":"290f947d.be3c5c","type":"change","z":"55fbaa78.039334","name":"Set URL","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":399,"y":1340,"wires":[["4c97d9