INSTAR Deutschland GmbH

IOBroker Visualisation



VIS Installation

Mit dem vis-Adapter können Sie Ihr persönliches Admin-Dashboard in ioBroker erstellen. Gehen Sie zur Registerkarte Adapter und installieren Sie Visualisierung, um zu beginnen:


ioBroker Installation

Vis ist kostenlos für den persönlichen Gebrauch, erfordert jedoch weiterhin einen Lizenzschlüssel von ioBroker:


ioBroker Installation

Gehen Sie zu https://iobroker.net/login und melden Sie sich bei Ihrem Konto an (erstellen Sie ein kostenloses Konto, falls Sie noch keines haben):


ioBroker Installation

Gehen Sie zu https://iobroker.net/accountLicenses und wählen Sie die kostenlose / private Version von Iobroker.vis oder die Vollversion für die kommerzielle Nutzung:


ioBroker Installation

Klicken Sie auf show und kopieren Sie den Lizenzschlüssel:


ioBroker Installation

Gehen Sie zurück zur Vis-Adapter-Konfiguration in ioBroker, fügen Sie Ihren Schlüssel ein und klicken Sie auf Check License:


ioBroker Installation

Das VIS Admin Panel

Wechseln Sie nun zur Registerkarte Instances und öffnen Sie Ihren Vis-Admin-Bereich in einer neuen Browser-Registerkarte:


ioBroker Installation

ioBroker Installation

Gehen Sie zu Views und fügen Sie eine neue Ansicht hinzu:


ioBroker Installation

ioBroker Installation

Kommunikation über MQTT

Wir hatten bereits einen Mosquitto MQTT Server installiert und den MQTT Adapter für ioBroker eingerichtet - so sind wir in der Lage, Informationen von unserer IP-Kamera zu erhalten und Befehle an unsere Kamera zu senden. Lassen Sie uns nun den MQTT-Adapter so konfigurieren, dass er jedes Topic abonniert, das mit iobroker/ beginnt:


ioBroker Installation

Kopieren Sie den GET Flow unten und importieren Sie ihn in Node-RED. Der Flow erfasst alle Variablen, die im Alarm Menu Ihrer INSTAR FHD Kamera verwendet werden. Der Auslöserknoten oben enthält die Anmeldeinformationen für Ihre Kamera. Doppelklicken Sie darauf, um die IP-Adresse und Ihren Admin-Benutzernamen und Kennwort Ihrer Kamera hinzuzufügen. Klicken Sie auf Deploy um den Flow bereitzustellen und warten Sie, bis der Auslöserknoten alle unten stehenden Skripts auslöst. Nach jedem Auslösen wird unter jedem Funktionsknoten ein kleiner Zeitstempel angezeigt:


ioBroker Installation

Sie können auch das Programm MQTT.fx nutzen um Ihre MQTT Konfiguration zu teste:


ioBroker Installation

Alle MQTT-Topics, die entweder vom Node-RED-Flow oder von MQTT.fx ausgelöst wurden, werden in der Objektliste in ioBroker angezeigt und können in VIS verwendet werden:


ioBroker Installation

Kameraeinstellungen anzeigen

Beispielsweise können wir ein String-Widget in unsere VIS-Ansicht ziehen und an einen Wert binden, der über MQTT veröffentlicht wird:


ioBroker Installation

Wählen Sie Object ID aus und wählen Sie das Objekt mdemailsnapswitch aus, das wir im Screenshot zuvor gesehen haben. Es zeigt den Payload Alarm Email Deactivated in VIS an:


ioBroker Installation

Zeigen Sie den Kamera-Livestream an

Wir können den Snapshot Upload, den wir zuvor erstellt haben, mit einem Bild-Widget verwenden, um das Live-Video unserer Kamera anzuzeige:


ioBroker Installation

Fügen Sie die URL zu Ihrem Schnappschuss hinzu, und legen Sie ein Aktualisierungsintervall fest (in Millisekunden). - Alternativ können Sie [MotionEye](/Erweitert/IOBrokeraufRaspberryPi/motionEye/)_ verwenden, um das Live-Video Ihrer Kamera in VIS anzuzeigen.


ioBroker Installation

Sie können die Weboberfläche jetzt in einer neuen Registerkarte öffnen:


ioBroker Installation

Wir haben ein paar weitere String Widget hinzugefügt, um mehr von unseren Kameraeinstellungen anzuzeigen:


ioBroker Installation

Verwenden Sie VIS, um die Kameraeinstellungen zu ändern

Kopiere Sie den SET Flow unten und importiere Sie Ihn in Node-RED. Ziehen Sie dann ein Stateful Button Widget in den Arbeitsbereich in VIS. Klicken Sie auf Objekt-ID und wählen Sie eines der Objekte (MQTT-Topics) aus, die Variablen für Ihre Kamera festlegen. Oben haben wir den Status der Alarm-E-Mail-Benachrichtigung angezeigt. Jetzt können wir eine Schaltfläche hinzufügen, die diesen Status für uns festlegt:


ioBroker Installation

Die benötigten Objekte alarmemail_enable und alarmemail_disable werden automatisch angezeigt, wenn Sie den GET-Flow oben erneut auslösen (Klicken Sie auf den Inject-Node, um den Kamera-Login erneut festzulegen). Alternativ können Sie die Buttons verwenden, die wir mit dem SET Flow hinzugefügt haben:


ioBroker Installation

Wenn Sie zu Ihrem Node-RED-Dashboard wechseln, werden die entsprechenden Schaltflächen angezeigt. Klicken Sie einfach auf die gewünschten Objekte, die in der ioBroker-Objektliste benötigen:


ioBroker Installation

Wählen Sie alarmemail_enable für die Schaltfläche Enable Alarm Email:


ioBroker Installation

Wählen Sie alarmemail_disable für die Schaltfläche Disable Alarm Email:


ioBroker Installation

ioBroker Installation

Öffnen Sie die VIS-Benutzeroberfläche und probieren Sie Ihre neuen Schaltflächen aus. Die unten abgebildete Animation zeigt, dass das Klicken auf die Schaltfläche Disable Alarm Email den Status auf unserer Kamera ändert. Dies können Sie dem String-Widget neben der Schaltfläche entnehmen und in der Kamera-Weboberfläche überprüfen:


ioBroker Installation

Wir haben eine Sammlung von ioBroker VIS Widget vorbereitet, die den SET Flow verwenden, den wir zu Node-RED hinzugefügt haben. Um es zu verwenden, müssen Sie zuerst die Metro Style Widgets aus der Adapterliste in ioBroker installieren:


ioBroker Installation

Kopieren Sie anschließend die VIS Widgets unten und importieren Sie sie in VIS:


ioBroker Installation

Das Ergebnis sollte ungefähr so aussehen:


ioBroker Installation

