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"