Öffnen Sie die VIS-Benutzeroberfläche und stellen Sie sicher, dass alles funktioniert. (Wir verwenden das Node-RED-Dashboard, um einen Alarm auszulösen. Der dahinter liegende Node-RED-Flow startet automatisch eine Videoaufnahme und schaltet die IR-LEDs auf automatisch. Diese Funktion ermöglicht es Ihnen nur den PIR-Sensor Ihrer INSTAR Full HD-Kamera verwenden, um Bewegungen zu erkennen. Sobald eine Bewegung erkannt wurde, wird die IR-Nachtsicht eingeschaltet und die Aufnahme gestartet. Sie können die Aufnahmedauer im Node-RED-Flow einstellen.):


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":[["4c97d90.8df6d28"]]},{"id":"4c97d90.8df6d28","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":519,"y":1340,"wires":[["6c72eaff.a28c34"]]},{"id":"a0ad346d.704b28","type":"mqtt out","z":"55fbaa78.039334","name":"Enable Alarm Out","topic":"iobroker/ipcam/alarmset/alarmout_enable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":300,"y":1260,"wires":[]},{"id":"5ce12ab.3a2e7d4","type":"ui_button","z":"55fbaa78.039334","name":"Disable Output Relay","group":"abde7906.c35f68","order":3,"width":0,"height":0,"passthru":false,"label":"Disable Output Relay","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{\"val\" : \"OFF\"}","payloadType":"json","topic":"snap","x":110,"y":1300,"wires":[["e1f6e69e.2a0ae8"]]},{"id":"4005e62e.4d38c8","type":"function","z":"55fbaa78.039334","name":"Relay 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 = \"relay\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=relay&-switch=off&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=relay&-switch=off&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":263,"y":1380,"wires":[["e2e9abbe.f97578"]]},{"id":"e2e9abbe.f97578","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":1380,"wires":[["8e572c08.d0189"]]},{"id":"8e572c08.d0189","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":519,"y":1380,"wires":[["6d825c82.971c04"]]},{"id":"6d825c82.971c04","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":639,"y":1380,"wires":[["c84878e4.8eb968"]]},{"id":"ce204be5.f88858","type":"ui_button","z":"55fbaa78.039334","name":"Enable Output Relay","group":"abde7906.c35f68","order":2,"width":0,"height":0,"passthru":false,"label":"Enable Output Relay","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{\"val\" : \"ON\"}","payloadType":"json","topic":"snap","x":110,"y":1260,"wires":[["a0ad346d.704b28"]]},{"id":"503745da.0f804c","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Alarm Signal","topic":"iobroker/ipcam/alarmset/alarmsignal_enable","qos":"1","broker":"c27c1878.5dace8","x":100,"y":1580,"wires":[["48c6226c.6b22ec"]]},{"id":"48c6226c.6b22ec","type":"function","z":"55fbaa78.039334","name":"Audio Alarm Signal 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 = \"sound\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=sound&-switch=on&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=sound&-switch=on&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":306,"y":1580,"wires":[["f0d1a64d.58fd18"]]},{"id":"58e70d4a.ec1c04","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":725,"y":1580,"wires":[["e5e00d17.5d886","a383f3d1.34753"]]},{"id":"f0d1a64d.58fd18","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":484,"y":1580,"wires":[["3924c74d.b4fc78"]]},{"id":"3924c74d.b4fc78","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":604,"y":1580,"wires":[["58e70d4a.ec1c04","7c1aec4f.fb3614"]]},{"id":"4a1cdc0a.7e3d84","type":"mqtt out","z":"55fbaa78.039334","name":"Enable Alarm Signal","topic":"iobroker/ipcam/alarmset/alarmsignal_enable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":330,"y":1500,"wires":[]},{"id":"bc6fd54d.46bb38","type":"ui_button","z":"55fbaa78.039334","name":"Audio Alarm Signal Disable ","group":"d9e3395b.7c1048","order":3,"width":0,"height":0,"passthru":false,"label":"Audio Alarm Signal Disable ","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"false","payloadType":"bool","topic":"snap","x":120,"y":1540,"wires":[["66a1b204.96985c"]]},{"id":"c9856a29.8c40c8","type":"function","z":"55fbaa78.039334","name":"Audio Alarm Signal 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 = \"sound\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=sound&-switch=off&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":309,"y":1620,"wires":[["63fc7a31.7e2524"]]},{"id":"63fc7a31.7e2524","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":484,"y":1620,"wires":[["26ff4d0e.6973e2"]]},{"id":"26ff4d0e.6973e2","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":604,"y":1620,"wires":[["51569b1b.5bf8f4","e2be367d.4095b8"]]},{"id":"51569b1b.5bf8f4","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":724,"y":1620,"wires":[["e5e00d17.5d886","d2d4660b.ce07c8"]]},{"id":"1caf5415.2f21bc","type":"ui_button","z":"55fbaa78.039334","name":"Audio Alarm Signal Enabled","group":"d9e3395b.7c1048","order":2,"width":0,"height":0,"passthru":false,"label":"Audio Alarm Signal Enabled","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"true","payloadType":"bool","topic":"snap","x":120,"y":1500,"wires":[["4a1cdc0a.7e3d84"]]},{"id":"341642b2.7c74de","type":"mqtt in","z":"55fbaa78.039334","name":"PIR Link","topic":"iobroker/ipcam/alarmset/areapir_link","qos":"1","broker":"c27c1878.5dace8","x":70,"y":1820,"wires":[["36521cbd.7dcb84"]]},{"id":"36521cbd.7dcb84","type":"function","z":"55fbaa78.039334","name":"Link PIR & Areas","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 = \"type\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=type&-switch=on&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=type&-switch=on&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":217,"y":1820,"wires":[["c35f7509.9e1f58"]]},{"id":"7c5a0508.e4863c","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":606,"y":1820,"wires":[["20422ac6.653446","5df2ca9e.8b6f64"]]},{"id":"c35f7509.9e1f58","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":365,"y":1820,"wires":[["40b4c7f2.20d1f8"]]},{"id":"40b4c7f2.20d1f8","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":485,"y":1820,"wires":[["7c5a0508.e4863c","319363ac.7bff8c"]]},{"id":"c9a93662.eb0a88","type":"mqtt out","z":"55fbaa78.039334","name":"PIR Link","topic":"iobroker/ipcam/alarmset/areapir_link","qos":"1","retain":"","broker":"c27c1878.5dace8","x":252,"y":1740,"wires":[]},{"id":"ce8c0699.603e68","type":"ui_button","z":"55fbaa78.039334","name":"Unlink PIR & Areas","group":"d1e2de4b.16362","order":3,"width":0,"height":0,"passthru":false,"label":"Unlink PIR & Areas","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{\"val\" : \"OFF\"}","payloadType":"json","topic":"snap","x":100,"y":1780,"wires":[["a3748b24.6f7638"]]},{"id":"7712b861.47f998","type":"function","z":"55fbaa78.039334","name":"Unlink PIR $ Areas","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 = \"type\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdalarm&-aname=type&-switch=off&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setmdalarm&-aname=type&-switch=off&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":236,"y":1864,"wires":[["d8b80a58.70e8e8"]]},{"id":"d8b80a58.70e8e8","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":386,"y":1864,"wires":[["c0e2ee3d.bdb67"]]},{"id":"c0e2ee3d.bdb67","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":506,"y":1864,"wires":[["7b37e4db.2dc2cc","d62cdbc9.47a408"]]},{"id":"7b37e4db.2dc2cc","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":626,"y":1864,"wires":[["20422ac6.653446","ed04935b.12ffe"]]},{"id":"4bba2ee2.19901","type":"ui_button","z":"55fbaa78.039334","name":"Link PIR & Areas","group":"d1e2de4b.16362","order":2,"width":0,"height":0,"passthru":false,"label":"Link PIR & Areas","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{\"val\" : \"ON\"}","payloadType":"json","topic":"snap","x":100,"y":1740,"wires":[["c9a93662.eb0a88"]]},{"id":"709f7ac2.bc5f24","type":"http request","z":"55fbaa78.039334","name":"emailsnap","method":"GET","ret":"txt","url":"","tls":"","x":610,"y":220,"wires":[["eaec3234.65c8b"]]},{"id":"168875e3.9fd35a","type":"function","z":"55fbaa78.039334","name":"emailsnap","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 = \"emailsnap\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=emailsnap&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":220,"wires":[["f6e50c3d.2c5e6"]]},{"id":"b5cdd52.8457128","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":81,"y":220,"wires":[["e8888e5c.e85a5"]]},{"id":"e8888e5c.e85a5","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":205,"y":220,"wires":[["168875e3.9fd35a"]]},{"id":"f6e50c3d.2c5e6","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":476,"y":220,"wires":[["709f7ac2.bc5f24"]]},{"id":"eaec3234.65c8b","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_emailsnap_switch=\"off\";"},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_emailsnap_switch=\"on\";"},{"type":"str","value":"true"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":738,"y":220,"wires":[["84be7f59.2e18b","7fdc917f.c7f0b"]]},{"id":"8791cd1e.a45aa","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":570,"y":461,"wires":[["b26b626f.f816d"]]},{"id":"3946d1c.018b22e","type":"function","z":"55fbaa78.039334","name":"snap","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 = \"snap\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=snap&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":322,"y":461,"wires":[["af7baf96.44135"]]},{"id":"8e7e07df.cdaf28","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":81,"y":461,"wires":[["29018035.b34c"]]},{"id":"29018035.b34c","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":206,"y":461,"wires":[["3946d1c.018b22e"]]},{"id":"af7baf96.44135","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":446,"y":461,"wires":[["8791cd1e.a45aa"]]},{"id":"b26b626f.f816d","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_snap_switch=\"off\";"},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_snap_switch=\"on\";"},{"type":"str","value":"true"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":685,"y":461,"wires":[["ab0867c1.204ea8"]]},{"id":"fbf8ba15.d29ee8","type":"http request","z":"55fbaa78.039334","name":"ftpsnap","method":"GET","ret":"txt","url":"","tls":"","x":590,"y":700,"wires":[["4f8e5b4d.1e8314"]]},{"id":"5c7e63d9.a93bac","type":"function","z":"55fbaa78.039334","name":"ftpsnap","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 = \"ftpsnap\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=ftpsnap&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":700,"wires":[["4c6bc027.32c21"]]},{"id":"e6005751.267c68","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":80,"y":700,"wires":[["3e1d00eb.8ae9"]]},{"id":"3e1d00eb.8ae9","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":210,"y":700,"wires":[["5c7e63d9.a93bac"]]},{"id":"4c6bc027.32c21","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":700,"wires":[["fbf8ba15.d29ee8"]]},{"id":"4f8e5b4d.1e8314","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_ftpsnap_switch=\"off\";"},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_ftpsnap_switch=\"on\";"},{"type":"str","value":"true"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":710,"y":700,"wires":[["d9529528.b97a18"]]},{"id":"75ad25dd.c1736c","type":"http request","z":"55fbaa78.039334","name":"recording","method":"GET","ret":"txt","url":"","tls":"","x":620,"y":940,"wires":[["e2915079.fca4b"]]},{"id":"f3f6e296.abacc","type":"function","z":"55fbaa78.039334","name":"recording","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 = \"record\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=record&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":340,"y":940,"wires":[["e93e006a.180cf"]]},{"id":"20d30977.9f97a6","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":80,"y":940,"wires":[["ba2670f9.241ef"]]},{"id":"ba2670f9.241ef","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":210,"y":940,"wires":[["f3f6e296.abacc"]]},{"id":"e93e006a.180cf","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":940,"wires":[["75ad25dd.c1736c"]]},{"id":"e2915079.fca4b","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_record_switch=\"off\";"},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_record_switch=\"on\";"},{"type":"str","value":"true"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":750,"y":940,"wires":[["c6c3d3c0.ab83"]]},{"id":"1a9e153f.e257fb","type":"http request","z":"55fbaa78.039334","name":"ftprecording","method":"GET","ret":"txt","url":"","tls":"","x":640,"y":1180,"wires":[["6f5d85dd.f5b15c"]]},{"id":"6d004290.9b157c","type":"function","z":"55fbaa78.039334","name":"ftp recording","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 = \"ftprec\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=ftprec&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1180,"wires":[["133c44ef.fd666b"]]},{"id":"175530b4.fc2adf","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":80,"y":1180,"wires":[["b5802965.e8d358"]]},{"id":"b5802965.e8d358","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":210,"y":1180,"wires":[["6d004290.9b157c"]]},{"id":"133c44ef.fd666b","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":1180,"wires":[["1a9e153f.e257fb"]]},{"id":"6f5d85dd.f5b15c","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_ftprec_switch=\"off\";"},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_ftprec_switch=\"on\";"},{"type":"str","value":"true"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":770,"y":1180,"wires":[["3b914507.e42c1a"]]},{"id":"be5560f3.87f6b","type":"http request","z":"55fbaa78.039334","name":"relay","method":"GET","ret":"txt","url":"","tls":"","x":567,"y":1420,"wires":[["8662472.a9001b8"]]},{"id":"6a08fac2.3bb224","type":"function","z":"55fbaa78.039334","name":"relay","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 = \"relay\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=relay&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":319,"y":1420,"wires":[["26ccba33.4e3206"]]},{"id":"254cb558.b8879a","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":80,"y":1420,"wires":[["58de133e.250fac"]]},{"id":"58de133e.250fac","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":204,"y":1420,"wires":[["6a08fac2.3bb224"]]},{"id":"26ccba33.4e3206","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":443,"y":1420,"wires":[["be5560f3.87f6b"]]},{"id":"8662472.a9001b8","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_relay_switch=\"off\";"},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_relay_switch=\"on\";"},{"type":"str","value":"true"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":683,"y":1420,"wires":[["c84878e4.8eb968"]]},{"id":"a099208a.f9c81","type":"http request","z":"55fbaa78.039334","name":"sound","method":"GET","ret":"txt","url":"","tls":"","x":585,"y":1661,"wires":[["b345e9a0.9cdc68","1c7f3022.f642f"]]},{"id":"c9812e2e.acd4e","type":"function","z":"55fbaa78.039334","name":"sound","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 = \"sound\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=sound&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1661,"wires":[["8b1fade0.c6315"]]},{"id":"75a76254.840b8c","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":81,"y":1661,"wires":[["f3b02465.bf0ed8"]]},{"id":"f3b02465.bf0ed8","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":210,"y":1661,"wires":[["c9812e2e.acd4e"]]},{"id":"8b1fade0.c6315","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":1661,"wires":[["a099208a.f9c81"]]},{"id":"b345e9a0.9cdc68","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_sound_switch=\"off\";"},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_sound_switch=\"on\";"},{"type":"str","value":"true"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":704,"y":1661,"wires":[["e5e00d17.5d886","1defc564.58bfbb"]]},{"id":"d3a100a9.70cc8","type":"http request","z":"55fbaa78.039334","name":"link","method":"GET","ret":"txt","url":"","tls":"","x":590,"y":1907,"wires":[["2bf4faea.aea626"]]},{"id":"ab12b4f8.2d7328","type":"function","z":"55fbaa78.039334","name":"type","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 = \"type\";\nmsg.payload = ip+\"/param.cgi?cmd=getmdalarm&-aname=type&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1907,"wires":[["4a6c29a0.27d5d8"]]},{"id":"3efe4b11.26a2a4","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":80,"y":1907,"wires":[["96259c00.54aec8"]]},{"id":"96259c00.54aec8","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":210,"y":1907,"wires":[["ab12b4f8.2d7328"]]},{"id":"4a6c29a0.27d5d8","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":1907,"wires":[["d3a100a9.70cc8"]]},{"id":"2bf4faea.aea626","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var md_alarm_type=\"off\";"},{"type":"str","value":"false"}]},{"name":"replaceAll","params":[{"type":"str","value":"var md_alarm_type=\"on\";"},{"type":"str","value":"true"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":710,"y":1907,"wires":[["20422ac6.653446","9075fb67.d5e4a8"]]},{"id":"6d218114.626e7","type":"mqtt in","z":"55fbaa78.039334","name":"Audio Detec Enabled","topic":"iobroker/ipcam/alarmset/audiodetection_enabled","qos":"1","broker":"c27c1878.5dace8","x":100,"y":2060,"wires":[["e2be1149.6de91"]]},{"id":"e2be1149.6de91","type":"function","z":"55fbaa78.039334","name":"Enable Audio Detection","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 = \"type\";\nmsg.payload = ip+\"/param.cgi?cmd=setaudioalarmattr&-aa_enable=1&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setaudioalarmattr&-aa_enable=1&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":290,"y":2060,"wires":[["d63e0cee.e11b3"]]},{"id":"257dfb2e.f6e0b4","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":687,"y":2060,"wires":[["d483392d.88d348"]]},{"id":"d63e0cee.e11b3","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":446,"y":2060,"wires":[["ec433e7e.eefe8"]]},{"id":"ec433e7e.eefe8","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":566,"y":2060,"wires":[["257dfb2e.f6e0b4"]]},{"id":"f54decca.230c9","type":"mqtt out","z":"55fbaa78.039334","name":"Audio Detection Enabled","topic":"iobroker/ipcam/alarmset/audiodetection_enabled","qos":"1","retain":"","broker":"c27c1878.5dace8","x":344,"y":1980,"wires":[]},{"id":"432ddbd5.417194","type":"ui_button","z":"55fbaa78.039334","name":"Deactivate Audio Detection","group":"df5f1bb3.06ae08","order":3,"width":0,"height":0,"passthru":false,"label":"Deactivate Audio Detection","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{\"val\" : \"OFF\"}","payloadType":"json","topic":"snap","x":120,"y":2020,"wires":[["50749dd7.cb9f64"]]},{"id":"31778a49.17fb86","type":"function","z":"55fbaa78.039334","name":"Disable Audio Detection","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 = \"type\";\nmsg.payload = ip+\"/param.cgi?cmd=setaudioalarmattr&-aa_enable=0&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setaudioalarmattr&-aa_enable=0&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":290,"y":2104,"wires":[["bbe1c3a5.4dc2c"]]},{"id":"bbe1c3a5.4dc2c","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":446,"y":2104,"wires":[["5ce6cf58.a14e9"]]},{"id":"5ce6cf58.a14e9","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":566,"y":2104,"wires":[["ff3b5ab4.559068"]]},{"id":"ff3b5ab4.559068","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":686,"y":2104,"wires":[["d483392d.88d348"]]},{"id":"c12533b5.a8d3b","type":"http request","z":"55fbaa78.039334","name":"aa_enable","method":"GET","ret":"txt","url":"","tls":"","x":601,"y":2150,"wires":[["2b6d260d.555b1a"]]},{"id":"84387b73.857df8","type":"function","z":"55fbaa78.039334","name":"aa_enabled","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 = \"type\";\nmsg.payload = ip+\"/param.cgi?cmd=getaudioalarmattr&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":329,"y":2150,"wires":[["5621edd2.3ae504"]]},{"id":"1f84473e.94b399","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":80,"y":2150,"wires":[["9c548a04.5b5648"]]},{"id":"9c548a04.5b5648","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":205,"y":2150,"wires":[["84387b73.857df8"]]},{"id":"5621edd2.3ae504","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":465,"y":2150,"wires":[["c12533b5.a8d3b"]]},{"id":"ae377df3.1735d","type":"ui_button","z":"55fbaa78.039334","name":"Activate Audio Detection","group":"df5f1bb3.06ae08","order":2,"width":0,"height":0,"passthru":false,"label":"Activate Audio Detection","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{\"val\" : \"ON\"}","payloadType":"json","topic":"snap","x":120,"y":1980,"wires":[["f54decca.230c9"]]},{"id":"2b6d260d.555b1a","type":"string","z":"55fbaa78.039334","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":","}]},{"name":"replaceAll","params":[{"type":"str","value":"aa_enable"},{"type":"str","value":"val"}]},{"name":"replaceAll","params":[{"type":"str","value":"\"0\""},{"type":"str","value":"\"false\""}]},{"name":"replaceAll","params":[{"type":"str","value":"\"1\""},{"type":"str","value":"\"true"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":727,"y":2150,"wires":[["13a15018.1fbc"]]},{"id":"e3338732.4aa418","type":"string","z":"55fbaa78.039334","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":","}]},{"name":"replaceAll","params":[{"type":"str","value":"aa_time"},{"type":"str","value":"val"}]},{"name":"replaceAll","params":[{"type":"str","value":"\"0\""},{"type":"str","value":"\"false\""}]},{"name":"replaceAll","params":[{"type":"str","value":"\"10\""},{"type":"str","value":"\"true\""}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":706,"y":2624,"wires":[["6cfca0e.71e8f6"]]},{"id":"cc956038.9e55d","type":"mqtt in","z":"55fbaa78.039334","name":"High Sensitivity","topic":"iobroker/ipcam/alarmset/audiosense_high","qos":"1","broker":"c27c1878.5dace8","x":90,"y":2300,"wires":[["18870467.1edb7c"]]},{"id":"18870467.1edb7c","type":"function","z":"55fbaa78.039334","name":"Sensitivity 100%","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 = \"sensitivity\";\nmsg.payload = ip+\"/param.cgi?cmd=setaudioalarmattr&-aa_value=100&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":2300,"wires":[["9b0ed0da.5ac33"]]},{"id":"21f8e075.79874","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":647,"y":2300,"wires":[["5e3fc90c.32fdb8"]]},{"id":"9b0ed0da.5ac33","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":406,"y":2300,"wires":[["de7b7b34.8127d8"]]},{"id":"de7b7b34.8127d8","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":526,"y":2300,"wires":[["21f8e075.79874"]]},{"id":"94824c97.4a48","type":"mqtt out","z":"55fbaa78.039334","name":"High Sensitivity","topic":"iobroker/ipcam/alarmset/audiosense_high","qos":"1","retain":"","broker":"c27c1878.5dace8","x":248,"y":2220,"wires":[]},{"id":"18d03f38.07bdf1","type":"ui_button","z":"55fbaa78.039334","name":"Low Sensitivity","group":"da3b17d5.7af908","order":3,"width":0,"height":0,"passthru":false,"label":"Low Sensitivity","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{ \"val\" : \"OFF\"}","payloadType":"json","topic":"sensitivity","x":90,"y":2260,"wires":[["f665fafb.20e1b8"]]},{"id":"b31d364f.a9d5e8","type":"function","z":"55fbaa78.039334","name":"Sensitivity 50%","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 = \"sensitivity\";\nmsg.payload = ip+\"/param.cgi?cmd=setaudioalarmattr&-aa_value=50&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":2340,"wires":[["f27a5f5b.19a81"]]},{"id":"f27a5f5b.19a81","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":386,"y":2340,"wires":[["a7e322f0.ecbf9"]]},{"id":"a7e322f0.ecbf9","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":506,"y":2340,"wires":[["31f62ee7.84eb92"]]},{"id":"31f62ee7.84eb92","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":626,"y":2340,"wires":[["5e3fc90c.32fdb8"]]},{"id":"96e3dea0.1ff81","type":"http request","z":"55fbaa78.039334","name":"aa_value","method":"GET","ret":"txt","url":"","tls":"","x":620,"y":2380,"wires":[["708fb324.b38f9c"]]},{"id":"eb399719.d82aa8","type":"function","z":"55fbaa78.039334","name":"aa_value","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 = \"aa_value\";\nmsg.payload = ip+\"/param.cgi?cmd=getaudioalarmattr&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":340,"y":2380,"wires":[["fae1a296.c49c1"]]},{"id":"6d97bf97.7fb2f","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":80,"y":2380,"wires":[["31bd9e63.5dc682"]]},{"id":"31bd9e63.5dc682","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":210,"y":2380,"wires":[["eb399719.d82aa8"]]},{"id":"fae1a296.c49c1","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":2380,"wires":[["96e3dea0.1ff81"]]},{"id":"f820f5a1.747798","type":"ui_button","z":"55fbaa78.039334","name":"High Sensitivity","group":"da3b17d5.7af908","order":2,"width":0,"height":0,"passthru":false,"label":"High Sensitivity","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{ \"val\" : \"ON\"}","payloadType":"json","topic":"sensitivity","x":90,"y":2220,"wires":[["94824c97.4a48"]]},{"id":"708fb324.b38f9c","type":"string","z":"55fbaa78.039334","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":","}]},{"name":"replaceAll","params":[{"type":"str","value":"aa_value"},{"type":"str","value":"val"}]},{"name":"replaceAll","params":[{"type":"str","value":"100"},{"type":"str","value":"true"}]},{"name":"replaceAll","params":[{"type":"str","value":"50"},{"type":"str","value":"false"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":744,"y":2380,"wires":[["8fac3de6.7be79"]]},{"id":"27fb54e6.fe9f7c","type":"mqtt in","z":"55fbaa78.039334","name":"0s Treshold","topic":"iobroker/ipcam/alarmset/treshold_0","qos":"1","broker":"c27c1878.5dace8","x":80,"y":2540,"wires":[["80e375d0.36dfd8"]]},{"id":"80e375d0.36dfd8","type":"function","z":"55fbaa78.039334","name":"Threshold 0s","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 = \"Time Treshold\";\nmsg.payload = ip+\"/param.cgi?cmd=setaudioalarmattr&-aa_time=0&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":228,"y":2540,"wires":[["f46ec2f2.53b39"]]},{"id":"f0cef4cb.d88698","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":611,"y":2540,"wires":[["cfb7674c.9ef1b8"]]},{"id":"f46ec2f2.53b39","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":2540,"wires":[["c9bb1a83.4beb98"]]},{"id":"c9bb1a83.4beb98","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":490,"y":2540,"wires":[["f0cef4cb.d88698"]]},{"id":"17e1b694.c70759","type":"ui_button","z":"55fbaa78.039334","name":"High Treshold 10s","group":"72d6030f.30d4ac","order":3,"width":0,"height":0,"passthru":false,"label":"High Treshold 10s","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{\"val\" : \"OFF\"}","payloadType":"json","topic":"threshold","x":100,"y":2500,"wires":[["c106d214.ba662"]]},{"id":"73fd05d9.49c29c","type":"function","z":"55fbaa78.039334","name":"Treshold 10s","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 = \"sensitivity\";\nmsg.payload = ip+\"/param.cgi?cmd=setaudioalarmattr&-aa_time=10&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":228,"y":2580,"wires":[["fbffb13c.553f6"]]},{"id":"fbffb13c.553f6","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":2580,"wires":[["32eeca9d.0b7ff6"]]},{"id":"32eeca9d.0b7ff6","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":490,"y":2580,"wires":[["83cd9c69.1683f"]]},{"id":"83cd9c69.1683f","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":610,"y":2580,"wires":[["cfb7674c.9ef1b8"]]},{"id":"48e8fffc.477aa","type":"http request","z":"55fbaa78.039334","name":"aa_time","method":"GET","ret":"txt","url":"","tls":"","x":586,"y":2624,"wires":[["e3338732.4aa418"]]},{"id":"dfae4f1e.a1632","type":"function","z":"55fbaa78.039334","name":"aa_time","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 = \"aa_time\";\nmsg.payload = ip+\"/param.cgi?cmd=getaudioalarmattr&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":326,"y":2624,"wires":[["240a3a9d.5f6fa6"]]},{"id":"d6ff9ce1.2b14b","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":80,"y":2624,"wires":[["1524f641.9b03aa"]]},{"id":"1524f641.9b03aa","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":210,"y":2624,"wires":[["dfae4f1e.a1632"]]},{"id":"240a3a9d.5f6fa6","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":456,"y":2624,"wires":[["48e8fffc.477aa"]]},{"id":"34620d5d.de9112","type":"mqtt out","z":"55fbaa78.039334","name":"0s Treshold","topic":"iobroker/ipcam/alarmset/treshold_0","qos":"1","retain":"","broker":"c27c1878.5dace8","x":260,"y":2460,"wires":[]},{"id":"126555dc.b1962a","type":"ui_button","z":"55fbaa78.039334","name":"Low Treshold 0s","group":"72d6030f.30d4ac","order":2,"width":0,"height":0,"passthru":false,"label":"Low Treshold 0s","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{\"val\" : \"ON\"}","payloadType":"json","topic":"threshold","x":100,"y":2460,"wires":[["34620d5d.de9112"]]},{"id":"9756097d.0aaa48","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Alarm In","topic":"iobroker/ipcam/alarmset/alarmin_enable","qos":"1","broker":"c27c1878.5dace8","x":90,"y":2780,"wires":[["3de13d72.e44b62"]]},{"id":"3de13d72.e44b62","type":"function","z":"55fbaa78.039334","name":"Input 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=setioattr&-io_enable=1&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":274,"y":2780,"wires":[["805fa5cf.50ed18"]]},{"id":"e695b275.0df61","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":664,"y":2780,"wires":[["2a00a819.134ea8"]]},{"id":"805fa5cf.50ed18","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":423,"y":2780,"wires":[["1ce48f05.2323e1"]]},{"id":"1ce48f05.2323e1","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":543,"y":2780,"wires":[["e695b275.0df61"]]},{"id":"9836ea09.864e78","type":"function","z":"55fbaa78.039334","name":"Input 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 = \"relay\";\nmsg.payload = ip+\"/param.cgi?cmd=setioattr&-io_enable=0&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;\n\n// msg.payload = 'http://192.168.1.116/param.cgi?cmd=setioattr&-io_enable=0&-usr=admin&-pwd=1029384756';\n// return msg;","outputs":1,"noerr":0,"x":274,"y":2820,"wires":[["878d31a.77d8fd"]]},{"id":"878d31a.77d8fd","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":423,"y":2820,"wires":[["70ae5402.f37d0c"]]},{"id":"70ae5402.f37d0c","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":543,"y":2820,"wires":[["12ca6535.e8c89b"]]},{"id":"12ca6535.e8c89b","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":663,"y":2820,"wires":[["2a00a819.134ea8"]]},{"id":"7dbe748f.44f7fc","type":"function","z":"55fbaa78.039334","name":"input","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 = \"relay\";\nmsg.payload = ip+\"/param.cgi?cmd=getioattr&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":322,"y":2864,"wires":[["23d46c75.3b8f54"]]},{"id":"d1ff0dc7.8c009","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":81,"y":2863,"wires":[["24c9fd96.da0f92"]]},{"id":"a2ce9aa2.cd3498","type":"ui_button","z":"55fbaa78.039334","name":"Set Alarm Input","group":"44cac29d.d2a1fc","order":3,"width":0,"height":0,"passthru":false,"label":"Set Alarm Input","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{\"val\" : \"OFF\"}","payloadType":"json","topic":"snap","x":90,"y":2740,"wires":[["d1f7e0f2.0460e"]]},{"id":"cdd951f9.b70e6","type":"ui_button","z":"55fbaa78.039334","name":"Set Alarm Input","group":"44cac29d.d2a1fc","order":2,"width":0,"height":0,"passthru":false,"label":"Set Alarm Input","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{\"val\" : \"ON\"}","payloadType":"json","topic":"snap","x":90,"y":2700,"wires":[["cbe9a8c9.7fd148"]]},{"id":"cbe9a8c9.7fd148","type":"mqtt out","z":"55fbaa78.039334","name":"Enable Alarm Input","topic":"iobroker/ipcam/alarmset/alarmin_enable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":260,"y":2700,"wires":[]},{"id":"24c9fd96.da0f92","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":207,"y":2863,"wires":[["7dbe748f.44f7fc"]]},{"id":"23d46c75.3b8f54","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":2864,"wires":[["c2e58881.155e08"]]},{"id":"c2e58881.155e08","type":"http request","z":"55fbaa78.039334","name":"relay","method":"GET","ret":"txt","url":"","tls":"","x":580,"y":2864,"wires":[["95c18c07.1b2c9"]]},{"id":"95c18c07.1b2c9","type":"string","z":"55fbaa78.039334","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":","}]},{"name":"replaceAll","params":[{"type":"str","value":"io_enable"},{"type":"str","value":"val"}]},{"name":"replaceAll","params":[{"type":"str","value":"\"0\""},{"type":"str","value":"\"false\""}]},{"name":"replaceAll","params":[{"type":"str","value":"\"1\""},{"type":"str","value":"\"true\""}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":696,"y":2863,"wires":[["6ad71d70.44c264"]]},{"id":"6ad71d70.44c264","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":817,"y":2863,"wires":[["d1ffb933.6f8c18"]]},{"id":"1eaf57b4.e43958","type":"mqtt in","z":"55fbaa78.039334","name":"Enable PIR","topic":"iobroker/ipcam/alarmset/pir_enable","qos":"1","broker":"c27c1878.5dace8","x":82,"y":3009,"wires":[["38a9206a.f639b"]]},{"id":"38a9206a.f639b","type":"function","z":"55fbaa78.039334","name":"Input 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 = \"pir_enable\";\nmsg.payload = ip+\"/param.cgi?cmd=setpirattr&-pir_enable=1&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":225,"y":3009,"wires":[["5bb9c405.ce3bec"]]},{"id":"949394f8.b2b888","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":600,"y":3009,"wires":[["ac954e06.86572"]]},{"id":"5bb9c405.ce3bec","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":359,"y":3009,"wires":[["7962d2a8.b1e97c"]]},{"id":"7962d2a8.b1e97c","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":479,"y":3009,"wires":[["949394f8.b2b888"]]},{"id":"faffa248.83a48","type":"function","z":"55fbaa78.039334","name":"Input 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 = \"relay\";\nmsg.payload = ip+\"/param.cgi?cmd=setpirattr&-pir_enable=0&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":225,"y":3049,"wires":[["9b4eb1be.0a0e2"]]},{"id":"9b4eb1be.0a0e2","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":359,"y":3049,"wires":[["f50ae8a4.68fa28"]]},{"id":"f50ae8a4.68fa28","type":"http request","z":"55fbaa78.039334","name":"snap","method":"GET","ret":"txt","url":"","tls":"","x":479,"y":3049,"wires":[["b4d6b30b.de33d"]]},{"id":"b4d6b30b.de33d","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":599,"y":3049,"wires":[["ac954e06.86572"]]},{"id":"a5cfa442.172f38","type":"function","z":"55fbaa78.039334","name":"input","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 = \"relay\";\nmsg.payload = ip+\"/param.cgi?cmd=getpirattr&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":3089,"wires":[["9ca95c3f.28b6d"]]},{"id":"abbe1f9a.838e4","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"c27c1878.5dace8","x":80,"y":3089,"wires":[["5daf4635.0fee08"]]},{"id":"a4f8574b.6b1de8","type":"ui_button","z":"55fbaa78.039334","name":"Disable PIR","group":"d122a31e.7fc08","order":3,"width":0,"height":0,"passthru":false,"label":"Disable PIR","color":"#000000","bgcolor":"#dddddd","icon":"fa-bell","payload":"{\"val\" : \"OFF\"}","payloadType":"json","topic":"snap","x":82,"y":2969,"wires":[["c950547a.ea47d8"]]},{"id":"5a586acc.ff6104","type":"mqtt out","z":"55fbaa78.039334","name":"Enable PIR","topic":"iobroker/ipcam/alarmset/pir_enable","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":220,"y":2929,"wires":[]},{"id":"5daf4635.0fee08","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":210,"y":3089,"wires":[["a5cfa442.172f38"]]},{"id":"9ca95c3f.28b6d","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":3089,"wires":[["eecfd9a1.daa098"]]},{"id":"eecfd9a1.daa098","type":"http request","z":"55fbaa78.039334","name":"pir","method":"GET","ret":"txt","url":"","tls":"","x":590,"y":3089,"wires":[["ee3b3ed5.1c59"]]},{"id":"ee3b3ed5.1c59","type":"string","z":"55fbaa78.039334","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":","}]},{"name":"replaceAll","params":[{"type":"str","value":"pir_enable"},{"type":"str","value":"val"}]},{"name":"append","params":[{"type":"str","value":""}]},{"name":"replaceAll","params":[{"type":"str","value":"\"0\""},{"type":"str","value":"\"false\""}]},{"name":"replaceAll","params":[{"type":"str","value":"\"1\""},{"type":"str","value":"\"true\""}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":710,"y":3089,"wires":[["5cfef13f.5cdaf"]]},{"id":"5cfef13f.5cdaf","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":831,"y":3089,"wires":[["4e2636fa.3e1b08"]]},{"id":"d936230b.bf134","type":"ui_button","z":"55fbaa78.039334","name":"Enable PIR","group":"d122a31e.7fc08","order":2,"width":0,"height":0,"passthru":false,"label":"Enable PIR","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-bell","payload":"{\"val\" : \"ON\"}","payloadType":"json","topic":"snap","x":82,"y":2929,"wires":[["5a586acc.ff6104"]]},{"id":"84be7f59.2e18b","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/alarmemail_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":926,"y":182,"wires":[]},{"id":"9f0f9bee.57a1b8","type":"mqtt in","z":"55fbaa78.039334","name":"Disable FTP Rec","topic":"iobroker/ipcam/alarmset/ftprec_disable","qos":"1","broker":"c27c1878.5dace8","x":90,"y":1140,"wires":[["5929ce7d.05514"]]},{"id":"4f2c149c.5450cc","type":"mqtt in","z":"55fbaa78.039334","name":"Disable Alarm Signal","topic":"iobroker/ipcam/alarmset/alarmsignal_disable","qos":"1","broker":"c27c1878.5dace8","x":100,"y":1620,"wires":[["c9856a29.8c40c8"]]},{"id":"7d474c22.154c94","type":"mqtt in","z":"55fbaa78.039334","name":"Audio Detec Disabled","topic":"iobroker/ipcam/alarmset/audiodetection_disabled","qos":"1","broker":"c27c1878.5dace8","x":101,"y":2104,"wires":[["31778a49.17fb86"]]},{"id":"92d65339.78893","type":"mqtt in","z":"55fbaa78.039334","name":"PIR Unlink","topic":"iobroker/ipcam/alarmset/areapir_unlink","qos":"1","broker":"c27c1878.5dace8","x":80,"y":1864,"wires":[["7712b861.47f998"]]},{"id":"67ae48c7.d0bc08","type":"mqtt in","z":"55fbaa78.039334","name":"Low Sensitivity","topic":"iobroker/ipcam/alarmset/audiosense_low","qos":"1","broker":"c27c1878.5dace8","x":91,"y":2340,"wires":[["b31d364f.a9d5e8"]]},{"id":"d23b63f6.316a6","type":"mqtt in","z":"55fbaa78.039334","name":"10s Treshold","topic":"iobroker/ipcam/alarmset/treshold_10","qos":"1","broker":"c27c1878.5dace8","x":81,"y":2580,"wires":[["73fd05d9.49c29c"]]},{"id":"e04f9d16.f06a2","type":"mqtt in","z":"55fbaa78.039334","name":"Disable Alarm Input","topic":"iobroker/ipcam/alarmset/alarmin_disable","qos":"1","broker":"c27c1878.5dace8","x":100,"y":2820,"wires":[["9836ea09.864e78"]]},{"id":"986d1160.b9d64","type":"mqtt in","z":"55fbaa78.039334","name":"Disable PIR","topic":"iobroker/ipcam/alarmset/pir_disable","qos":"1","broker":"c27c1878.5dace8","x":82,"y":3049,"wires":[["faffa248.83a48"]]},{"id":"af041ca0.80ba3","type":"mqtt out","z":"55fbaa78.039334","name":"Enable Snap","topic":"iobroker/ipcam/alarmset/alarmsnap_enable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":248,"y":297,"wires":[]},{"id":"8c8e38c2.36c6e8","type":"mqtt out","z":"55fbaa78.039334","name":"Disable Snap","topic":"iobroker/ipcam/alarmset/alarmsnap_disable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":245,"y":340,"wires":[]},{"id":"558c40d1.da072","type":"mqtt in","z":"55fbaa78.039334","name":"Disable Snap","topic":"iobroker/ipcam/alarmset/alarmsnap_disable","qos":"1","broker":"c27c1878.5dace8","x":80,"y":420,"wires":[["b63d358a.edad08"]]},{"id":"ab0867c1.204ea8","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/alarmsnap_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":870,"y":420,"wires":[]},{"id":"8338f6a5.eeba08","type":"mqtt out","z":"55fbaa78.039334","name":"Disable FTP Snap","topic":"iobroker/ipcam/alarmset/ftpsnap_disable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":280,"y":580,"wires":[]},{"id":"c7b36c25.c5a08","type":"mqtt in","z":"55fbaa78.039334","name":"Enable FTP Snap","topic":"iobroker/ipcam/alarmset/ftpsnap_disable","qos":"1","broker":"80fd9eab.17aa2","x":91,"y":660,"wires":[["90c01baf.0f7378"]]},{"id":"d9529528.b97a18","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/alarmftpsnap_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":890,"y":661,"wires":[]},{"id":"ebb67c72.8eb7f","type":"mqtt out","z":"55fbaa78.039334","name":"Disable Rec","topic":"iobroker/ipcam/alarmset/alarmrec_disable","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":260,"y":820,"wires":[]},{"id":"d76a9423.5f0b48","type":"mqtt in","z":"55fbaa78.039334","name":"Disable Rec","topic":"iobroker/ipcam/alarmset/alarmrec_disable","qos":"1","broker":"c27c1878.5dace8","x":80,"y":900,"wires":[["e41812d5.5845d"]]},{"id":"c6c3d3c0.ab83","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/alarmrec_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":860,"y":900,"wires":[]},{"id":"83e97eb1.17d6f","type":"mqtt out","z":"55fbaa78.039334","name":"Disable FTP Rec","topic":"iobroker/ipcam/alarmset/ftprec_disable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":300,"y":1060,"wires":[]},{"id":"3b914507.e42c1a","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/alarmftprec_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":910,"y":1140,"wires":[]},{"id":"e1f6e69e.2a0ae8","type":"mqtt out","z":"55fbaa78.039334","name":"Disable Alarm Out","topic":"iobroker/ipcam/alarmset/alarmout_disable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":300,"y":1300,"wires":[]},{"id":"5b9ef873.219ca8","type":"mqtt in","z":"55fbaa78.039334","name":"Disable Alarm Out","topic":"iobroker/ipcam/alarmset/alarmout_disable","qos":"1","broker":"c27c1878.5dace8","x":100,"y":1380,"wires":[["4005e62e.4d38c8"]]},{"id":"c84878e4.8eb968","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/alarmout_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":864,"y":1380,"wires":[]},{"id":"66a1b204.96985c","type":"mqtt out","z":"55fbaa78.039334","name":"Disable Alarm Signal","topic":"iobroker/ipcam/alarmset/alarmsignal_disable","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":330,"y":1540,"wires":[]},{"id":"e5e00d17.5d886","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/alarmsignal_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":950,"y":1640,"wires":[]},{"id":"20422ac6.653446","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/areapir_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":858,"y":1867,"wires":[]},{"id":"a3748b24.6f7638","type":"mqtt out","z":"55fbaa78.039334","name":"PIR Unlink","topic":"iobroker/ipcam/alarmset/areapir_unlink","qos":"1","retain":"","broker":"c27c1878.5dace8","x":260,"y":1780,"wires":[]},{"id":"50749dd7.cb9f64","type":"mqtt out","z":"55fbaa78.039334","name":"Audio Detection Disabled","topic":"iobroker/ipcam/alarmset/audiodetection_disabled","qos":"1","retain":"","broker":"c27c1878.5dace8","x":340,"y":2020,"wires":[]},{"id":"d483392d.88d348","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/audiodetection_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":935,"y":2104,"wires":[]},{"id":"13a15018.1fbc","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":843,"y":2150,"wires":[["ea86756c.0c1588"]]},{"id":"ea86756c.0c1588","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":989,"y":2150,"wires":[["d483392d.88d348"]]},{"id":"5e3fc90c.32fdb8","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/audiosense_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":938,"y":2339,"wires":[]},{"id":"f665fafb.20e1b8","type":"mqtt out","z":"55fbaa78.039334","name":"Low Sensitivity","topic":"iobroker/ipcam/alarmset/audiosense_low","qos":"1","retain":"","broker":"c27c1878.5dace8","x":250,"y":2260,"wires":[]},{"id":"8fac3de6.7be79","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":861,"y":2380,"wires":[["4980c4e1.61672c"]]},{"id":"4980c4e1.61672c","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1007,"y":2380,"wires":[["5e3fc90c.32fdb8"]]},{"id":"c106d214.ba662","type":"mqtt out","z":"55fbaa78.039334","name":"10s Treshold","topic":"iobroker/ipcam/alarmset/treshold_10","qos":"1","retain":"","broker":"c27c1878.5dace8","x":270,"y":2500,"wires":[]},{"id":"cfb7674c.9ef1b8","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/treshold_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":911,"y":2580,"wires":[]},{"id":"6cfca0e.71e8f6","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":826,"y":2624,"wires":[["75b62876.ee7588"]]},{"id":"75b62876.ee7588","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":972,"y":2624,"wires":[["cfb7674c.9ef1b8"]]},{"id":"d1ffb933.6f8c18","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":964,"y":2863,"wires":[["2a00a819.134ea8"]]},{"id":"2a00a819.134ea8","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/alarmin_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":903,"y":2820,"wires":[]},{"id":"d1f7e0f2.0460e","type":"mqtt out","z":"55fbaa78.039334","name":"Disable Alarm Input","topic":"iobroker/ipcam/alarmset/alarmin_disable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":260,"y":2740,"wires":[]},{"id":"ac954e06.86572","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/pir_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":829,"y":3047,"wires":[]},{"id":"4e2636fa.3e1b08","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":3089,"wires":[["ac954e06.86572"]]},{"id":"c950547a.ea47d8","type":"mqtt out","z":"55fbaa78.039334","name":"Disable PIR","topic":"iobroker/ipcam/alarmset/pir_disable","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":219,"y":2969,"wires":[]},{"id":"afab529.bc585b","type":"mqtt out","z":"55fbaa78.039334","name":"Enable Alarm Area1","topic":"iobroker/ipcam/alarmset/area1_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":262,"y":3201,"wires":[]},{"id":"592a6411.6b70ec","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Area1","topic":"iobroker/ipcam/alarmset/area1_enable","qos":"1","broker":"80fd9eab.17aa2","x":82,"y":3287,"wires":[["86b8406c.ad71f"]]},{"id":"86b8406c.ad71f","type":"function","z":"55fbaa78.039334","name":"Enable Area 1","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 = \"three\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdattr&-name=1&-enable=1&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":233,"y":3287,"wires":[["e48d6f7d.153cc"]]},{"id":"7d9aa163.0e383","type":"function","z":"55fbaa78.039334","name":"Disable Area 1","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 = \"six\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdattr&-name=1&-enable=0&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":242,"y":3333,"wires":[["1ca83bba.97d7f4"]]},{"id":"1ca83bba.97d7f4","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":374,"y":3332,"wires":[["f7fadea5.7c75"]]},{"id":"e48d6f7d.153cc","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":374,"y":3287,"wires":[["2380e63.0f0cf1a"]]},{"id":"f7fadea5.7c75","type":"http request","z":"55fbaa78.039334","name":"m1_disable","method":"GET","ret":"txt","url":"","tls":"","x":504,"y":3332,"wires":[["6d300b15.2ba814"]]},{"id":"2380e63.0f0cf1a","type":"http request","z":"55fbaa78.039334","name":"m1_enable","method":"GET","ret":"txt","url":"","tls":"","x":504,"y":3287,"wires":[["51047d9c.a7ad24"]]},{"id":"4fa9e30.1aa881c","type":"http request","z":"55fbaa78.039334","name":"getmdattr","method":"GET","ret":"txt","url":"","tls":"","x":611,"y":3376,"wires":[["75cec8.e139c138"]]},{"id":"9c6ebcf3.4da2f","type":"function","z":"55fbaa78.039334","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":334,"y":3376,"wires":[["bd6f3493.80fc28"]]},{"id":"d783b086.8bf7c","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":80,"y":3376,"wires":[["e26e4e29.dddbf"]]},{"id":"e26e4e29.dddbf","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":207,"y":3376,"wires":[["9c6ebcf3.4da2f"]]},{"id":"bd6f3493.80fc28","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":472,"y":3376,"wires":[["4fa9e30.1aa881c"]]},{"id":"c4aaea2f.5d1e08","type":"function","z":"55fbaa78.039334","name":"Enable Area 2","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 = \"three\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdattr&-name=2&-enable=1&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":233,"y":3545,"wires":[["3d44d161.abd40e"]]},{"id":"50b1804.cc7248","type":"function","z":"55fbaa78.039334","name":"Disable Area 2","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 = \"six\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdattr&-name=2&-enable=0&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":242,"y":3583,"wires":[["f692bc76.81fbf"]]},{"id":"f692bc76.81fbf","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":374,"y":3583,"wires":[["6625ae00.64eae4"]]},{"id":"3d44d161.abd40e","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":374,"y":3545,"wires":[["a521983f.ee56c8"]]},{"id":"a521983f.ee56c8","type":"http request","z":"55fbaa78.039334","name":"m2_enable","method":"GET","ret":"txt","url":"","tls":"","x":504,"y":3545,"wires":[["a1ba3eee.43dc8"]]},{"id":"6625ae00.64eae4","type":"http request","z":"55fbaa78.039334","name":"m2_disable","method":"GET","ret":"txt","url":"","tls":"","x":504,"y":3583,"wires":[["eb054553.67f208"]]},{"id":"fb33be75.71457","type":"http request","z":"55fbaa78.039334","name":"getmdattr","method":"GET","ret":"txt","url":"","tls":"","x":620,"y":3620,"wires":[["b83f33ff.6adb6"]]},{"id":"c8de9187.0f8e","type":"function","z":"55fbaa78.039334","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":340,"y":3620,"wires":[["50858b0a.4b0cb4"]]},{"id":"27396c0a.34d054","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":80,"y":3620,"wires":[["49eb009.2f8ed"]]},{"id":"49eb009.2f8ed","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":210,"y":3620,"wires":[["c8de9187.0f8e"]]},{"id":"50858b0a.4b0cb4","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":3620,"wires":[["fb33be75.71457"]]},{"id":"8d80957.c4c4168","type":"function","z":"55fbaa78.039334","name":"Enable Area 3","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 = \"three\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdattr&-name=3&-enable=1&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":234,"y":3769,"wires":[["86dff8e9.018e08"]]},{"id":"16b8ab44.8928e5","type":"function","z":"55fbaa78.039334","name":"Disable Area 3","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 = \"six\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdattr&-name=3&-enable=0&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":245,"y":3808,"wires":[["4f7c2d5.d524ad4"]]},{"id":"86dff8e9.018e08","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":375,"y":3769,"wires":[["a044489b.0a53a8"]]},{"id":"4f7c2d5.d524ad4","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":386,"y":3808,"wires":[["cebe6d50.4625c"]]},{"id":"cebe6d50.4625c","type":"http request","z":"55fbaa78.039334","name":"m3_disable","method":"GET","ret":"txt","url":"","tls":"","x":516,"y":3808,"wires":[["55fbbcbf.3f8b74"]]},{"id":"a044489b.0a53a8","type":"http request","z":"55fbaa78.039334","name":"m3_enable","method":"GET","ret":"txt","url":"","tls":"","x":505,"y":3769,"wires":[["a0ae3b1c.6ff148"]]},{"id":"47612a8.ce76bd4","type":"http request","z":"55fbaa78.039334","name":"getmdattr","method":"GET","ret":"txt","url":"","tls":"","x":600,"y":3845,"wires":[["bea855fe.f83788"]]},{"id":"5900ce2e.6eef5","type":"function","z":"55fbaa78.039334","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":332,"y":3845,"wires":[["3f7291da.16036e"]]},{"id":"fcd08b26.d7af48","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":79,"y":3845,"wires":[["d23bd0d9.44326"]]},{"id":"d23bd0d9.44326","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":206,"y":3845,"wires":[["5900ce2e.6eef5"]]},{"id":"3f7291da.16036e","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":466,"y":3845,"wires":[["47612a8.ce76bd4"]]},{"id":"af09f685.013f68","type":"function","z":"55fbaa78.039334","name":"Enable Area 4","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 = \"three\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdattr&-name=4&-enable=1&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":233,"y":4012,"wires":[["258c749c.48b88c"]]},{"id":"258c749c.48b88c","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":374,"y":4012,"wires":[["3e442a97.f5ac76"]]},{"id":"3e442a97.f5ac76","type":"http request","z":"55fbaa78.039334","name":"m4_enable","method":"GET","ret":"txt","url":"","tls":"","x":504,"y":4012,"wires":[["bca3132d.77866"]]},{"id":"1c682ffa.7e2fa","type":"function","z":"55fbaa78.039334","name":"Disable Area 4","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 = \"six\";\nmsg.payload = ip+\"/param.cgi?cmd=setmdattr&-name=4&-enable=0&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":4052,"wires":[["68e9e713.5c0528"]]},{"id":"68e9e713.5c0528","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":391,"y":4052,"wires":[["dc5c0458.f410d8"]]},{"id":"dc5c0458.f410d8","type":"http request","z":"55fbaa78.039334","name":"m4_disable","method":"GET","ret":"txt","url":"","tls":"","x":521,"y":4052,"wires":[["e7b1525b.02974"]]},{"id":"58fec7b8.7b5c18","type":"http request","z":"55fbaa78.039334","name":"getmdattr","method":"GET","ret":"txt","url":"","tls":"","x":608,"y":4090,"wires":[["c9aaf57b.bcfb78"]]},{"id":"c45c118e.80892","type":"function","z":"55fbaa78.039334","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":336,"y":4090,"wires":[["e3baed37.96e7a"]]},{"id":"c872394b.863ba8","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":83,"y":4090,"wires":[["cb35df7e.3cc19"]]},{"id":"cb35df7e.3cc19","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":210,"y":4090,"wires":[["c45c118e.80892"]]},{"id":"e3baed37.96e7a","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":473,"y":4090,"wires":[["58fec7b8.7b5c18"]]},{"id":"fd2cc486.626e78","type":"comment","z":"55fbaa78.039334","name":"Activate Areas","info":"","x":90,"y":3160,"wires":[]},{"id":"34766759.0392b8","type":"ui_button","z":"55fbaa78.039334","name":"Area 1 Enabled","group":"a5e7e5b7.260b68","order":2,"width":0,"height":0,"passthru":false,"label":"Area 1 Enabled","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-square","payload":"true","payloadType":"bool","topic":"area","x":90,"y":3200,"wires":[["afab529.bc585b"]]},{"id":"e6e2b359.50509","type":"ui_button","z":"55fbaa78.039334","name":"Area 1 Disabled","group":"a5e7e5b7.260b68","order":3,"width":0,"height":0,"passthru":false,"label":"Area 1 Disabled","color":"#000000","bgcolor":"#dddddd","icon":"fa-square","payload":"false","payloadType":"bool","topic":"area","x":90,"y":3240,"wires":[["d5560e8f.97218"]]},{"id":"d1b95f3d.1485b","type":"ui_button","z":"55fbaa78.039334","name":"Area 2 Enabled","group":"8de08aa8.320718","order":5,"width":0,"height":0,"passthru":false,"label":"Area 2 Enabled","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-square","payload":"true","payloadType":"bool","topic":"area","x":90,"y":3468,"wires":[["cd639485.7264c8"]]},{"id":"f75fbc0b.ff809","type":"ui_button","z":"55fbaa78.039334","name":"Area 2 Disabled","group":"8de08aa8.320718","order":6,"width":0,"height":0,"passthru":false,"label":"Area 2 Disabled","color":"#000000","bgcolor":"#dddddd","icon":"fa-square","payload":"false","payloadType":"bool","topic":"area","x":90,"y":3508,"wires":[["f76f6df3.5a01f"]]},{"id":"435047c0.e9aee8","type":"ui_button","z":"55fbaa78.039334","name":"Area 3 Enabled","group":"c5ca58fb.e2b0d8","order":8,"width":0,"height":0,"passthru":false,"label":"Area 3 Enabled","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-square","payload":"true","payloadType":"bool","topic":"area","x":90,"y":3692,"wires":[["f576dc90.e30cb"]]},{"id":"fa1596f.2265968","type":"ui_button","z":"55fbaa78.039334","name":"Area 3 Disabled","group":"c5ca58fb.e2b0d8","order":9,"width":0,"height":0,"passthru":false,"label":"Area 3 Disabled","color":"#000000","bgcolor":"#dddddd","icon":"fa-square","payload":"false","payloadType":"bool","topic":"area","x":90,"y":3732,"wires":[["17e8aca.2761b53"]]},{"id":"f3de01b1.13c57","type":"ui_button","z":"55fbaa78.039334","name":"Area 4 Enabled","group":"cccd45fe.7647d8","order":11,"width":0,"height":0,"passthru":false,"label":"Area 4 Enabled","color":"#ffffff","bgcolor":"#f17c35","icon":"fa-square","payload":"true","payloadType":"bool","topic":"area","x":90,"y":3932,"wires":[["bd580150.87b49"]]},{"id":"7651db23.693d84","type":"ui_button","z":"55fbaa78.039334","name":"Area 4 Disabled","group":"cccd45fe.7647d8","order":12,"width":0,"height":0,"passthru":false,"label":"Area 4 Disabled","color":"#000000","bgcolor":"#dddddd","icon":"fa-square","payload":"false","payloadType":"bool","topic":"area","x":90,"y":3973,"wires":[["41a37e52.e3763"]]},{"id":"51047d9c.a7ad24","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":635,"y":3287,"wires":[["823ff98c.4061d8"]]},{"id":"6d300b15.2ba814","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":634,"y":3332,"wires":[["823ff98c.4061d8"]]},{"id":"75cec8.e139c138","type":"string","z":"55fbaa78.039334","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":","}]},{"name":"replaceAll","params":[{"type":"str","value":"\"m1_enable\":\"0\","},{"type":"str","value":"\"val\":\"false\","}]},{"name":"replaceAll","params":[{"type":"str","value":"\"m1_enable\":\"1\","},{"type":"str","value":"\"val\":\"true\","}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":741,"y":3376,"wires":[["801be627.6aa058"]]},{"id":"eb054553.67f208","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":634,"y":3583,"wires":[["7f6d13d8.24183c"]]},{"id":"a1ba3eee.43dc8","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":635,"y":3545,"wires":[["7f6d13d8.24183c"]]},{"id":"b83f33ff.6adb6","type":"string","z":"55fbaa78.039334","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":","}]},{"name":"replaceAll","params":[{"type":"str","value":"\"m2_enable\":\"0\","},{"type":"str","value":"\"val\":\"false\","}]},{"name":"replaceAll","params":[{"type":"str","value":"\"m2_enable\":\"1\","},{"type":"str","value":"\"val\":\"true\","}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":750,"y":3620,"wires":[["4febd644.00a2d8"]]},{"id":"a0ae3b1c.6ff148","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":632,"y":3769,"wires":[["ed4da9f4.6dd1b8"]]},{"id":"55fbbcbf.3f8b74","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":642,"y":3808,"wires":[["ed4da9f4.6dd1b8"]]},{"id":"bea855fe.f83788","type":"string","z":"55fbaa78.039334","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":","}]},{"name":"replaceAll","params":[{"type":"str","value":"\"m3_enable\":\"0\","},{"type":"str","value":"\"val\":\"false\","}]},{"name":"replaceAll","params":[{"type":"str","value":"\"m3_enable\":\"1\","},{"type":"str","value":"\"val\":\"true\","}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":724,"y":3845,"wires":[["1a5f4d09.9caf13"]]},{"id":"bca3132d.77866","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":635,"y":4012,"wires":[["b6b3dd14.9ba8f"]]},{"id":"e7b1525b.02974","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":651,"y":4052,"wires":[["b6b3dd14.9ba8f"]]},{"id":"c9aaf57b.bcfb78","type":"string","z":"55fbaa78.039334","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":","}]},{"name":"replaceAll","params":[{"type":"str","value":"\"m4_enable\":\"0\","},{"type":"str","value":"\"val\":\"false\","}]},{"name":"replaceAll","params":[{"type":"str","value":"\"m4_enable\":\"1\","},{"type":"str","value":"\"val\":\"true\","}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":732,"y":4090,"wires":[["97d8f071.786df"]]},{"id":"ae68c394.96529","type":"mqtt in","z":"55fbaa78.039334","name":"Recording","topic":"iobroker/ipcam/alarmset/manrec_triggered","qos":"1","broker":"80fd9eab.17aa2","x":80,"y":4714,"wires":[["bff705c3.e29f68"]]},{"id":"bff705c3.e29f68","type":"function","z":"55fbaa78.039334","name":"process value","func":"msg.payload = JSON.parse(msg.payload).val;\nreturn msg;","outputs":1,"noerr":0,"x":356,"y":4714,"wires":[["c06c88b2.0e0fb8"]]},{"id":"c06c88b2.0e0fb8","type":"switch","z":"55fbaa78.039334","name":"Push","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"alarm","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":515,"y":4663,"wires":[["b9385ea.786bda","d049be03.bed44"]]},{"id":"b9385ea.786bda","type":"function","z":"55fbaa78.039334","name":"Man REC","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 = \"three\";\nmsg.payload = ip+\"/param.cgi?cmd=manualrec&-act=on&-time=60&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":592,"y":4708,"wires":[["8d1f7ce4.0b774"]]},{"id":"69ea0a8e.d1c284","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":833,"y":4662,"wires":[["e6ddfa9b.aaa7f8","3e5a3592.76a84a"]]},{"id":"8d1f7ce4.0b774","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":672,"y":4664,"wires":[["46560e44.e7ea9"]]},{"id":"46560e44.e7ea9","type":"http request","z":"55fbaa78.039334","name":"pushhostalarm","method":"GET","ret":"txt","url":"","tls":"","x":732,"y":4620,"wires":[["dbad34fe.6ef528"]]},{"id":"4139bd09.d40464","type":"mqtt out","z":"55fbaa78.039334","name":"Recording","topic":"iobroker/ipcam/alarmset/manrec_triggered","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":376,"y":4667,"wires":[]},{"id":"5ca1bb25.5f90e4","type":"ui_button","z":"55fbaa78.039334","name":"Trigger Man REC","group":"db215c35.d4bb5","order":0,"width":0,"height":0,"passthru":true,"label":"Trigger Man REC","color":"#ffffff","bgcolor":"#f3100b","icon":"fa-bell","payload":"{\"val\" : \"alarm\"}","payloadType":"json","topic":"pushalarm","x":214,"y":4667,"wires":[["4139bd09.d40464"]]},{"id":"346f444e.e2b68c","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/manrec_display","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1255,"y":4684,"wires":[]},{"id":"8eb700af.cfe63","type":"mqtt in","z":"55fbaa78.039334","name":"Test REC","topic":"iobroker/ipcam/alarmset/manrec","qos":"1","broker":"80fd9eab.17aa2","x":70,"y":4667,"wires":[["5ca1bb25.5f90e4"]]},{"id":"e6ddfa9b.aaa7f8","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1013,"y":4663,"wires":[["346f444e.e2b68c"]]},{"id":"3e5a3592.76a84a","type":"delay","z":"55fbaa78.039334","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":847,"y":4706,"wires":[["4affd726.fac0e8"]]},{"id":"4affd726.fac0e8","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1015,"y":4706,"wires":[["346f444e.e2b68c"]]},{"id":"1894eba7.bb6d34","type":"function","z":"55fbaa78.039334","name":"Man REC","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 = \"three\";\nmsg.payload = ip+\"/param.cgi?/cmd=manualrec&-act=off&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":539,"y":4621,"wires":[["8d1f7ce4.0b774"]]},{"id":"d049be03.bed44","type":"delay","z":"55fbaa78.039334","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":403,"y":4621,"wires":[["1894eba7.bb6d34"]]},{"id":"5cc0fb44.77de14","type":"template","z":"55fbaa78.039334","name":"page","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n    <head></head>\n    <body>\n        <p>{{req.query.active}}!</p>\n        <p>{{req.query.recording}}!</p>\n        <p>{{req.query.nightvision}}!</p>\n    </body>\n</html>","x":263,"y":4836,"wires":[["6ad92328.f56a5c"]]},{"id":"709f0bd5.39ab74","type":"http in","z":"55fbaa78.039334","name":"Trigger REC+IR","url":"/iobroker/ipcam/alarmset/alarmtrigger","method":"get","upload":false,"swaggerDoc":"","x":90,"y":4836,"wires":[["5cc0fb44.77de14","7f357726.ef9d38","dd551336.136cf","600b7ea7.91429"]]},{"id":"6ad92328.f56a5c","type":"http response","z":"55fbaa78.039334","name":"","x":389,"y":4836,"wires":[]},{"id":"8056ba3.85aa848","type":"comment","z":"55fbaa78.039334","name":"Manual Recording","info":"","x":100,"y":4625,"wires":[]},{"id":"bb572d40.3e849","type":"comment","z":"55fbaa78.039334","name":"Catch Alarmserver","info":"","x":100,"y":4798,"wires":[]},{"id":"b20cdc1a.649ff","type":"function","z":"55fbaa78.039334","name":"IR 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 = \"nightvision\";\nmsg.payload = ip+\"/param.cgi?cmd=setinfrared&-infraredstat=auto&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":620,"y":4868,"wires":[["709d08f5.2c5ea8"]]},{"id":"a8f9ff9a.09f29","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":1008,"y":4868,"wires":[["c4759fe2.d56e7"]]},{"id":"709d08f5.2c5ea8","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":748,"y":4868,"wires":[["29106aca.0fda66"]]},{"id":"29106aca.0fda66","type":"http request","z":"55fbaa78.039334","name":"nightvision","method":"GET","ret":"txt","url":"","tls":"","x":878,"y":4868,"wires":[["a8f9ff9a.09f29"]]},{"id":"a14c3004.b3bc7","type":"function","z":"55fbaa78.039334","name":"IR 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 = \"emailsnap\";\nmsg.payload = ip+\"/param.cgi?cmd=setinfrared&-infraredstat=close&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":621,"y":4908,"wires":[["b81339cf.1956e8"]]},{"id":"b81339cf.1956e8","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":749,"y":4908,"wires":[["9837a707.7a1328"]]},{"id":"9837a707.7a1328","type":"http request","z":"55fbaa78.039334","name":"nightvision","method":"GET","ret":"txt","url":"","tls":"","x":879,"y":4908,"wires":[["cb00cddc.4c81b"]]},{"id":"cb00cddc.4c81b","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":1008,"y":4908,"wires":[["c4759fe2.d56e7"]]},{"id":"c4759fe2.d56e7","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/nightvision_display","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1241,"y":4885,"wires":[]},{"id":"504d2350.ca48ac","type":"comment","z":"55fbaa78.039334","name":"Activate IR","info":"","x":225,"y":4891,"wires":[]},{"id":"600b7ea7.91429","type":"delay","z":"55fbaa78.039334","name":"","pauseType":"delay","timeout":"45","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":104,"y":4980,"wires":[["afb3bcca.87b3c"]]},{"id":"7f357726.ef9d38","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"val\" : \"alarm\"}","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":4797,"wires":[["bff705c3.e29f68"]]},{"id":"e588c46e.55b788","type":"mqtt out","z":"55fbaa78.039334","name":"Enable IR","topic":"iobroker/ipcam/alarmset/nightvision","qos":"1","retain":"","broker":"80fd9eab.17aa2","x":220,"y":4320,"wires":[]},{"id":"15971716.799f29","type":"mqtt in","z":"55fbaa78.039334","name":"Set IR","topic":"iobroker/ipcam/alarmset/nightvision","qos":"1","broker":"80fd9eab.17aa2","x":344,"y":4891,"wires":[["914b0f35.4507"]]},{"id":"914b0f35.4507","type":"switch","z":"55fbaa78.039334","name":"Push","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"{\"val\":\"ON\"}","vt":"str"},{"t":"eq","v":"{\"val\":\"OFF\"}","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":488,"y":4890,"wires":[["b20cdc1a.649ff"],["a14c3004.b3bc7"]]},{"id":"dd551336.136cf","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"val\":\"ON\"}","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":258,"y":4940,"wires":[["335da4e0.7cc2ec","914b0f35.4507"]]},{"id":"afb3bcca.87b3c","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"val\":\"OFF\"}","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":257,"y":4980,"wires":[["914b0f35.4507"]]},{"id":"37fa6a43.41d1e6","type":"mqtt in","z":"55fbaa78.039334","name":"Push Alarm","topic":"iobroker/ipcam/alarmset/pushalarm_triggered","qos":"1","broker":"80fd9eab.17aa2","x":80,"y":4514,"wires":[["c652826b.4e707"]]},{"id":"c652826b.4e707","type":"function","z":"55fbaa78.039334","name":"process value","func":"msg.payload = JSON.parse(msg.payload).pushalarm;\nreturn msg;","outputs":1,"noerr":0,"x":224,"y":4514,"wires":[["a35192cc.05983"]]},{"id":"a35192cc.05983","type":"switch","z":"55fbaa78.039334","name":"Push","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"triggered","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":358,"y":4514,"wires":[["551aed0b.a92494"]]},{"id":"551aed0b.a92494","type":"function","z":"55fbaa78.039334","name":"Alarm","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 = \"pushalarm\";\nmsg.payload = ip+\"/param.cgi?cmd=pushhostalarm&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":470,"y":4514,"wires":[["5fbcd594.8ed88c"]]},{"id":"7d226887.bbd588","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":547,"y":4558,"wires":[["b1c0833c.d5553","54e65e1d.bbaeb"]]},{"id":"5fbcd594.8ed88c","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":210,"y":4556,"wires":[["be6eddc0.3318d"]]},{"id":"be6eddc0.3318d","type":"http request","z":"55fbaa78.039334","name":"pushhostalarm","method":"GET","ret":"txt","url":"","tls":"","x":350,"y":4557,"wires":[["7d226887.bbd588"]]},{"id":"5fb9bffc.50ee4","type":"mqtt out","z":"55fbaa78.039334","name":"Push Alarm","topic":"iobroker/ipcam/alarmset/pushalarm_triggered","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":326,"y":4467,"wires":[]},{"id":"cbefcc37.65f5e","type":"ui_button","z":"55fbaa78.039334","name":"Alarm","group":"197f5b20.d715c5","order":0,"width":0,"height":0,"passthru":true,"label":"Trigger Alarm!","color":"#ffffff","bgcolor":"#f3100b","icon":"fa-bell","payload":"{\"pushalarm\" : \"triggered\"}","payloadType":"json","topic":"pushalarm","x":202,"y":4467,"wires":[["5fb9bffc.50ee4"]]},{"id":"54e65e1d.bbaeb","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/pushalarm_display","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1024,"y":4558,"wires":[]},{"id":"7422d039.1c1e7","type":"mqtt in","z":"55fbaa78.039334","name":"PushTrigger","topic":"iobroker/ipcam/alarmset/pushalarm","qos":"1","broker":"80fd9eab.17aa2","x":80,"y":4467,"wires":[["cbefcc37.65f5e"]]},{"id":"9b88b7cd.13e228","type":"comment","z":"55fbaa78.039334","name":"Trigger an Alarm","info":"","x":91,"y":4429,"wires":[]},{"id":"7f9a572f.795138","type":"inject","z":"55fbaa78.039334","name":"Trigger","topic":"iobroker/ipcam/alarmset/pushalarm","payload":"Manual Trigger","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":92,"y":4227,"wires":[["5ce14114.6333a"]]},{"id":"5ce14114.6333a","type":"mqtt out","z":"55fbaa78.039334","name":"Test Alarm","topic":"iobroker/ipcam/alarmset/pushalarm","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":222,"y":4227,"wires":[]},{"id":"cd639485.7264c8","type":"mqtt out","z":"55fbaa78.039334","name":"Enable Alarm Area2","topic":"iobroker/ipcam/alarmset/area2_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":264,"y":3469,"wires":[]},{"id":"b275155e.178e98","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Area2","topic":"iobroker/ipcam/alarmset/area2_enable","qos":"1","broker":"80fd9eab.17aa2","x":80,"y":3546,"wires":[["c4aaea2f.5d1e08"]]},{"id":"823ff98c.4061d8","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/area1_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":971,"y":3334,"wires":[]},{"id":"801be627.6aa058","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":866,"y":3376,"wires":[["10215bcd.7970a4"]]},{"id":"10215bcd.7970a4","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1015,"y":3376,"wires":[["823ff98c.4061d8"]]},{"id":"7f6d13d8.24183c","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/area2_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":961,"y":3577,"wires":[]},{"id":"4febd644.00a2d8","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":872,"y":3619,"wires":[["3981c1ba.5eb5ae"]]},{"id":"3981c1ba.5eb5ae","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1021,"y":3619,"wires":[["7f6d13d8.24183c"]]},{"id":"f576dc90.e30cb","type":"mqtt out","z":"55fbaa78.039334","name":"Enable Alarm Area3","topic":"iobroker/ipcam/alarmset/area3_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":260,"y":3692,"wires":[]},{"id":"4bab39a0.cc7098","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Area3","topic":"iobroker/ipcam/alarmset/area3_enable","qos":"1","broker":"80fd9eab.17aa2","x":79,"y":3769,"wires":[["8d80957.c4c4168"]]},{"id":"ed4da9f4.6dd1b8","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/area3_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":956,"y":3801,"wires":[]},{"id":"1a5f4d09.9caf13","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":868,"y":3845,"wires":[["761120e4.44d2"]]},{"id":"761120e4.44d2","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1017,"y":3845,"wires":[["ed4da9f4.6dd1b8"]]},{"id":"bd580150.87b49","type":"mqtt out","z":"55fbaa78.039334","name":"Enable Alarm Area4","topic":"iobroker/ipcam/alarmset/area4_enable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":264,"y":3933,"wires":[]},{"id":"abc2af7c.bc217","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Area4","topic":"iobroker/ipcam/alarmset/area4_enable","qos":"1","broker":"80fd9eab.17aa2","x":80,"y":4012,"wires":[["af09f685.013f68"]]},{"id":"b6b3dd14.9ba8f","type":"mqtt out","z":"55fbaa78.039334","name":"","topic":"iobroker/ipcam/alarmset/area4_display","qos":"1","retain":"false","broker":"c27c1878.5dace8","x":956,"y":4044,"wires":[]},{"id":"97d8f071.786df","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":868,"y":4089,"wires":[["a82d528d.f8c68"]]},{"id":"a82d528d.f8c68","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.val","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1017,"y":4089,"wires":[["b6b3dd14.9ba8f"]]},{"id":"b1c0833c.d5553","type":"delay","z":"55fbaa78.039334","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":640,"y":4515,"wires":[["60c63e89.88ca2"]]},{"id":"60c63e89.88ca2","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":4515,"wires":[["54e65e1d.bbaeb"]]},{"id":"f4d8d26f.abfc5","type":"inject","z":"55fbaa78.039334","name":"Trigger","topic":"iobroker/ipcam/alarmset/manrec","payload":"{\"val\" : \"alarm\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":92,"y":4273,"wires":[["d1346f6.a375d9"]]},{"id":"d1346f6.a375d9","type":"mqtt out","z":"55fbaa78.039334","name":"Test REC","topic":"iobroker/ipcam/alarmset/manrec","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":222,"y":4273,"wires":[]},{"id":"dc9fb474.084528","type":"inject","z":"55fbaa78.039334","name":"Trigger","topic":"iobroker/ipcam/alarmset/nightvision","payload":"{\"val\":\"ON\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":91,"y":4320,"wires":[["e588c46e.55b788"]]},{"id":"6b5eb548.34023c","type":"mqtt out","z":"55fbaa78.039334","name":"Disable IR","topic":"iobroker/ipcam/alarmset/nightvision","qos":"1","retain":"","broker":"80fd9eab.17aa2","x":219,"y":4367,"wires":[]},{"id":"296776c9.86193a","type":"inject","z":"55fbaa78.039334","name":"Trigger","topic":"iobroker/ipcam/alarmset/nightvision","payload":"{\"val\":\"OFF\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":4367,"wires":[["6b5eb548.34023c"]]},{"id":"ee3ad063.9805e","type":"comment","z":"55fbaa78.039334","name":"Test Manually","info":"","x":90,"y":4180,"wires":[]},{"id":"335da4e0.7cc2ec","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":410,"y":5054,"wires":[]},{"id":"bde7e305.6826f","type":"ui_form","z":"55fbaa78.039334","name":"Change Server Address","label":"Change Server Address","group":"96b4d2b0.46f44","order":2,"width":0,"height":0,"options":[{"label":"Server IP","value":"ftpip","type":"text","required":true},{"label":"Server Port","value":"ftpport","type":"text","required":true},{"label":"Username","value":"ftpuser","type":"text","required":true},{"label":"Password","value":"ftppass","type":"password","required":true},{"label":"Upload Directory","value":"ftpdir","type":"text","required":true}],"formValue":{"ftpip":"","ftpport":"","ftpuser":"","ftppass":"","ftpdir":""},"payload":"","submit":"Submit","cancel":"Cancel","topic":"ftpserver","x":1550,"y":4480,"wires":[["be68c753.b3b838","a2b71c01.310c8"]]},{"id":"be68c753.b3b838","type":"change","z":"55fbaa78.039334","name":"Set Flow FTP Server","rules":[{"t":"set","p":"ftpip","pt":"flow","to":"payload.ftpip","tot":"msg"},{"t":"set","p":"ftppass","pt":"flow","to":"payload.ftppass","tot":"msg"},{"t":"set","p":"ftpuser","pt":"flow","to":"payload.ftpuser","tot":"msg"},{"t":"set","p":"ftpport","pt":"flow","to":"payload.ftpport","tot":"msg"},{"t":"set","p":"ftpdir","pt":"flow","to":"payload.ftpdir","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1810,"y":4480,"wires":[["426c8867.967fb8"]]},{"id":"3c74148b.21a5bc","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":2296,"y":4525,"wires":[["dbde63bc.a259d"]]},{"id":"dbde63bc.a259d","type":"ui_text","z":"55fbaa78.039334","group":"96b4d2b0.46f44","order":3,"width":"6","height":"2","name":"Set FTP Server","label":"Set FTP Server","format":"{{msg.payload.setftp}}","layout":"row-spread","x":2436,"y":4525,"wires":[]},{"id":"a2b71c01.310c8","type":"function","z":"55fbaa78.039334","name":"Set FTP Server","func":"var ip = global.get(\"ip\");\nvar user = global.get(\"user\");\nvar password = global.get(\"password\");\n\n// var ftpip = flow.get(\"ftpip\");\n// var ftpport = flow.get(\"ftpport\");\n// var ftpuser = flow.get(\"ftpuser\");\n// var ftppass = flow.get(\"ftppass\");\n// var ftpdir = flow.get(\"ftpdir\");\n\nvar ftpip = msg.payload.ftpip;\nvar ftpport = msg.payload.ftpport;\nvar ftpuser = msg.payload.ftpuser;\nvar ftppass = msg.payload.ftppass;\nvar ftpdir = msg.payload.ftpdir;\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 = \"setftp\";\nmsg.payload = ip+\"/param.cgi?cmd=set_instar_admin&-index=31&-value=\"+ftpip+\"%3B\"+ftpport+\"%3B\"+ftpuser+\"%3B\"+ftppass+\"%3B1%3B\"+ftpdir+\"%3B1%3B1%3B0&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":1796,"y":4525,"wires":[["7ba8a75.683ad58"]]},{"id":"7ba8a75.683ad58","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":1933,"y":4525,"wires":[["431241a7.a0069"]]},{"id":"431241a7.a0069","type":"http request","z":"55fbaa78.039334","name":"setftp","method":"GET","ret":"txt","url":"","tls":"","x":2053,"y":4525,"wires":[["3050ec0f.7dcd04"]]},{"id":"3050ec0f.7dcd04","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]set ok."},{"type":"str","value":"{ \"setftp\": \"successful\" }"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"{ \"setftp\": \"Error\" }"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":2176,"y":4525,"wires":[["3c74148b.21a5bc"]]},{"id":"80e9fe56.3a214","type":"http request","z":"55fbaa78.039334","name":"index=31","method":"GET","ret":"txt","url":"","tls":"","x":2069,"y":4586,"wires":[["c84b676f.b03258"]]},{"id":"c84b676f.b03258","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"delRightMost","params":[{"type":"str","value":"\";"}]},{"name":"replaceAll","params":[{"type":"str","value":"admin_value31=\""},{"type":"str","value":""}]},{"name":"replaceAll","params":[{"type":"str","value":";"},{"type":"str","value":","}]},{"name":"parseCSV","params":[{"type":"str","value":","},{"type":"str","value":""},{"type":"str","value":""},{"type":"str","value":""}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":2199,"y":4586,"wires":[["a4a608c7.0cb428"]]},{"id":"15445f9e.3c6ac","type":"function","z":"55fbaa78.039334","name":"index=31","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 = \"index=31\";\nmsg.payload = ip+\"/param.cgi?cmd=get_instar_admin&-index=31&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":1789,"y":4586,"wires":[["ef593e45.9b96b"]]},{"id":"ec344ac3.daa2d8","type":"mqtt in","z":"55fbaa78.039334","name":"ipcam/login","topic":"iobroker/ipcam/login","qos":"1","broker":"80fd9eab.17aa2","x":1519,"y":4586,"wires":[["8d27dbef.523398"]]},{"id":"ef593e45.9b96b","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1929,"y":4586,"wires":[["80e9fe56.3a214"]]},{"id":"a4a608c7.0cb428","type":"function","z":"55fbaa78.039334","name":"getftpip","func":"var getftp = msg.payload[0];\nvar getftpip = getftp[0];\n\nmsg.topic = \"index=31\";\nmsg.payload = getftp;\nreturn msg;\n\n// var getftp = msg.payload[0];\n// var getftpip = getftp[0];\n\n// msg.topic = \"index=31\";\n// msg.payload = getftpip;\n// return msg;","outputs":1,"noerr":0,"x":2319,"y":4586,"wires":[["dd154ad8.67a248"]]},{"id":"dd154ad8.67a248","type":"ui_template","z":"55fbaa78.039334","group":"96b4d2b0.46f44","name":"Current FTP Server Settings","order":1,"width":"6","height":"4","format":"<h4>Current FTP Server Settings</h4>\n<table style=\"width:100%\">\n  <tr>\n    <td>FTP Server IP</td>\n    <td>{{msg.payload[0]}}</td>\n  </tr>\n  <tr>\n    <td>FTP Server Port</td>\n    <td>{{msg.payload[1]}}</td>\n  </tr>\n  <tr>\n    <td>FTP User</td>\n    <td>{{msg.payload[2]}}</td>\n  </tr>\n  <tr>\n    <td>FTP Password</td>\n    <td>{{msg.payload[3]}}</td>\n  </tr>\n  <tr>\n    <td>FTP Directory</td>\n    <td>{{msg.payload[5]}}</td>\n  </tr>\n</table>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":2566,"y":4635,"wires":[[]]},{"id":"426c8867.967fb8","type":"mqtt out","z":"55fbaa78.039334","name":"Refresh FTP Datat","topic":"iobroker/ipcam/alarmset/ftpset","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":2000,"y":4480,"wires":[]},{"id":"b8b7db69.334738","type":"mqtt in","z":"55fbaa78.039334","name":"Refresh FTP Datat","topic":"iobroker/ipcam/alarmset/ftpset","qos":"1","broker":"80fd9eab.17aa2","x":1539,"y":4636,"wires":[["b8a8c549.397f88"]]},{"id":"dafbfd58.2e192","type":"http request","z":"55fbaa78.039334","name":"index=31","method":"GET","ret":"txt","url":"","tls":"","x":2099,"y":4636,"wires":[["80dd15b8.f5f548"]]},{"id":"80dd15b8.f5f548","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"delRightMost","params":[{"type":"str","value":"\";"}]},{"name":"replaceAll","params":[{"type":"str","value":"admin_value31=\""},{"type":"str","value":""}]},{"name":"replaceAll","params":[{"type":"str","value":";"},{"type":"str","value":","}]},{"name":"parseCSV","params":[{"type":"str","value":","},{"type":"str","value":""},{"type":"str","value":""},{"type":"str","value":""}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":2246,"y":4636,"wires":[["2bb409e3.d7e6f6"]]},{"id":"86c53440.c79708","type":"function","z":"55fbaa78.039334","name":"index=31","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 = \"index=31\";\nmsg.payload = ip+\"/param.cgi?cmd=get_instar_admin&-index=31&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":1819,"y":4636,"wires":[["82544706.252388"]]},{"id":"82544706.252388","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1959,"y":4636,"wires":[["dafbfd58.2e192"]]},{"id":"2bb409e3.d7e6f6","type":"function","z":"55fbaa78.039334","name":"getftpip","func":"var getftp = msg.payload[0];\nvar getftpip = getftp[0];\n\nmsg.topic = \"index=31\";\nmsg.payload = getftp;\nreturn msg;\n\n// var getftp = msg.payload[0];\n// var getftpip = getftp[0];\n\n// msg.topic = \"index=31\";\n// msg.payload = getftpip;\n// return msg;","outputs":1,"noerr":0,"x":2366,"y":4636,"wires":[["dd154ad8.67a248"]]},{"id":"8d27dbef.523398","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":1659,"y":4586,"wires":[["15445f9e.3c6ac"]]},{"id":"b8a8c549.397f88","type":"delay","z":"55fbaa78.039334","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1689,"y":4636,"wires":[["86c53440.c79708"]]},{"id":"a57c3235.90c88","type":"comment","z":"55fbaa78.039334","name":"Set FTP Server","info":"","x":1530,"y":4434,"wires":[]},{"id":"e774ce07.2b6db","type":"comment","z":"55fbaa78.039334","name":"Get FTP Server","info":"","x":1530,"y":4550,"wires":[]},{"id":"b1c8b11e.bdda9","type":"mqtt in","z":"55fbaa78.039334","name":"Trigger FTP Upload","topic":"iobroker/ipcam/alarmset/ftpupload_triggered","qos":"1","broker":"80fd9eab.17aa2","x":1541,"y":4780,"wires":[["1a41a73a.5451f9"]]},{"id":"a2c679ac.b5ace8","type":"json","z":"55fbaa78.039334","name":"","property":"payload","action":"","pretty":false,"x":2183,"y":4780,"wires":[["47ab32f2.95415c","11a088aa.8d6617","a8ad8bb2.db77e8"]]},{"id":"47ab32f2.95415c","type":"ui_text","z":"55fbaa78.039334","group":"96b4d2b0.46f44","order":5,"width":0,"height":0,"name":"FTP Snapshot","label":"FTP Snapshot","format":"{{msg.payload.ftpsnap}}","layout":"row-spread","x":2370,"y":4761,"wires":[]},{"id":"1a41a73a.5451f9","type":"function","z":"55fbaa78.039334","name":"Test FRP","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 = \"testftp\";\nmsg.payload = ip+\"/param.cgi?cmd=testftp&-usr=\"+user+\"&-pwd=\"+password;\nreturn msg;","outputs":1,"noerr":0,"x":1692,"y":4780,"wires":[["2897f1be.4228de"]]},{"id":"2897f1be.4228de","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":1819,"y":4780,"wires":[["638531ed.e0c77"]]},{"id":"638531ed.e0c77","type":"http request","z":"55fbaa78.039334","name":"ftpsnap","method":"GET","ret":"txt","url":"","tls":"","x":1939,"y":4780,"wires":[["fd73e587.e71f98"]]},{"id":"fd73e587.e71f98","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"var result=\"0\";"},{"type":"str","value":"{ \"ftpsnap\": \"Upload Successful\" }"}]},{"name":"replaceAll","params":[{"type":"str","value":"var result=\"-1\";"},{"type":"str","value":"{ \"ftpsnap\": \"Unknown Error\" }"}]},{"name":"replaceAll","params":[{"type":"str","value":"var result=\"-2\";"},{"type":"str","value":"{ \"ftpsnap\": \"No Connection\" }"}]},{"name":"replaceAll","params":[{"type":"str","value":"var result=\"-3\";"},{"type":"str","value":"{ \"ftpsnap\": \"Wrong User or Password\" }"}]},{"name":"replaceAll","params":[{"type":"str","value":"var result=\"-4\";"},{"type":"str","value":"{ \"ftpsnap\": \"Wrong Directory\" }"}]},{"name":"replaceAll","params":[{"type":"str","value":"var result=\"-5\";"},{"type":"str","value":"{ \"ftpsnap\": \"No Connection\" }"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"{ \"ftpsnap\": \"ParamError\" }"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":2061,"y":4780,"wires":[["a2c679ac.b5ace8"]]},{"id":"5f2a1492.794edc","type":"ui_button","z":"55fbaa78.039334","name":"Trigger FTP Snap","group":"96b4d2b0.46f44","order":4,"width":0,"height":0,"passthru":false,"label":"Trigger FTP Snap","color":"#ffffff","bgcolor":"#f3100b","icon":"fa-bell","payload":"{ \"val\" : \"send2ftp\"}","payloadType":"json","topic":"ftpsnap","x":1541,"y":4738,"wires":[["156baaa2.0bbeb5"]]},{"id":"156baaa2.0bbeb5","type":"mqtt out","z":"55fbaa78.039334","name":"Trigger FTP Upload","topic":"iobroker/ipcam/alarmset/ftpupload_triggered","qos":"1","retain":"","broker":"80fd9eab.17aa2","x":1721,"y":4738,"wires":[]},{"id":"11a088aa.8d6617","type":"delay","z":"55fbaa78.039334","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":2200,"y":4718,"wires":[["d6c029b2.257aa8"]]},{"id":"d6c029b2.257aa8","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2355,"y":4718,"wires":[["9c893fe1.83e9f","47ab32f2.95415c"]]},{"id":"9c893fe1.83e9f","type":"mqtt out","z":"55fbaa78.039334","name":"FTP Upload","topic":"iobroker/ipcam/alarmset/ftpupload_display","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":2540,"y":4774,"wires":[]},{"id":"a8ad8bb2.db77e8","type":"change","z":"55fbaa78.039334","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2380,"y":4802,"wires":[["9c893fe1.83e9f"]]},{"id":"5cd28853.8d5788","type":"comment","z":"55fbaa78.039334","name":"Upload Snapshot","info":"","x":1530,"y":4693,"wires":[]},{"id":"ddce8cc2.57dab","type":"ui_template","z":"55fbaa78.039334","group":"96b4d2b0.46f44","name":"Display Image","order":0,"width":"6","height":"4","format":"<img ng-src= {{msg.payload}} width=\"280\"/>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":1955,"y":4898,"wires":[[]]},{"id":"d327104.88ad5f","type":"string","z":"55fbaa78.039334","name":"Create URL","methods":[{"name":"replaceAll","params":[{"type":"str","value":"/home/openhabian/.node-red/static/ftp/"},{"type":"str","value":"/ftp/"}]}],"prop":"payload.filePath","propout":"payload","object":"msg","objectout":"msg","x":1804,"y":4880,"wires":[["ddce8cc2.57dab","a5a35886.253038"]]},{"id":"6cd457ae.e7b728","type":"comment","z":"55fbaa78.039334","name":"Show Snapshot","info":"","x":1531,"y":4836,"wires":[]},{"id":"261d8383.8f611c","type":"wfwatch","z":"55fbaa78.039334","folder":"/home/openhabian/.node-red/static/ftp/","x":1590,"y":4880,"wires":[["d327104.88ad5f"]]},{"id":"f004998b.b364c8","type":"inject","z":"55fbaa78.039334","name":"Inject","topic":"Global Login","payload":"{\"ftpip\":\"192.168.2.114\", \"ftpport\":\"21\", \"ftpuser\":\"admin\", \"ftppass\":\"1029384756\", \"ftpdir\":\".%2Fofficecam\"}","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":"35","x":1533,"y":4515,"wires":[["be68c753.b3b838"]]},{"id":"a5a35886.253038","type":"mqtt out","z":"55fbaa78.039334","name":"FTP Upload URL","topic":"iobroker/ipcam/alarmset/ftpupload_url","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":1950,"y":4858,"wires":[]},{"id":"e2f6734d.18db3","type":"mqtt out","z":"55fbaa78.039334","name":"Disable Email","topic":"iobroker/ipcam/alarmset/alarmemail_disable","qos":"1","retain":"","broker":"c27c1878.5dace8","x":250,"y":87,"wires":[]},{"id":"e67ab18e.b518d","type":"mqtt in","z":"55fbaa78.039334","name":"Enable Email","topic":"iobroker/ipcam/alarmset/alarmemail_disable","qos":"1","broker":"c27c1878.5dace8","x":80,"y":180,"wires":[["e09a83bb.b05dc"]]},{"id":"d5560e8f.97218","type":"mqtt out","z":"55fbaa78.039334","name":"Disable Alarm Area1","topic":"iobroker/ipcam/alarmset/area1_disable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":270,"y":3240,"wires":[]},{"id":"23a9cde7.870ec2","type":"mqtt in","z":"55fbaa78.039334","name":"Disable Area1","topic":"iobroker/ipcam/alarmset/area1_disable","qos":"1","broker":"80fd9eab.17aa2","x":90,"y":3333,"wires":[["7d9aa163.0e383"]]},{"id":"f76f6df3.5a01f","type":"mqtt out","z":"55fbaa78.039334","name":"Disable Alarm Area2","topic":"iobroker/ipcam/alarmset/area2_disable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":270,"y":3508,"wires":[]},{"id":"b1bb4017.8afb1","type":"mqtt in","z":"55fbaa78.039334","name":"Disable Area2","topic":"iobroker/ipcam/alarmset/area2_disable","qos":"1","broker":"80fd9eab.17aa2","x":89,"y":3583,"wires":[["50b1804.cc7248"]]},{"id":"17e8aca.2761b53","type":"mqtt out","z":"55fbaa78.039334","name":"Disable Alarm Area3","topic":"iobroker/ipcam/alarmset/area3_disable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":270,"y":3731,"wires":[]},{"id":"d7b7de7.6908e2","type":"mqtt in","z":"55fbaa78.039334","name":"Disable Area3","topic":"iobroker/ipcam/alarmset/area3_disable","qos":"1","broker":"80fd9eab.17aa2","x":89,"y":3808,"wires":[["16b8ab44.8928e5"]]},{"id":"41a37e52.e3763","type":"mqtt out","z":"55fbaa78.039334","name":"Disable Alarm Area4","topic":"iobroker/ipcam/alarmset/area4_disable","qos":"1","retain":"false","broker":"80fd9eab.17aa2","x":270,"y":3973,"wires":[]},{"id":"fecf22bf.4760f","type":"mqtt in","z":"55fbaa78.039334","name":"Disable Area4","topic":"iobroker/ipcam/alarmset/area4_disable","qos":"1","broker":"80fd9eab.17aa2","x":91,"y":4052,"wires":[["1c682ffa.7e2fa"]]},{"id":"dbad34fe.6ef528","type":"string","z":"55fbaa78.039334","name":"toJSON","methods":[{"name":"replaceAll","params":[{"type":"str","value":"[Succeed]record(manual) succeed."},{"type":"str","value":"{ \"manrec\": \"30s recording started\" }"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]Param error."},{"type":"str","value":"{ \"manrec\": \"Param Error\" }"}]},{"name":"replaceAll","params":[{"type":"str","value":"[Error]record(manual) failed."},{"type":"str","value":"{ \"manrec\": \"Rec Failed\" }"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":870,"y":4620,"wires":[["69ea0a8e.d1c284"]]},{"id":"96766ee.6f6f99","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":570,"y":40,"wires":[]},{"id":"b8552e6a.b0dfe","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":620,"y":80,"wires":[]},{"id":"bcc76210.285e6","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":870,"y":60,"wires":[]},{"id":"a7b7ae2e.0e76b","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":860,"y":120,"wires":[]},{"id":"7c1aec4f.fb3614","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":1480,"wires":[]},{"id":"e2be367d.4095b8","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":700,"y":1520,"wires":[]},{"id":"a383f3d1.34753","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":920,"y":1540,"wires":[]},{"id":"d2d4660b.ce07c8","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":920,"y":1600,"wires":[]},{"id":"1c7f3022.f642f","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":1720,"wires":[]},{"id":"1defc564.58bfbb","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":900,"y":1700,"wires":[]},{"id":"7fdc917f.c7f0b","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":880,"y":300,"wires":[]},{"id":"319363ac.7bff8c","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":600,"y":1760,"wires":[]},{"id":"5df2ca9e.8b6f64","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":800,"y":1800,"wires":[]},{"id":"d62cdbc9.47a408","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":520,"y":1720,"wires":[]},{"id":"ed04935b.12ffe","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":820,"y":1840,"wires":[]},{"id":"9075fb67.d5e4a8","type":"debug","z":"55fbaa78.039334","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":900,"y":1960,"wires":[]},{"id":"c27c1878.5dace8","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":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"3d67cd48.de9b32","type":"ui_group","z":"","name":"/param.cgi?cmd=setmdalarm&-aname=emailsnap","tab":"7e6a055d.bff96c","order":6,"disp":true,"width":"6","collapse":false},{"id":"18ed0f6.6a79cf1","type":"ui_group","z":"","name":"/param.cgi?cmd=setmdalarm&-aname=snap","tab":"7e6a055d.bff96c","order":7,"disp":true,"width":"6","collapse":false},{"id":"ff46617f.a2a15","type":"ui_group","z":"","name":"/param.cgi?cmd=setmdalarm&-aname=ftpsnap","tab":"7e6a055d.bff96c","order":8,"disp":true,"width":"6","collapse":false},{"id":"4a68bd5e.07e164","type":"ui_group","z":"","name":"/param.cgi?cmd=setmdalarm&-aname=record","tab":"7e6a055d.bff96c","order":9,"disp":true,"width":"6","collapse":false},{"id":"76d78eaa.c2978","type":"ui_group","z":"","name":"/param.cgi?cmd=setmdalarm&-aname=ftprec","tab":"7e6a055d.bff96c","order":10,"disp":true,"width":"6","collapse":false},{"id":"abde7906.c35f68","type":"ui_group","z":"","name":"/param.cgi?cmd=setmdalarm&-aname=relay","tab":"7e6a055d.bff96c","order":11,"disp":true,"width":"6","collapse":false},{"id":"d9e3395b.7c1048","type":"ui_group","z":"","name":"/param.cgi?cmd=setmdalarm&-aname=sound","tab":"7e6a055d.bff96c","order":12,"disp":true,"width":"6","collapse":false},{"id":"d1e2de4b.16362","type":"ui_group","z":"","name":"/param.cgi?cmd=setmdalarm&-aname=type","tab":"7e6a055d.bff96c","order":13,"disp":true,"width":"6","collapse":false},{"id":"df5f1bb3.06ae08","type":"ui_group","z":"","name":"/param.cgi?cmd=setaudioalarmattr&-aa_enable","tab":"7e6a055d.bff96c","order":14,"disp":true,"width":"6","collapse":false},{"id":"da3b17d5.7af908","type":"ui_group","z":"","name":"/param.cgi?cmd=setaudioalarmattr&-aa_value","tab":"7e6a055d.bff96c","order":15,"disp":true,"width":"6","collapse":false},{"id":"72d6030f.30d4ac","type":"ui_group","z":"","name":"/param.cgi?cmd=setaudioalarmattr&-aa_time","tab":"7e6a055d.bff96c","order":16,"disp":true,"width":"6","collapse":false},{"id":"44cac29d.d2a1fc","type":"ui_group","z":"","name":"/param.cgi?cmd=setioattr&-io_enable","tab":"7e6a055d.bff96c","order":17,"disp":true,"width":"6","collapse":false},{"id":"d122a31e.7fc08","type":"ui_group","z":"","name":"/param.cgi?cmd=setpirattr&-pir_enable","tab":"7e6a055d.bff96c","order":19,"disp":true,"width":"6","collapse":false},{"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":""},{"id":"a5e7e5b7.260b68","type":"ui_group","z":"","name":"Activate Area 1","tab":"7e6a055d.bff96c","disp":true,"width":"6","collapse":false},{"id":"8de08aa8.320718","type":"ui_group","z":"","name":"Activate Area 2","tab":"7e6a055d.bff96c","disp":true,"width":"6","collapse":false},{"id":"c5ca58fb.e2b0d8","type":"ui_group","z":"","name":"Activate Area 3","tab":"7e6a055d.bff96c","disp":true,"width":"6","collapse":false},{"id":"cccd45fe.7647d8","type":"ui_group","z":"","name":"Activate Area 4","tab":"7e6a055d.bff96c","disp":true,"width":"6","collapse":false},{"id":"db215c35.d4bb5","type":"ui_group","z":"","name":"Trigger Recording","tab":"7e6a055d.bff96c","order":5,"disp":true,"width":"6","collapse":false},{"id":"197f5b20.d715c5","type":"ui_group","z":"","name":"Trigger Alarm","tab":"7e6a055d.bff96c","order":4,"disp":true,"width":"6","collapse":false},{"id":"96b4d2b0.46f44","type":"ui_group","z":"","name":"FTP Server","tab":"7e6a055d.bff96c","disp":true,"width":"6","collapse":false},{"id":"7e6a055d.bff96c","type":"ui_tab","z":"","name":"IOBroker","icon":"fa-gg","order":28}]

VIS Widgets

[{"tpl":"_tplGroup","data":{"members":["w00006","w00009","w00007","w00008","w00010","w00011","w00012","w00013","w00014","w00015","w00016","w00017","w00018"],"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","attrCount":"1","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"widgetSet":null,"style":{"top":"11px","left":"12px","width":"651px","height":"991px"}},{"tpl":"tplIFrame","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":true,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","refreshInterval":"0","seamless":"true","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"src":"http://192.168.2.115:8081/"},"style":{"left":"0%","top":"0%","width":"98.46%","height":"48.38%","border-width":"5px","border-style":"solid","border-color":"#0036ff"},"widgetSet":"basic","grouped":true,"groupName":"w00006"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"bg-orange","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.area1_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"Area 1 Disabled","label_true":"Area 1 Enabled"},"style":{"left":"0%","top":"51.01%","width":"21.73%","height":"14.24%"},"widgetSet":"metro","grouped":true,"groupName":"w00009"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"bg-orange","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.area2_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"Area 2 Disabled","label_true":"Area 2 Enabled"},"style":{"left":"25.73%","top":"51.01%","width":"22.03%","height":"14.24%"},"widgetSet":"metro","grouped":true,"groupName":"w00007"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"bg-orange","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.area3_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"Area 3 Disabled","label_true":"Area 3 Enabled"},"style":{"left":"51.46%","top":"51.01%","width":"22.03%","height":"14.24%"},"widgetSet":"metro","grouped":true,"groupName":"w00008"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"bg-orange","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.area4_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"Area 4 Disabled","label_true":"Area 4 Enabled"},"style":{"left":"77.97%","top":"51.01%","width":"22.03%","height":"14.24%"},"widgetSet":"metro","grouped":true,"groupName":"w00010"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"bg-orange","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.pir_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"PIR Disabled","label_true":"PIR Enabled"},"style":{"left":"0%","top":"68.18%","width":"21.73%","height":"14.44%"},"widgetSet":"metro","grouped":true,"groupName":"w00011"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"bg-orange","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.areapir_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"Area & PIR not Linked","label_true":"Area & PIR Linked"},"style":{"left":"25.73%","top":"68.18%","width":"22.03%","height":"14.44%"},"widgetSet":"metro","grouped":true,"groupName":"w00012"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"ribbed-red","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.manrec_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"No Recording","label_true":"Alarm Recording"},"style":{"left":"51.46%","top":"68.18%","width":"22.03%","height":"14.44%"},"widgetSet":"metro","grouped":true,"groupName":"w00013"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"ribbed-lightRed","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.pushalarm_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"No Alarm","label_true":"Alarm Triggered"},"style":{"left":"77.97%","top":"68.18%","width":"22.03%","height":"14.44%"},"widgetSet":"metro","grouped":true,"groupName":"w00014"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"ribbed-red","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.nightvision_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"Nightvision Disabled","label_true":"Nightvision Enabled"},"style":{"left":"0%","top":"85.76%","width":"21.73%","height":"14.24%"},"widgetSet":"metro","grouped":true,"groupName":"w00015"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"bg-orange","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.audiodetection_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"Audio Detection Disabled","label_true":"Audio Detection Enabled"},"style":{"left":"25.58%","top":"85.76%","width":"22.03%","height":"14.24%"},"widgetSet":"metro","grouped":true,"groupName":"w00016"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"bg-orange","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.alarmsignal_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"Alarm Signal Deactivated","label_true":"Alarm Signal Activated"},"style":{"left":"51.46%","top":"85.76%","width":"22.03%","height":"14.24%"},"widgetSet":"metro","grouped":true,"groupName":"w00017"},{"tpl":"tplMetroTileBoolNumber","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","hover":"true","bg_class_false":"bg-cobalt","bg_class_true":"bg-orange","icon_class_false":"icon-cancel-2","icon_class_true":"icon-checkmark","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"state_oid":"mqtt.0.iobroker.ipcam.alarmset.alarmemail_display","transform":true,"g_badge":true,"icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","badge_top":"0","badge_left":"0","label_false":"Email Notification Disabled","label_true":"Email Notification Enabled"},"style":{"left":"77.97%","top":"85.76%","width":"22.03%","height":"14.24%"},"widgetSet":"metro","grouped":true,"groupName":"w00018"}]