Difference between revisions of "Node-HIU Flows"

From Heatweb Wiki
Jump to: navigation, search
(LoRaWAN)
(Alarms)
 
Line 79: Line 79:
 
<pre>
 
<pre>
 
[{"id":"412080f5.8877e","type":"tab","label":"Flow 2","disabled":false},{"id":"8ab04160.faca3","type":"template","z":"412080f5.8877e","name":"jquery","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t<title>Node-HIU Control System</title>\n\t<link rel=\"shortcut icon\" href=\"http://www.heatweb.info/iHIU/jquery/demos/favicon.ico\">\n    <link rel=\"stylesheet\" href=\"http://fonts.googleapis.com/css?family=Open+Sans:300,400,700\">\n\n\n\n\t<link rel=\"stylesheet\" href=\"http://www.heatweb.info/iHIU/jquery/demos/css/themes/default/jquery.mobile-1.4.3.min.css\">\n\t<link rel=\"stylesheet\" href=\"http://www.heatweb.info/iHIU/jquery/demos/_assets/css/jqm-demos.css\">\n\t<script src=\"http://www.heatweb.info/iHIU/jquery/demos/js/jquery.js\"></script>\n\t<script src=\"http://www.heatweb.info/iHIU/jquery/demos/_assets/js/index.js\"></script>\n\t<script src=\"http://www.heatweb.info/iHIU/jquery/demos/js/jquery.mobile-1.4.3.min.js\"></script>\n\n\t\n\t<script type=\"text/javascript\">\n\tfunction updateSection2(sect,uwith)\n\t{\n\t\n\t\tdocument.getElementById(sect).innerHTML=uwith;\n\n\t}\t\n\t</script>\n\t\n\t\n\t<script type=\"text/javascript\">\n\tfunction updateSection(sect,uwith,sysid,sendv)\n\t{\n\n\t\t//alert(uwith);\n\n\t\tif (sect.length==0)\n\t\t{\n\n\t\t\treturn;\n\t\t}\n\t\tif (window.XMLHttpRequest)\n\t\t  {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t  xmlhttp=new XMLHttpRequest();\n\t\t  }\n\t\telse\n\t\t  {// code for IE6, IE5\n\t\t  xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t  }\n\t\txmlhttp.onreadystatechange=function()\n\t\t  {\n\t\t  if (xmlhttp.readyState==4 && xmlhttp.status==200)\n\t\t\t{\n\t\t\tdocument.getElementById(sect).innerHTML=xmlhttp.responseText;\n\t\t\t}\n\t\t  }\n\t\t\n\t\t\n\t\tif(sendv) { \n\t\t\n\t\t\tuwith = uwith + \"&k=\" + sendv + \"&id=\" + sysid + \"&v=\" + document.getElementById(sendv).value;\n\t\t\n\t\t}\n\t\txmlhttp.open(\"GET\",uwith,true);\n\t\txmlhttp.send();\n\t\t\n\t}\n\t</script>\t\n\n\n\t\n<style>\n.tiltable, .tiltable TD, .tiltable TH\n{\nfont-size:10pt;\n}\n</style>\t\n\t\n\t\n\t\n</head>\n<body>\n\t\n<script>\t\nfunction goSave()  {\n\tvar MyIFrame = document.getElementById(\"bframe\");\n\tvar MyIFrameDoc = (MyIFrame.contentWindow || MyIFrame.contentDocument);\n\tif (MyIFrameDoc.document) MyIFrameDoc = MyIFrameDoc.document;\n\t//MyIFrameDoc.getElementById(\"codeform\").submit();\n\tMyIFrameDoc.getElementById(\"sbutton\").click();\n}\n</script>\t\n\t\n<div data-role=\"page\" class=\"jqm-demos\" data-quicklinks=\"true\">\n\n\n\t<div data-role=\"header\" class=\"jqm-header\">\n\t\t<h2><a href=\"frontpanel.php\" title=\"Thermal Integration Limited\"><img src=\"http://heatweb.info/iHIU/jqtilogo.png\" alt=\"Thermal Integration Ltd.\"></a></h2>\n\n\t\t<a href=\"frontpanel.php\" class=\"ui-btn ui-btn-icon-notext ui-corner-all ui-icon-home ui-nodisc-icon ui-alt-icon ui-btn-right\">Home</a>\n\n\t\t<a href=\"#\" class=\"jqm-navmenu-link ui-btn ui-btn-icon-notext ui-corner-all ui-icon-bars ui-nodisc-icon ui-alt-icon ui-btn-left\">Menu</a>\n\t\t<p><?php echo $userinf; ?></p>\n\t\t\n\t\t\n\t</div><!-- /header -->\n\n\t<div role=\"main\" class=\"ui-content jqm-content\">\n\n\n\n\n{{payload}}\n\n\n\t</div><!-- /content -->\n\t<div data-role=\"panel\" class=\"jqm-navmenu-panel\" data-position=\"left\" data-display=\"overlay\" data-theme=\"a\">\n\t    \t<ul class=\"jqm-list ui-alt-icon ui-nodisc-icon\">\n\t\t\t\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"demos homepage\" data-icon=\"home\"><a href=\"web\">Home</a></li>\n\n\t\t\t\t\n\t\t\n\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"demos homepage\" data-icon=\"home\"><a href=\"jqbrowser.php?inw=1&url=http://www.heatweb.info/listsystems.php\">System Summary</a></li>\n\n\n\t\t\t\t\n\t\t\t\t<li data-role=\"collapsible\" data-enhanced=\"true\" data-collapsed-icon=\"carat-d\" data-expanded-icon=\"carat-u\" data-iconpos=\"right\" data-inset=\"false\" class=\"ui-collapsible ui-collapsible-themed-content ui-collapsible-collapsed\">\t\t\t\n\t\t\t\t\t<h3 class=\"ui-collapsible-heading ui-collapsible-heading-collapsed\">\n\t\t\t\t\t\t<a href=\"#\" class=\"ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d\">\n\t\t\t\t\t\t\tSystem 58: Pellet Boiler Test Rig<span class=\"ui-collapsible-heading-status\"> click to expand contents</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div class=\"ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed\" aria-hidden=\"true\">\n\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?url=systeminfo.php?id=58_a_fn=c35exploded.d.svg&\">SVG Dashboard</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a target=\"_blank\" href=\"<?php\n\t\t\t\t$urlt = \"../graphdata.php?id=58&show=Auger,Fan,Pump,Blower,tF,tR,fR,pF,kW&dday=0\";\n\t\t\t\t//$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Graph</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"analyse_pelletboiler.php?id=58\">Analysis</a></li>\n\t\t\t\t\n\t\n\t\t\t\t</ul></div></li>\n\t\n\t\n\t\t\t\t\n\t\t\t\t<li data-role=\"collapsible\" data-enhanced=\"true\" data-collapsed-icon=\"carat-d\" data-expanded-icon=\"carat-u\" data-iconpos=\"right\" data-inset=\"false\" class=\"ui-collapsible ui-collapsible-themed-content ui-collapsible-collapsed\">\t\t\t\n\t\t\t\t\t<h3 class=\"ui-collapsible-heading ui-collapsible-heading-collapsed\">\n\t\t\t\t\t\t<a href=\"#\" class=\"ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d\">\n\t\t\t\t\t\t\tSystem 50: HSF Interface<span class=\"ui-collapsible-heading-status\"> click to expand contents</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div class=\"ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed\" aria-hidden=\"true\">\n\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?inw=1&nojq=1&url=../myfiles/files/homepageether.html\">Live Dashboard</a></li>\n\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?url=systeminfo.php?id=50_a_fn=ether.message.d.svg&\">SVG Dashboard</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a href=\"<?php\n\t\t\t\t$urlt = \"jqbrowser.php?url=../graphdata.php?show=t1,t2,t3,t4,t5,t6&id=50\";\n\t\t\t\t$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Graph</a></li>\n\t\t\t\t\n\t\t\t\t\n\t\n\t\t\t\t</ul></div></li>\n\t\n\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<li data-role=\"collapsible\" data-enhanced=\"true\" data-collapsed-icon=\"carat-d\" data-expanded-icon=\"carat-u\" data-iconpos=\"right\" data-inset=\"false\" class=\"ui-collapsible ui-collapsible-themed-content ui-collapsible-collapsed\">\t\t\t\n\t\t\t\t\t<h3 class=\"ui-collapsible-heading ui-collapsible-heading-collapsed\">\n\t\t\t\t\t\t<a href=\"#\" class=\"ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d\">\n\t\t\t\t\t\t\tSystem 22: Specflue iHIU<span class=\"ui-collapsible-heading-status\"> click to expand contents</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div class=\"ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed\" aria-hidden=\"true\">\n\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?url=../systeminfo.php?id=22\">Dashboard</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a href=\"<?php\n\t\t\t\t$urlt = \"jqbrowser.php?url=../ggraphsystem.php?count=50&startat=0&\" . \"notfirst=1&every=1&B1=Refresh&id=22&fH=checked&fC=checked&tH=checked&tHm=checked&tCo=checked&gwidth=1000&gheight=600&refreshs=60\";\n\t\t\t\t$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Graph</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a href=\"<?php\n\t\t\t\t$urlt = \"jqbrowser.php?url=../rickshaw/examples/tilgraph.php?count=2000&startat=0&\" . \"notfirst=1&every=5&B1=Refresh&id=22&fH=checked&fC=checked&tH=checked&tHm=checked&tCo=checked&gwidth=1000&gheight=600&refreshs=60\";\n\t\t\t\t$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Analysis</a></li>\n\t\n\t\t\t\t</ul></div></li>\n\t\n\t\t\t\t\n\n\t\t\t\n\n\t\t\t\t\n\t\n\n\t\t\t\t\t\t\n\t\t\n\t\n\t\t\n\t\t\t\t\n\n\n\t\t    </ul>\n\t\t</div><!-- /panel -->\n\n\n\t<div data-role=\"footer\" data-position=\"fixed\" data-tap-toggle=\"false\" class=\"jqm-footer\">\n\t\t<p>Node-HIU Control System <span class=\"jqm-version\"></span></p>\n\t\t<p>Copyright 2018 Thermal Integration Ltd.</p>\n\t</div><!-- /footer -->\n\n\n\n</div><!-- /page -->\n\n</body>\n</html>\n\n\n\n\n","output":"str","x":430,"y":120,"wires":[["beab9bd2.55cd18"]]},{"id":"d35336c.c1526c8","type":"http in","z":"412080f5.8877e","name":"","url":"/ihiu/:ihiu","method":"get","upload":false,"swaggerDoc":"","x":110,"y":120,"wires":[["92dfab05.f3f0a8"]]},{"id":"beab9bd2.55cd18","type":"http response","z":"412080f5.8877e","name":"","statusCode":"","headers":{},"x":570,"y":120,"wires":[]},{"id":"7b478fe7.b6d46","type":"http in","z":"412080f5.8877e","name":"","url":"/ihiu","method":"get","upload":false,"swaggerDoc":"","x":100,"y":60,"wires":[["2f96857c.a307ca"]]},{"id":"2f96857c.a307ca","type":"template","z":"412080f5.8877e","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This is a test","output":"str","x":270,"y":60,"wires":[["8ab04160.faca3"]]},{"id":"92dfab05.f3f0a8","type":"function","z":"412080f5.8877e","name":"","func":"msg.payload=msg.req.params.ihiu;\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":120,"wires":[["8ab04160.faca3"]]}]
 
[{"id":"412080f5.8877e","type":"tab","label":"Flow 2","disabled":false},{"id":"8ab04160.faca3","type":"template","z":"412080f5.8877e","name":"jquery","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t<title>Node-HIU Control System</title>\n\t<link rel=\"shortcut icon\" href=\"http://www.heatweb.info/iHIU/jquery/demos/favicon.ico\">\n    <link rel=\"stylesheet\" href=\"http://fonts.googleapis.com/css?family=Open+Sans:300,400,700\">\n\n\n\n\t<link rel=\"stylesheet\" href=\"http://www.heatweb.info/iHIU/jquery/demos/css/themes/default/jquery.mobile-1.4.3.min.css\">\n\t<link rel=\"stylesheet\" href=\"http://www.heatweb.info/iHIU/jquery/demos/_assets/css/jqm-demos.css\">\n\t<script src=\"http://www.heatweb.info/iHIU/jquery/demos/js/jquery.js\"></script>\n\t<script src=\"http://www.heatweb.info/iHIU/jquery/demos/_assets/js/index.js\"></script>\n\t<script src=\"http://www.heatweb.info/iHIU/jquery/demos/js/jquery.mobile-1.4.3.min.js\"></script>\n\n\t\n\t<script type=\"text/javascript\">\n\tfunction updateSection2(sect,uwith)\n\t{\n\t\n\t\tdocument.getElementById(sect).innerHTML=uwith;\n\n\t}\t\n\t</script>\n\t\n\t\n\t<script type=\"text/javascript\">\n\tfunction updateSection(sect,uwith,sysid,sendv)\n\t{\n\n\t\t//alert(uwith);\n\n\t\tif (sect.length==0)\n\t\t{\n\n\t\t\treturn;\n\t\t}\n\t\tif (window.XMLHttpRequest)\n\t\t  {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t  xmlhttp=new XMLHttpRequest();\n\t\t  }\n\t\telse\n\t\t  {// code for IE6, IE5\n\t\t  xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t  }\n\t\txmlhttp.onreadystatechange=function()\n\t\t  {\n\t\t  if (xmlhttp.readyState==4 && xmlhttp.status==200)\n\t\t\t{\n\t\t\tdocument.getElementById(sect).innerHTML=xmlhttp.responseText;\n\t\t\t}\n\t\t  }\n\t\t\n\t\t\n\t\tif(sendv) { \n\t\t\n\t\t\tuwith = uwith + \"&k=\" + sendv + \"&id=\" + sysid + \"&v=\" + document.getElementById(sendv).value;\n\t\t\n\t\t}\n\t\txmlhttp.open(\"GET\",uwith,true);\n\t\txmlhttp.send();\n\t\t\n\t}\n\t</script>\t\n\n\n\t\n<style>\n.tiltable, .tiltable TD, .tiltable TH\n{\nfont-size:10pt;\n}\n</style>\t\n\t\n\t\n\t\n</head>\n<body>\n\t\n<script>\t\nfunction goSave()  {\n\tvar MyIFrame = document.getElementById(\"bframe\");\n\tvar MyIFrameDoc = (MyIFrame.contentWindow || MyIFrame.contentDocument);\n\tif (MyIFrameDoc.document) MyIFrameDoc = MyIFrameDoc.document;\n\t//MyIFrameDoc.getElementById(\"codeform\").submit();\n\tMyIFrameDoc.getElementById(\"sbutton\").click();\n}\n</script>\t\n\t\n<div data-role=\"page\" class=\"jqm-demos\" data-quicklinks=\"true\">\n\n\n\t<div data-role=\"header\" class=\"jqm-header\">\n\t\t<h2><a href=\"frontpanel.php\" title=\"Thermal Integration Limited\"><img src=\"http://heatweb.info/iHIU/jqtilogo.png\" alt=\"Thermal Integration Ltd.\"></a></h2>\n\n\t\t<a href=\"frontpanel.php\" class=\"ui-btn ui-btn-icon-notext ui-corner-all ui-icon-home ui-nodisc-icon ui-alt-icon ui-btn-right\">Home</a>\n\n\t\t<a href=\"#\" class=\"jqm-navmenu-link ui-btn ui-btn-icon-notext ui-corner-all ui-icon-bars ui-nodisc-icon ui-alt-icon ui-btn-left\">Menu</a>\n\t\t<p><?php echo $userinf; ?></p>\n\t\t\n\t\t\n\t</div><!-- /header -->\n\n\t<div role=\"main\" class=\"ui-content jqm-content\">\n\n\n\n\n{{payload}}\n\n\n\t</div><!-- /content -->\n\t<div data-role=\"panel\" class=\"jqm-navmenu-panel\" data-position=\"left\" data-display=\"overlay\" data-theme=\"a\">\n\t    \t<ul class=\"jqm-list ui-alt-icon ui-nodisc-icon\">\n\t\t\t\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"demos homepage\" data-icon=\"home\"><a href=\"web\">Home</a></li>\n\n\t\t\t\t\n\t\t\n\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"demos homepage\" data-icon=\"home\"><a href=\"jqbrowser.php?inw=1&url=http://www.heatweb.info/listsystems.php\">System Summary</a></li>\n\n\n\t\t\t\t\n\t\t\t\t<li data-role=\"collapsible\" data-enhanced=\"true\" data-collapsed-icon=\"carat-d\" data-expanded-icon=\"carat-u\" data-iconpos=\"right\" data-inset=\"false\" class=\"ui-collapsible ui-collapsible-themed-content ui-collapsible-collapsed\">\t\t\t\n\t\t\t\t\t<h3 class=\"ui-collapsible-heading ui-collapsible-heading-collapsed\">\n\t\t\t\t\t\t<a href=\"#\" class=\"ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d\">\n\t\t\t\t\t\t\tSystem 58: Pellet Boiler Test Rig<span class=\"ui-collapsible-heading-status\"> click to expand contents</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div class=\"ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed\" aria-hidden=\"true\">\n\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?url=systeminfo.php?id=58_a_fn=c35exploded.d.svg&\">SVG Dashboard</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a target=\"_blank\" href=\"<?php\n\t\t\t\t$urlt = \"../graphdata.php?id=58&show=Auger,Fan,Pump,Blower,tF,tR,fR,pF,kW&dday=0\";\n\t\t\t\t//$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Graph</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"analyse_pelletboiler.php?id=58\">Analysis</a></li>\n\t\t\t\t\n\t\n\t\t\t\t</ul></div></li>\n\t\n\t\n\t\t\t\t\n\t\t\t\t<li data-role=\"collapsible\" data-enhanced=\"true\" data-collapsed-icon=\"carat-d\" data-expanded-icon=\"carat-u\" data-iconpos=\"right\" data-inset=\"false\" class=\"ui-collapsible ui-collapsible-themed-content ui-collapsible-collapsed\">\t\t\t\n\t\t\t\t\t<h3 class=\"ui-collapsible-heading ui-collapsible-heading-collapsed\">\n\t\t\t\t\t\t<a href=\"#\" class=\"ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d\">\n\t\t\t\t\t\t\tSystem 50: HSF Interface<span class=\"ui-collapsible-heading-status\"> click to expand contents</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div class=\"ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed\" aria-hidden=\"true\">\n\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?inw=1&nojq=1&url=../myfiles/files/homepageether.html\">Live Dashboard</a></li>\n\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?url=systeminfo.php?id=50_a_fn=ether.message.d.svg&\">SVG Dashboard</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a href=\"<?php\n\t\t\t\t$urlt = \"jqbrowser.php?url=../graphdata.php?show=t1,t2,t3,t4,t5,t6&id=50\";\n\t\t\t\t$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Graph</a></li>\n\t\t\t\t\n\t\t\t\t\n\t\n\t\t\t\t</ul></div></li>\n\t\n\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<li data-role=\"collapsible\" data-enhanced=\"true\" data-collapsed-icon=\"carat-d\" data-expanded-icon=\"carat-u\" data-iconpos=\"right\" data-inset=\"false\" class=\"ui-collapsible ui-collapsible-themed-content ui-collapsible-collapsed\">\t\t\t\n\t\t\t\t\t<h3 class=\"ui-collapsible-heading ui-collapsible-heading-collapsed\">\n\t\t\t\t\t\t<a href=\"#\" class=\"ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d\">\n\t\t\t\t\t\t\tSystem 22: Specflue iHIU<span class=\"ui-collapsible-heading-status\"> click to expand contents</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div class=\"ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed\" aria-hidden=\"true\">\n\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?url=../systeminfo.php?id=22\">Dashboard</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a href=\"<?php\n\t\t\t\t$urlt = \"jqbrowser.php?url=../ggraphsystem.php?count=50&startat=0&\" . \"notfirst=1&every=1&B1=Refresh&id=22&fH=checked&fC=checked&tH=checked&tHm=checked&tCo=checked&gwidth=1000&gheight=600&refreshs=60\";\n\t\t\t\t$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Graph</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a href=\"<?php\n\t\t\t\t$urlt = \"jqbrowser.php?url=../rickshaw/examples/tilgraph.php?count=2000&startat=0&\" . \"notfirst=1&every=5&B1=Refresh&id=22&fH=checked&fC=checked&tH=checked&tHm=checked&tCo=checked&gwidth=1000&gheight=600&refreshs=60\";\n\t\t\t\t$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Analysis</a></li>\n\t\n\t\t\t\t</ul></div></li>\n\t\n\t\t\t\t\n\n\t\t\t\n\n\t\t\t\t\n\t\n\n\t\t\t\t\t\t\n\t\t\n\t\n\t\t\n\t\t\t\t\n\n\n\t\t    </ul>\n\t\t</div><!-- /panel -->\n\n\n\t<div data-role=\"footer\" data-position=\"fixed\" data-tap-toggle=\"false\" class=\"jqm-footer\">\n\t\t<p>Node-HIU Control System <span class=\"jqm-version\"></span></p>\n\t\t<p>Copyright 2018 Thermal Integration Ltd.</p>\n\t</div><!-- /footer -->\n\n\n\n</div><!-- /page -->\n\n</body>\n</html>\n\n\n\n\n","output":"str","x":430,"y":120,"wires":[["beab9bd2.55cd18"]]},{"id":"d35336c.c1526c8","type":"http in","z":"412080f5.8877e","name":"","url":"/ihiu/:ihiu","method":"get","upload":false,"swaggerDoc":"","x":110,"y":120,"wires":[["92dfab05.f3f0a8"]]},{"id":"beab9bd2.55cd18","type":"http response","z":"412080f5.8877e","name":"","statusCode":"","headers":{},"x":570,"y":120,"wires":[]},{"id":"7b478fe7.b6d46","type":"http in","z":"412080f5.8877e","name":"","url":"/ihiu","method":"get","upload":false,"swaggerDoc":"","x":100,"y":60,"wires":[["2f96857c.a307ca"]]},{"id":"2f96857c.a307ca","type":"template","z":"412080f5.8877e","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This is a test","output":"str","x":270,"y":60,"wires":[["8ab04160.faca3"]]},{"id":"92dfab05.f3f0a8","type":"function","z":"412080f5.8877e","name":"","func":"msg.payload=msg.req.params.ihiu;\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":120,"wires":[["8ab04160.faca3"]]}]
 +
</pre>
 +
 +
==Spreadsheet Communications==
 +
 +
===Mail Interface===
 +
 +
<pre>
 +
[{"id":"abc0a55e.ede908","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"7b78737b.decaf4","type":"excel","z":"abc0a55e.ede908","name":"","file":"/home/pi/report.xlsx","x":990,"y":180,"wires":[["964fcbb8.92895"]]},{"id":"d84b4c4a.0a0638","type":"book","z":"abc0a55e.ede908","name":"","x":510,"y":940,"wires":[["c4ee60be.45171"]]},{"id":"c4ee60be.45171","type":"sheet","z":"abc0a55e.ede908","name":"","sheetName":"B4","x":630,"y":940,"wires":[["23f881a9.7f3ab6"]]},{"id":"23f881a9.7f3ab6","type":"sheet-to-json","z":"abc0a55e.ede908","name":"","raw":"false","range":"A1:BA74","header":"default","blankrows":false,"x":770,"y":940,"wires":[["118c9657.56af02"]]},{"id":"4a35d603.c3fe3","type":"file in","z":"abc0a55e.ede908","name":"","filename":"/home/pi/b4.xlsx","format":"","chunk":false,"sendError":false,"x":340,"y":940,"wires":[["d84b4c4a.0a0638","7170bd15.ae6314"]]},{"id":"e9c8659e.468e28","type":"inject","z":"abc0a55e.ede908","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":940,"wires":[["4a35d603.c3fe3"]]},{"id":"118c9657.56af02","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":990,"y":940,"wires":[]},{"id":"d10d3ac6.d8d2f8","type":"file in","z":"abc0a55e.ede908","name":"","filename":"/home/pi/b6.xlsx","format":"","chunk":false,"sendError":false,"x":340,"y":1000,"wires":[["b925deb.5468a2","7170bd15.ae6314"]]},{"id":"9f61feb1.bd33f","type":"inject","z":"abc0a55e.ede908","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":1000,"wires":[["d10d3ac6.d8d2f8"]]},{"id":"b925deb.5468a2","type":"book","z":"abc0a55e.ede908","name":"B6","x":510,"y":1000,"wires":[["5db5583c.7ddf4"]]},{"id":"5db5583c.7ddf4","type":"sheet","z":"abc0a55e.ede908","name":"B6","sheetName":"B6","x":630,"y":1000,"wires":[["a7475fb5.bc6858"]]},{"id":"a7475fb5.bc6858","type":"sheet-to-json","z":"abc0a55e.ede908","name":"","raw":"false","range":"A1:BA92","header":"default","blankrows":false,"x":790,"y":1000,"wires":[["118c9657.56af02"]]},{"id":"7170bd15.ae6314","type":"mqtt out","z":"abc0a55e.ede908","name":"","topic":"ihiu/global/global/set/properties.xlsx","qos":"0","retain":"false","broker":"8024f18.2ce709","x":760,"y":820,"wires":[]},{"id":"80ef4895.dfd8f","type":"mqtt in","z":"abc0a55e.ede908","name":"","topic":"ihiu/+/global/json/report","qos":"2","broker":"8024f18.2ce709","x":280,"y":180,"wires":[["197e9cf6.3c9afb"]]},{"id":"26bfbd74.08b4f2","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":810,"y":280,"wires":[]},{"id":"7b09a89e.f67fe8","type":"json","z":"abc0a55e.ede908","name":"","property":"payload","action":"obj","pretty":false,"x":690,"y":180,"wires":[["26bfbd74.08b4f2","433715bd.af6674"]]},{"id":"433715bd.af6674","type":"function","z":"abc0a55e.ede908","name":"","func":"outA = [];\n\nfor (var dev in msg.payload) {\n    \n    \n    var lout = {};\n    \n    if (dev.length == 16) {\n\n        lout[\"plotNo\"] = msg.payload[dev][\"system\"][\"plotNo\"];\n        lout[\"Serial\"] = dev;\n        lout[\"state\"] = msg.payload[dev][\"stat\"][\"state\"];\n        \n        for (var group in msg.payload[dev]) {\n            \n            for (var key in msg.payload[dev][group]) {\n            \n                lout[key] = msg.payload[dev][group][key];\n            \n            }\n            \n        }\n        \n        outA.push(lout)\n    }\n}\n\nmsg.payload = outA;\nreturn msg;","outputs":1,"noerr":0,"x":850,"y":180,"wires":[["7b78737b.decaf4","d1a9d900.79923"]]},{"id":"d1a9d900.79923","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1000,"y":240,"wires":[]},{"id":"5e141895.ff5238","type":"mqtt out","z":"abc0a55e.ede908","name":"","topic":"ihiu/global/global/cmd/report","qos":"2","retain":"false","broker":"8024f18.2ce709","x":520,"y":260,"wires":[]},{"id":"ff69fb43.684b1","type":"inject","z":"abc0a55e.ede908","name":"REPORT","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":260,"wires":[["5e141895.ff5238"]]},{"id":"d6a73148.b678a8","type":"link out","z":"abc0a55e.ede908","name":"","links":["a467afe3.1dda9"],"x":1255,"y":180,"wires":[]},{"id":"964fcbb8.92895","type":"function","z":"abc0a55e.ede908","name":"attach","func":"msg.payload=\"Data from Clapham Park \" + msg.topic.split(\"/\")[1];\nmsg.topic=\"Data from Clapham Park \"+ msg.topic.split(\"/\")[1];\nmsg.attachments = [{  // utf-8 string as an attachment \n            filename: 'report.xlsx',\n            path: '/home/pi/report.xlsx',\n            content: msg.xwordHTML\n        }];\n\nmsg.to=flow.get(\"email\") || \"admin@heatweb.com\";\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":1130,"y":180,"wires":[["d6a73148.b678a8"]]},{"id":"197e9cf6.3c9afb","type":"delay","z":"abc0a55e.ede908","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":520,"y":180,"wires":[["7b09a89e.f67fe8"]]},{"id":"60d691ce.bd6d2","type":"switch","z":"abc0a55e.ede908","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"RE:","vt":"str"},{"t":"eq","v":"REPORT","vt":"str"},{"t":"cont","v":"TRACKER","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":490,"y":500,"wires":[[],["afe136dd.7534e8"],["e4d9476f.9c0528","77661693.9ccbb"]]},{"id":"e42b8d7c.a3d7c8","type":"split","z":"abc0a55e.ede908","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":290,"y":600,"wires":[["46c6d3c9.eceb34"]]},{"id":"46c6d3c9.eceb34","type":"switch","z":"abc0a55e.ede908","name":"","property":"payload.fileName","propertyType":"msg","rules":[{"t":"nnull"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":430,"y":600,"wires":[["308dbec9.fbbdb2"],["9643cfbc.6d972"]]},{"id":"e4d9476f.9c0528","type":"function","z":"abc0a55e.ede908","name":"","func":"var topic = msg.topic;\nvar from = msg.from;\nmsg.body = msg.html;\n\nmsg.payload = msg.attachments;\n\nmsg.subject=topic;\nmsg.from=from;\n\nreturn msg;","outputs":1,"noerr":0,"x":150,"y":600,"wires":[["e42b8d7c.a3d7c8"]]},{"id":"3dc348c.dca5738","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"console":"false","complete":"false","x":470,"y":420,"wires":[]},{"id":"308dbec9.fbbdb2","type":"change","z":"abc0a55e.ede908","name":"","rules":[{"t":"set","p":"subject","pt":"msg","to":"topic","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"payload.fileName","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload.content","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":580,"wires":[["c557e2b.0728d2"]]},{"id":"9643cfbc.6d972","type":"change","z":"abc0a55e.ede908","name":"","rules":[{"t":"set","p":"subject","pt":"msg","to":"topic","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"payload.filename","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload.content","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":620,"wires":[["c557e2b.0728d2"]]},{"id":"d229dd07.49e388","type":"e-mail in","z":"abc0a55e.ede908","name":"","protocol":"IMAP","server":"imap.ionos.co.uk","useSSL":true,"port":"993","box":"INBOX","disposition":"Read","repeat":"15","x":210,"y":380,"wires":[["3e4bcd36.fa5ef2","df3620ed.b06ad"]]},{"id":"c557e2b.0728d2","type":"join","z":"abc0a55e.ede908","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"1","x":150,"y":760,"wires":[["bc512225.6b7c48","97f00aeb.ec4008"]]},{"id":"bc512225.6b7c48","type":"switch","z":"abc0a55e.ede908","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":".xls","vt":"str"},{"t":"cont","v":".XLS","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":350,"y":760,"wires":[["8cfcf459.5ff0b"],["8cfcf459.5ff0b"]]},{"id":"97f00aeb.ec4008","type":"debug","z":"abc0a55e.ede908","name":"","active":false,"console":"false","complete":"false","x":350,"y":800,"wires":[]},{"id":"8cfcf459.5ff0b","type":"function","z":"abc0a55e.ede908","name":"","func":"//msg.from = msg.subject.split(\"from \")[1].replace(/\\s/g, '');\n\nmsg.filename=\"/home/pi/node-hiu/xlsx/\" + msg.topic;\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":760,"wires":[["7ac05e34.268eb","b1952aa0.509128"]]},{"id":"7ac05e34.268eb","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"console":"false","complete":"false","x":630,"y":720,"wires":[]},{"id":"b1952aa0.509128","type":"delay","z":"abc0a55e.ede908","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":700,"y":760,"wires":[["77661693.9ccbb","7170bd15.ae6314","782d0e18.35b54"]]},{"id":"f17db2cd.bd737","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1030,"y":480,"wires":[]},{"id":"3e4bcd36.fa5ef2","type":"function","z":"abc0a55e.ede908","name":"","func":"msg.payload = msg;\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":380,"wires":[["3dc348c.dca5738"]]},{"id":"a271552e.8e7f2","type":"switch","z":"abc0a55e.ede908","name":"","property":"from","propertyType":"msg","rules":[{"t":"eq","v":"pp@heatweb.com","vt":"str"},{"t":"cont","v":"@ihiupower.","vt":"str"},{"t":"cont","v":"@heatweb.","vt":"str"},{"t":"cont","v":"@thermal","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":290,"y":480,"wires":[[],["60d691ce.bd6d2"],["60d691ce.bd6d2"],["60d691ce.bd6d2"]]},{"id":"afe136dd.7534e8","type":"change","z":"abc0a55e.ede908","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"from","tot":"msg"},{"t":"set","p":"email","pt":"flow","to":"from","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":480,"wires":[["5e141895.ff5238","f17db2cd.bd737"]]},{"id":"bb2607cf.62889","type":"inject","z":"abc0a55e.ede908","name":"","topic":"","payload":"admin@heatweb.com","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":200,"y":80,"wires":[["53bf84e0.097dd4"]]},{"id":"53bf84e0.097dd4","type":"change","z":"abc0a55e.ede908","name":"","rules":[{"t":"set","p":"email","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":80,"wires":[[]]},{"id":"df3620ed.b06ad","type":"function","z":"abc0a55e.ede908","name":"","func":"msg.topic = msg.topic.toUpperCase();\nreturn msg;","outputs":1,"noerr":0,"x":150,"y":480,"wires":[["a271552e.8e7f2"]]},{"id":"77661693.9ccbb","type":"trigger","z":"abc0a55e.ede908","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"20","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":830,"y":540,"wires":[["afe136dd.7534e8"]]},{"id":"782d0e18.35b54","type":"file","z":"abc0a55e.ede908","name":"","filename":"","appendNewline":true,"createDir":true,"overwriteFile":"false","x":910,"y":760,"wires":[[]]},{"id":"8024f18.2ce709","type":"mqtt-broker","z":"abc0a55e.ede908","name":"ihiu","broker":"mymqtt.heatweb.com","port":"10031","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
 
</pre>
 
</pre>
  

Latest revision as of 16:20, 13 September 2019

Node-HIU Flows for Node-RED

Setup Flow

[{"id":"680e28b2.739018","type":"tab","label":"Setup","disabled":false,"info":""},{"id":"cafa3581.4da6e8","type":"inject","z":"680e28b2.739018","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":191,"y":140,"wires":[["347ff8ed.00a4c8"]]},{"id":"347ff8ed.00a4c8","type":"function","z":"680e28b2.739018","name":"renew id","func":"\n\nvar macA = \"node-hiu-m8\"; //substr($opdata, $mac+13, 17);\nvar newname = \"Eiqua8EP\"; //substr($opdata, $mac+13, 17);\n\t\t\t\n\t\t\n\t\t\t\nmsg.url = \"http://www.heatweb.info/registerihiu.php?mac=\"+ macA + \"&name=\" + newname;\n\n\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":140,"wires":[["2ec2b280.cb531e"]]},{"id":"2ec2b280.cb531e","type":"http request","z":"680e28b2.739018","name":"","method":"GET","ret":"txt","url":"","tls":"","x":550,"y":140,"wires":[["826b1671.e7eea8"]]},{"id":"709465ff.5929ac","type":"debug","z":"680e28b2.739018","name":"","active":true,"console":"false","complete":"false","x":1018,"y":140,"wires":[]},{"id":"826b1671.e7eea8","type":"switch","z":"680e28b2.739018","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"status=ok","vt":"str"}],"checkall":"true","outputs":1,"x":693,"y":140,"wires":[["111d01ed.87c40e"]]},{"id":"111d01ed.87c40e","type":"function","z":"680e28b2.739018","name":"","func":"\n\nmsg.payload = msg.payload.split(\"&id=\")[1].split(\"&\")[0];\n\nglobal.set(\"settings.SYSid\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"x":829,"y":140,"wires":[["709465ff.5929ac","c0eb1891.5b9ae8","47f66a0e.ad1864","a6aaecca.1cc4d"]]},{"id":"c0eb1891.5b9ae8","type":"link out","z":"680e28b2.739018","name":"","links":["9975d6e1.a47a18","639fcdc4.76f8c4"],"x":955,"y":200,"wires":[]},{"id":"a7e05542.ca2138","type":"link in","z":"680e28b2.739018","name":"getSYSid","links":[],"x":235,"y":200,"wires":[["347ff8ed.00a4c8"]]},{"id":"edeeb95a.b94e38","type":"inject","z":"680e28b2.739018","name":"","topic":"","payload":"settings.SYSid","payloadType":"global","repeat":"","crontab":"","once":false,"x":240,"y":60,"wires":[["a4be24d4.fa0608"]]},{"id":"a4be24d4.fa0608","type":"debug","z":"680e28b2.739018","name":"","active":true,"console":"false","complete":"false","x":470,"y":60,"wires":[]},{"id":"47f66a0e.ad1864","type":"ui_text_input","z":"680e28b2.739018","name":"","label":"Heatweb ID","group":"3284d68d.e0d48a","order":3,"width":"5","height":"1","passthru":true,"mode":"text","delay":300,"topic":"SYSid","x":630,"y":280,"wires":[["a6aaecca.1cc4d"]]},{"id":"ad30355b.441f38","type":"ui_text_input","z":"680e28b2.739018","name":"","label":"Flow Version","group":"3284d68d.e0d48a","order":9,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"flow","x":630,"y":500,"wires":[["bddbee98.06142"]]},{"id":"81e54231.b506a","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"settings.flow","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":500,"wires":[["ad30355b.441f38"]]},{"id":"22efd43a.86eb8c","type":"ui_text_input","z":"680e28b2.739018","name":"","label":"Node ID","group":"3284d68d.e0d48a","order":1,"width":"5","height":"1","passthru":true,"mode":"text","delay":300,"topic":"node","x":700,"y":420,"wires":[["f5e3160e.61fc38"]]},{"id":"89bb243b.715608","type":"ui_switch","z":"680e28b2.739018","name":"heatweb","label":"Log to heatweb.info","group":"3284d68d.e0d48a","order":5,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"logtoheatweb","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":620,"y":560,"wires":[["e3eb0de5.134e5"]]},{"id":"87e49862.da07a8","type":"ui_switch","z":"680e28b2.739018","name":"Log","label":"Log all data to SD Card","group":"3284d68d.e0d48a","order":6,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"logtosd","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":608.6633911132812,"y":618.25,"wires":[["d0092941.324cf8"]]},{"id":"1ac77157.7c9c2f","type":"ui_switch","z":"680e28b2.739018","name":"Pool","label":"Pool Diversity Data","group":"3284d68d.e0d48a","order":7,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"logtopool","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":610,"y":680,"wires":[["d7efc173.f62db"]]},{"id":"a7f3e716.0c9ed8","type":"ui_text_input","z":"680e28b2.739018","name":"","label":"Property Type","group":"3284d68d.e0d48a","order":8,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"ptype","x":640,"y":740,"wires":[["246593ab.23ebec"]]},{"id":"11f43b58.9c9295","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"2bed","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":740,"wires":[["a7f3e716.0c9ed8"]]},{"id":"fb633571.9cb9e8","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":680,"wires":[["1ac77157.7c9c2f"]]},{"id":"46c9b955.76b878","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":620,"wires":[["87e49862.da07a8"]]},{"id":"ffdf62cd.1b018","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":560,"wires":[["89bb243b.715608"]]},{"id":"75aacef.114fb3","type":"ui_button","z":"680e28b2.739018","name":"","group":"3284d68d.e0d48a","order":4,"width":"1","height":"1","passthru":false,"label":"New","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":210,"y":260,"wires":[["347ff8ed.00a4c8"]]},{"id":"f16b300b.65f8e","type":"file","z":"680e28b2.739018","name":"","filename":"","appendNewline":false,"createDir":true,"overwriteFile":"true","x":1030,"y":1040,"wires":[]},{"id":"a2c5867.4f1f878","type":"debug","z":"680e28b2.739018","name":"","active":true,"console":"false","complete":"false","x":790,"y":1180,"wires":[]},{"id":"bddbee98.06142","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"settings.flow","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":860,"y":500,"wires":[[]]},{"id":"eddc1839.595128","type":"inject","z":"680e28b2.739018","name":"BOOT","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":130,"y":360,"wires":[["16f608d2.4243c7"]]},{"id":"e3eb0de5.134e5","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"settings.logtoheatweb","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":560,"wires":[[]]},{"id":"d0092941.324cf8","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"settings.logtosd","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":620,"wires":[[]]},{"id":"d7efc173.f62db","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"settings.logtopool","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":680,"wires":[[]]},{"id":"246593ab.23ebec","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"settings.ptype","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":740,"wires":[[]]},{"id":"e289f72d.e35938","type":"trigger","z":"680e28b2.739018","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"5","extend":false,"units":"s","reset":"","name":"","x":160,"y":500,"wires":[["81e54231.b506a","ffdf62cd.1b018","46c9b955.76b878","fb633571.9cb9e8","11f43b58.9c9295","7444523.ebbc1ac"]]},{"id":"f5e3160e.61fc38","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"settings.node","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":930,"y":420,"wires":[[]]},{"id":"a6aaecca.1cc4d","type":"change","z":"680e28b2.739018","name":"","rules":[{"t":"set","p":"settings.SYSid","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":280,"wires":[[]]},{"id":"b97581f1.aaf1b","type":"function","z":"680e28b2.739018","name":"Save Global","func":"msg = {};\nmsg.payload = global.get(\"settings\");\n\n//if (msg.payload.tempid==\"startup\") { return null; }\n\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":860,"wires":[["fbd552df.939df","f4be3fd8.b885a"]]},{"id":"fbd552df.939df","type":"json","z":"680e28b2.739018","name":"","x":471.00006103515625,"y":861,"wires":[["318f7800.adee38"]]},{"id":"35ff4458.0aa18c","type":"file","z":"680e28b2.739018","name":"nodered_settings.json","filename":"","appendNewline":true,"createDir":true,"overwriteFile":"true","x":840,"y":840,"wires":[]},{"id":"318f7800.adee38","type":"function","z":"680e28b2.739018","name":"file","func":"msg.filename=\"/home/pi/node-hiu/logs/nodered_settings.json\";\n\nmsg2={};\nmsg2.filename=\"/home/pi/node-hiu/logs/nodered_id.txt\";\nmsg2.payload=global.get(\"settings.node\");\n\nreturn [msg,msg2];","outputs":"2","noerr":0,"x":610,"y":860,"wires":[["35ff4458.0aa18c"],["714e9f91.a0661","f84edd24.5692b"]]},{"id":"298a4352.a2559c","type":"ui_button","z":"680e28b2.739018","name":"","group":"3284d68d.e0d48a","order":10,"width":"6","height":"1","passthru":false,"label":"Next","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":150,"y":860,"wires":[["b97581f1.aaf1b"]]},{"id":"f4be3fd8.b885a","type":"debug","z":"680e28b2.739018","name":"","active":true,"console":"false","complete":"false","x":490,"y":820,"wires":[]},{"id":"16f608d2.4243c7","type":"function","z":"680e28b2.739018","name":"initialise","func":"\nglobal.set(\"original\", \"test\" + \"system1\");\n\nvar defset = {};\ndefset.tempid=\"startup\";\ndefset.logtosd=false;\ndefset.logtoheatweb=true;\ndefset.logtopool=true;\ndefset.ptype=\"2bed\";\ndefset.node=\"testsystem1\";\ndefset.flow=\"flows_ihiu_m8\";\ndefset.SYSid=\"testsystem1\";\nglobal.set(\"settings\",defset);\n\nreturn msg;","outputs":"1","noerr":0,"x":140,"y":420,"wires":[["e289f72d.e35938"]]},{"id":"3319454c.c5751a","type":"function","z":"680e28b2.739018","name":"","func":"msg.url = \"http://heatweb.info/updatefiles/\" + global.get(\"settings.flow\") + \".json\";\nmsg.filename = \"/home/pi/node-hiu/flows/\" + global.get(\"settings.flow\") + \".json\";\n\nmsg.payload=\"wget --output-document=\" + msg.filename + \" \" + msg.url;\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":1060,"wires":[["4094a8cf.b57cc8"]]},{"id":"714e9f91.a0661","type":"trigger","z":"680e28b2.739018","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1","extend":false,"units":"s","reset":"","name":"","x":300,"y":1060,"wires":[["3319454c.c5751a"]]},{"id":"df908ade.5e8f28","type":"switch","z":"680e28b2.739018","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"original","vt":"global"}],"checkall":"true","outputs":1,"x":870,"y":1040,"wires":[["f16b300b.65f8e","d9895dbd.45f47"]]},{"id":"99f23917.5258d8","type":"ui_button","z":"680e28b2.739018","name":"","group":"3284d68d.e0d48a","order":2,"width":"1","height":"1","passthru":false,"label":"New","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":330,"y":340,"wires":[["7444523.ebbc1ac"]]},{"id":"7444523.ebbc1ac","type":"exec","z":"680e28b2.739018","command":"pwgen","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":490,"y":340,"wires":[["22efd43a.86eb8c","f5e3160e.61fc38","47f66a0e.ad1864","a6aaecca.1cc4d"],[],[]]},{"id":"f84edd24.5692b","type":"file","z":"680e28b2.739018","name":"nodered_id.txt","filename":"","appendNewline":true,"createDir":true,"overwriteFile":"true","x":820,"y":900,"wires":[]},{"id":"d9895dbd.45f47","type":"trigger","z":"680e28b2.739018","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"3","extend":false,"units":"s","reset":"","name":"","x":440,"y":1260,"wires":[["6dd70cf3.4e02c4"]]},{"id":"4094a8cf.b57cc8","type":"exec","z":"680e28b2.739018","command":"","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"UPDATE","x":560,"y":1060,"wires":[["fa956c68.46749"],[],[]]},{"id":"fa956c68.46749","type":"file in","z":"680e28b2.739018","name":"","filename":"","format":"utf8","chunk":false,"sendError":false,"x":710,"y":1040,"wires":[["df908ade.5e8f28"]]},{"id":"5207db5f.b98f64","type":"inject","z":"680e28b2.739018","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":121,"y":921,"wires":[["b97581f1.aaf1b"]]},{"id":"6dd70cf3.4e02c4","type":"function","z":"680e28b2.739018","name":"","func":"msg.payload=\"sed -i -e 's/test\"+\"system1/\"+global.get(\"settings.node\").replace(/\\s/g, '')+\"/g' /home/pi/node-hiu/flows/flows_ihiu_m8.json\";\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":1260,"wires":[["a2c5867.4f1f878","4c4eda84.0b6004","25391a10.a9a496"]]},{"id":"92d568d8.8fc368","type":"exec","z":"680e28b2.739018","command":"sudo bash /home/pi/node-hiu/temp.sh","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"UPDATE","x":920,"y":1300,"wires":[["75f35d53.f76564"],[],[]]},{"id":"25391a10.a9a496","type":"trigger","z":"680e28b2.739018","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"3","extend":false,"units":"s","reset":"","name":"","x":780,"y":1300,"wires":[["92d568d8.8fc368"]]},{"id":"75f35d53.f76564","type":"exec","z":"680e28b2.739018","command":"sudo reboot","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"REBOOT","x":1100,"y":1280,"wires":[[],[],[]]},{"id":"4c4eda84.0b6004","type":"file","z":"680e28b2.739018","name":"","filename":"/home/pi/node-hiu/temp.sh","appendNewline":true,"createDir":true,"overwriteFile":"true","x":840,"y":1240,"wires":[]},{"id":"198334cc.ed2c8b","type":"inject","z":"680e28b2.739018","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":360,"y":1380,"wires":[["89e5d973.4958e8"]]},{"id":"89e5d973.4958e8","type":"file in","z":"680e28b2.739018","name":"","filename":"/home/pi/node-hiu/temp.sh","format":"utf8","chunk":false,"sendError":false,"x":580,"y":1380,"wires":[["4e7a3a6f.48fb74"]]},{"id":"4e7a3a6f.48fb74","type":"debug","z":"680e28b2.739018","name":"","active":true,"console":"false","complete":"false","x":790,"y":1380,"wires":[]},{"id":"3284d68d.e0d48a","type":"ui_group","z":"","name":"Settings","tab":"c58b9657.ab9e68","disp":true,"width":"6"},{"id":"c58b9657.ab9e68","type":"ui_tab","z":"","name":"Setup","icon":"dashboard"}]

Read Only File System

[{"id":"e17dbf8.155184","type":"tab","label":"Read Only","disabled":false,"info":""},{"id":"ddfbafc4.e170f8","type":"inject","z":"e17dbf8.155184","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":180,"y":100,"wires":[["e51e5550.6ca3f"]]},{"id":"e51e5550.6ca3f","type":"exec","z":"e17dbf8.155184","command":"sudo bash /home/pi/read-only-fs-node-hiu.sh","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":450,"y":100,"wires":[["65cdf1bf.4af3d8"],["fd03a4fe.28d9a"],["b6109c96.be2ce8"]]},{"id":"65cdf1bf.4af3d8","type":"debug","z":"e17dbf8.155184","name":"","active":true,"console":"false","complete":"false","x":790,"y":60,"wires":[]},{"id":"fd03a4fe.28d9a","type":"debug","z":"e17dbf8.155184","name":"","active":true,"console":"false","complete":"false","x":790,"y":120,"wires":[]},{"id":"b6109c96.be2ce8","type":"debug","z":"e17dbf8.155184","name":"","active":true,"console":"false","complete":"false","x":790,"y":160,"wires":[]}]


Pi-Juice

[{"id":"22f5f5d2.759daa","type":"tab","label":"pi-juice","disabled":false,"info":""},{"id":"a92c47aa.2b5238","type":"inject","z":"22f5f5d2.759daa","name":"","topic":"","payload":"","payloadType":"date","repeat":"300","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":120,"wires":[["4bc83c9a.4dab6c","5e92a183.046348"]]},{"id":"4bc83c9a.4dab6c","type":"template","z":"22f5f5d2.759daa","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"#!/usr/bin/python3\nfrom pijuice import PiJuice # Import pijuice module\npijuice = PiJuice(1, 0x14) # Instantiate PiJuice interface object\nprint (pijuice.status.GetStatus()) # Read PiJuice status.\nprint (pijuice.status.GetChargeLevel())\n","output":"str","x":320,"y":120,"wires":[["1ee1b488.28f7c3"]]},{"id":"1ee1b488.28f7c3","type":"file","z":"22f5f5d2.759daa","name":"","filename":"/home/pi/pij.py","appendNewline":false,"createDir":false,"overwriteFile":"true","x":540,"y":120,"wires":[[]]},{"id":"5e92a183.046348","type":"trigger","z":"22f5f5d2.759daa","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1000","extend":false,"units":"ms","reset":"","bytopic":"all","name":"","x":340,"y":220,"wires":[["2c891e89.6c7b9a"]]},{"id":"2c891e89.6c7b9a","type":"exec","z":"22f5f5d2.759daa","command":"python3 /home/pi/pij.py","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":590,"y":220,"wires":[["f49a2fef.49b1f","c2bfd227.a0ace"],[],[]]},{"id":"f49a2fef.49b1f","type":"debug","z":"22f5f5d2.759daa","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":850,"y":220,"wires":[]},{"id":"318fd5a5.30e402","type":"json","z":"22f5f5d2.759daa","name":"","property":"payload","action":"","pretty":false,"x":500,"y":340,"wires":[["eedae39b.e16f5"]]},{"id":"38b25446.813e54","type":"debug","z":"22f5f5d2.759daa","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":850,"y":420,"wires":[]},{"id":"c2bfd227.a0ace","type":"change","z":"22f5f5d2.759daa","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"'","fromt":"str","to":"\"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"False","fromt":"str","to":"false","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"True","fromt":"str","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":340,"wires":[["318fd5a5.30e402"]]},{"id":"eedae39b.e16f5","type":"switch","z":"22f5f5d2.759daa","name":"","property":"payload.data.battery","propertyType":"msg","rules":[{"t":"nnull"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":170,"y":440,"wires":[["b72af8b9.6623e"],["c362d9f3.800428"]]},{"id":"95c8889a.8cfe","type":"debug","z":"22f5f5d2.759daa","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":610,"y":520,"wires":[]},{"id":"b72af8b9.6623e","type":"change","z":"22f5f5d2.759daa","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.data","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":420,"wires":[["42233ce8.fc0a24"]]},{"id":"c362d9f3.800428","type":"change","z":"22f5f5d2.759daa","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.data","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"batteryLevel","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":480,"wires":[["95c8889a.8cfe","2d22aee9.18c82a","36161b1a.bdbfcc","2868c995.d66eee"]]},{"id":"42233ce8.fc0a24","type":"split","z":"22f5f5d2.759daa","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":570,"y":420,"wires":[["38b25446.813e54","2868c995.d66eee"]]},{"id":"2d22aee9.18c82a","type":"ui_gauge","z":"22f5f5d2.759daa","name":"","group":"6d2ed03a.5130b","order":0,"width":0,"height":0,"gtype":"gage","title":"Battery Level","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#ff0000","#e6e600","#00ff00"],"seg1":"","seg2":"","x":610,"y":560,"wires":[]},{"id":"36161b1a.bdbfcc","type":"ui_chart","z":"22f5f5d2.759daa","name":"","group":"6d2ed03a.5130b","order":0,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":590,"y":600,"wires":[[],[]]},{"id":"cfd3a7f3.4633e","type":"function","z":"22f5f5d2.759daa","name":"load","func":"\nmsg.node = \"batterytest\";\n\nvar urlstr = \"node=\" + msg.node + \"&id=\" + msg.node + \"&batteryLevel=\" + flow.get(\"readings.batteryLevel\");\n\nmsg.payload = urlstr;\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":760,"wires":[["41fcfc30.5348dc","4bc8c403.e9ea54"]]},{"id":"808f49d2.d6cd","type":"debug","z":"22f5f5d2.759daa","name":"","active":true,"console":"false","complete":"false","x":650,"y":840,"wires":[]},{"id":"d81f0f54.ff1548","type":"http request","z":"22f5f5d2.759daa","name":"","method":"POST","ret":"txt","url":"","tls":"","x":490,"y":840,"wires":[["808f49d2.d6cd"]]},{"id":"4bc8c403.e9ea54","type":"function","z":"22f5f5d2.759daa","name":"linknr","func":"\n\nmsg.url=\"http://heatweb.info/linknr.php\";\n\nvar strin = msg.payload;\nvar id = msg.id;\n\nmsg.payload = {};\n\n\n\nmsg.payload.data = strin;\nmsg.payload.author = \"batterytest\";\nmsg.payload.id= id;\n\nvar today = new Date();\nvar ttt = parseInt(today.getTime()/1000);\n//var ttt = parseInt(today.getTime());\nmsg.payload.time = ttt;\n\nmsg.payload.data += \"&time=\" + ttt;\n\n\nmsg.headers = {'content-type':'application/x-www-form-urlencoded'};\n \nreturn msg;","outputs":1,"noerr":0,"x":330,"y":840,"wires":[["d81f0f54.ff1548"]]},{"id":"41fcfc30.5348dc","type":"debug","z":"22f5f5d2.759daa","name":"","active":true,"console":"false","complete":"false","x":810,"y":760,"wires":[]},{"id":"2868c995.d66eee","type":"function","z":"22f5f5d2.759daa","name":"","func":"flow.set(\"readings.\" + msg.topic, msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":850,"y":480,"wires":[["5d461f4f.f936f"]]},{"id":"5d461f4f.f936f","type":"trigger","z":"22f5f5d2.759daa","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":820,"y":660,"wires":[["cfd3a7f3.4633e"]]},{"id":"4d29a329.65c8f4","type":"inject","z":"22f5f5d2.759daa","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":1060,"y":120,"wires":[["4f2028c1.ba4df8","1821366f.f316e2"]]},{"id":"4f2028c1.ba4df8","type":"template","z":"22f5f5d2.759daa","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"#!/usr/bin/python3\nfrom pijuice import PiJuice # Import pijuice module\npijuice = PiJuice(1, 0x14) # Instantiate PiJuice interface object\nprint (pijuice.status.GetIoAnalogInput(1))","output":"str","x":1240,"y":120,"wires":[["4687a79.9902458"]]},{"id":"4687a79.9902458","type":"file","z":"22f5f5d2.759daa","name":"","filename":"/home/pi/pij.py","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1460,"y":120,"wires":[[]]},{"id":"1821366f.f316e2","type":"trigger","z":"22f5f5d2.759daa","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1000","extend":false,"units":"ms","reset":"","bytopic":"all","name":"","x":1260,"y":220,"wires":[["4ac005f3.87bf94"]]},{"id":"4ac005f3.87bf94","type":"exec","z":"22f5f5d2.759daa","command":"python3 /home/pi/pij.py","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":1510,"y":220,"wires":[["68a74d8c.0b6084"],[],[]]},{"id":"68a74d8c.0b6084","type":"debug","z":"22f5f5d2.759daa","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1770,"y":220,"wires":[]},{"id":"d871c5e8.164768","type":"comment","z":"22f5f5d2.759daa","name":"notes","info":"battery guide  https://static.rapidonline.com/pdf/567826_v1.pdf\n\nhardware https://github.com/PiSupply/PiJuice/tree/master/Hardware\n\nsoftware https://github.com/PiSupply/PiJuice/tree/master/Software","x":110,"y":40,"wires":[]},{"id":"6d2ed03a.5130b","type":"ui_group","z":"","name":"Default","tab":"790d858f.0e5e3c","disp":false,"width":"6","collapse":false},{"id":"790d858f.0e5e3c","type":"ui_tab","z":"","name":"Power","icon":"battery_charging_50"}]


LoRaWAN

[{"id":"7fdb9ed3.bdb82","type":"tab","label":"LoRa","disabled":false,"info":""},{"id":"eae0a026.672558","type":"template","z":"7fdb9ed3.bdb82","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"#!/usr/bin/env python3\nfrom rak811 import Mode, Rak811\nimport time\n\nlora = Rak811()\nlora.hard_reset()\nlora.mode = Mode.LoRaWan\nlora.band = 'EU868'\nlora.set_config(dev_eui='{{{topic}}}',\napp_eui='1234567890123456',\napp_key='12345678901234561234567890123456')\nlora.join_otaa()\nlora.dr = 5\n{{{payload}}}\nprint('Check for downlink messages')\nwhile lora.nb_downlinks:\n    print('>>', lora.get_downlink())\n\nlora.close()","output":"str","x":600,"y":400,"wires":[["72e298ab.7d0978","980e003b.896438","e68a161a.cb67d8"]]},{"id":"72e298ab.7d0978","type":"file","z":"7fdb9ed3.bdb82","name":"","filename":"/home/pi/lorascript.py","appendNewline":false,"createDir":true,"overwriteFile":"true","x":840,"y":400,"wires":[[]]},{"id":"980e003b.896438","type":"trigger","z":"7fdb9ed3.bdb82","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":240,"y":560,"wires":[["f07457bb.f6bbd8"]]},{"id":"f07457bb.f6bbd8","type":"exec","z":"7fdb9ed3.bdb82","command":"python3","addpay":false,"append":"/home/pi/lorascript.py","useSpawn":"true","timer":"","oldrc":false,"name":"","x":380,"y":560,"wires":[["7b927a40.ff654c","2a114adb.8d4796"],[],[]]},{"id":"7b927a40.ff654c","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":true,"console":"false","complete":"false","x":590,"y":540,"wires":[]},{"id":"b8638189.e0771","type":"mqtt in","z":"7fdb9ed3.bdb82","name":"","topic":"pinnacle/+/db3456789012ca55/#","qos":"0","broker":"4e7610ae.62136","x":230,"y":880,"wires":[["9d637b00.532db","ed54f17.1c46f9"]]},{"id":"9d637b00.532db","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":true,"console":"false","complete":"false","x":490,"y":880,"wires":[]},{"id":"2a114adb.8d4796","type":"split","z":"7fdb9ed3.bdb82","name":"","splt":">>","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":570,"y":600,"wires":[["53c7d7a5.4711c8"]]},{"id":"d5aefda.bfe668","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":true,"console":"false","complete":"false","x":990,"y":700,"wires":[]},{"id":"53c7d7a5.4711c8","type":"switch","z":"7fdb9ed3.bdb82","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"'data':","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":600,"wires":[["f1c59eb3.71d4a8"]]},{"id":"58e6a793.f020c","type":"json","z":"7fdb9ed3.bdb82","name":"","property":"payload","action":"","pretty":false,"x":570,"y":680,"wires":[["cdfb997a.27d5d8"]]},{"id":"f1c59eb3.71d4a8","type":"change","z":"7fdb9ed3.bdb82","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"'","fromt":"str","to":"\"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"b\"","fromt":"str","to":"\"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":640,"wires":[["58e6a793.f020c","9d530b09.2164"]]},{"id":"cdfb997a.27d5d8","type":"change","z":"7fdb9ed3.bdb82","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.data","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":680,"wires":[["29d50c59.d9fe04"]]},{"id":"29d50c59.d9fe04","type":"function","z":"7fdb9ed3.bdb82","name":"INCOMING","func":"function hex_to_ascii(str1)\n {\n\tvar hex  = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n \n //msg.payload = hex_to_ascii(msg.payload);\n \n msg.topic =  msg.payload.split(\"=\")[0];\n msg.payload = msg.payload.split(\"=\")[1];\n \nreturn msg;","outputs":1,"noerr":0,"x":790,"y":760,"wires":[["d5aefda.bfe668","8e758a66.1120d8"]]},{"id":"906463d8.2caf38","type":"inject","z":"7fdb9ed3.bdb82","name":"","topic":"lora/epaez5Av/db3456789012ca55/cmd/run","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":780,"wires":[["ca292ff9.f95ef8"]]},{"id":"3d640672.16e162","type":"inject","z":"7fdb9ed3.bdb82","name":"","topic":"lora/epaez5Av/db3456789012ca55/set/setpoint","payload":"47.5","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":820,"wires":[["ca292ff9.f95ef8"]]},{"id":"ca292ff9.f95ef8","type":"mqtt out","z":"7fdb9ed3.bdb82","name":"Send to Lora Node","topic":"","qos":"0","retain":"","broker":"651711de.762cc8","x":460,"y":800,"wires":[]},{"id":"c66e0794.10a5a8","type":"function","z":"7fdb9ed3.bdb82","name":"initialise","func":"function ascii_to_hexa(str)\n  {\n\tvar arr1 = [];\n\tfor (var n = 0, l = str.length; n < l; n ++) \n     {\n\t\tvar hex = Number(str.charCodeAt(n)).toString(16);\n\t\tarr1.push(hex);\n\t }\n\treturn arr1.join('');\n   }\n\nflow.set(\"node\",msg.payload);\n   \nmsg.payload = ascii_to_hexa(msg.payload);\n\nflow.set(\"hexnode\",msg.payload);\n\n\nflow.set(\"readings\",{});\n\n\nreturn msg;","outputs":1,"noerr":0,"x":340,"y":60,"wires":[["7a684c52.d4e84c"]]},{"id":"fa49a632.6ecc38","type":"inject","z":"7fdb9ed3.bdb82","name":"","topic":"","payload":"epaez5Av","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":60,"wires":[["c66e0794.10a5a8"]]},{"id":"7a684c52.d4e84c","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":true,"console":"false","complete":"false","x":530,"y":60,"wires":[]},{"id":"6a3a13e6.7180f4","type":"function","z":"7fdb9ed3.bdb82","name":"create message","func":"msg2={};\nmsg2.payload=\"\";\nloraMsgs = [];\nloraMsg = \"\";\nmsgLen = 0;\n\nvar readings = flow.get(\"readings\");\n\nfor (var serial in readings) {\n    \n    loraMsg = \"id=\" + serial;\n    \n    for (var group in readings[serial]) {\n        \n        if(loraMsg!==\"\") { loraMsg += \"&\"; }\n        loraMsg += \"group=\" + group;\n    \n        for (var key in readings[serial][group]) {\n        \n            msg2.payload += serial + \"/\" + group + \"/\" + key + \"=\" + readings[serial][group][key];\n            \n            var loraMsgN = \"&\" + key + \"=\" + readings[serial][group][key]; \n            \n            if (loraMsg.length + loraMsgN.length > 70) { loraMsgs.push(loraMsg); loraMsg=\"\"; }\n            loraMsg += loraMsgN;\n        }\n        \n        loraMsgs.push(loraMsg); loraMsg=\"\"; \n    }\n}\nmsg2.payload = loraMsgs;\n\nif (loraMsgs == []) { return null; }\n\nmsg.payload=\"\"\nfor (var mm in loraMsgs) {\n\n    var line1 =\"lora.send('\" +loraMsgs[mm] + \"')\";\n    msg.payload  += line1 + \"\\ntime.sleep(7)\\n\";\n}\n\nmsg.payload  += line1 + \"\\ntime.sleep(7)\\n\";\nmsg.payload  += line1 + \"\\ntime.sleep(7)\";\n\nflow.set(\"readings\",{});\n\nmsg.topic = flow.get(\"hexnode\");\n\nreturn [msg,msg2];\n\n\n\n\nvar id = msg.topic.split(\"/\")[0];\nvar group = msg.topic.split(\"/\")[1];\nvar key = msg.topic.split(\"/\")[2];\nvar data = msg.payload;\n\nmsg.payload = \"id=\" + id;\nif (group != \"dat\") { msg.payload += \"&group=\" + group; }\n\nmsg.payload += \"&\" + key + \"=\" + data;\n\n\n\nmsg.payload = loraMsgs[0];\n \nvar line1 =\"lora.send('\" + msg.payload + \"')\";\n\n\n\nmsg.payload  = line1 + \"\\ntime.sleep(7)\\n\" + line1 + \"\\ntime.sleep(7)\\n\" + line1;\n\n\nvar myint = parseInt(data*100);\nvar myB = new Buffer.from([0x0, 0x0]);\nmyB.writeInt16BE(myint, 0);\n\n// 16 bit signed experiment. \n//msg.payload += '\\nmyArray = \"' +  String.fromCharCode(92) + 'x' + myB.toString('hex').substr(0,2) ;\n//msg.payload +=  String.fromCharCode(92) + 'x' + myB.toString('hex').substr(2,2) + '\"';\nvar line2 =\"lora.send(myArray)\";\n//msg.payload += \"\\n\" + line2;\n\n\n\nmsg.topic = flow.get(\"hexnode\");\n\nreturn [msg,msg2];","outputs":2,"noerr":0,"x":400,"y":400,"wires":[["eae0a026.672558"],["55b8d491.f4714c"]]},{"id":"e68a161a.cb67d8","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":true,"console":"false","complete":"false","x":810,"y":440,"wires":[]},{"id":"c4f97476.cf54b","type":"link in","z":"7fdb9ed3.bdb82","name":"sendToLora","links":["4c0a12c1.f1e44c"],"x":115,"y":120,"wires":[["11653036.dc2568"]]},{"id":"4c0a12c1.f1e44c","type":"link out","z":"7fdb9ed3.bdb82","name":"","links":["c4f97476.cf54b"],"x":955,"y":200,"wires":[]},{"id":"8e758a66.1120d8","type":"link out","z":"7fdb9ed3.bdb82","name":"fromLora","links":[],"x":935,"y":760,"wires":[]},{"id":"22a4680e.6e101","type":"template","z":"7fdb9ed3.bdb82","name":"Multitech Flow","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"[{\"id\":\"a6926aca.dc23\",\"type\":\"mqtt-broker\",\"broker\":\"192.168.0.89\",\"port\":\"1883\",\"clientid\":\"\"},{\"id\":\"7b219459.8df41c\",\"type\":\"mqtt-broker\",\"broker\":\"192.168.0.89\",\"port\":\"1883\",\"clientid\":\"\"},{\"id\":\"b4690fa2.d9c8d\",\"type\":\"lora in\",\"name\":\"Lora In\",\"datatype\":\"utf8\",\"x\":233,\"y\":327,\"z\":\"52e0f4f0.10f40c\",\"wires\":[[\"73e52bdb.4f4364\"]]},{\"id\":\"71c90602.bf60c8\",\"type\":\"function\",\"name\":\"\",\"func\":\"msg.topic = msg.deveui;\\nmsg.payload = msg.payload + \\\"&rssi=\\\" + msg.rssi;\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":595,\"y\":328,\"z\":\"52e0f4f0.10f40c\",\"wires\":[[\"7dc17c65.6f90cc\"]]},{\"id\":\"73e52bdb.4f4364\",\"type\":\"change\",\"name\":\"\",\"rules\":[{\"t\":\"change\",\"p\":\"deveui\",\"from\":\"-\",\"to\":\"\",\"re\":false}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":417,\"y\":328,\"z\":\"52e0f4f0.10f40c\",\"wires\":[[\"71c90602.bf60c8\"]]},{\"id\":\"54990269.f8155c\",\"type\":\"lora out\",\"name\":\"\",\"eui\":\"\",\"payload\":\"testing 123\",\"ack\":false,\"port\":\"1\",\"x\":623,\"y\":118.00000762939453,\"z\":\"52e0f4f0.10f40c\",\"wires\":[]},{\"id\":\"7dc17c65.6f90cc\",\"type\":\"function\",\"name\":\"\",\"func\":\"\\n\\nfunction hex_to_ascii(str1)\\n {\\n\\tvar hex  = str1.toString();\\n\\tvar str = '';\\n\\tfor (var n = 0; n < hex.length; n += 2) {\\n\\t\\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\\n\\t}\\n\\treturn str;\\n }\\n \\nmsg.node = hex_to_ascii(msg.deveui);\\n\\n\\n\\nvar msgs = msg.payload.split(\\\"&\\\");\\n\\nvar outs = [];\\nvar dev = \\\"unknown\\\";\\nvar group = \\\"dat\\\";\\n\\nfor(var m in msgs){\\n    \\n    if (msgs[m].split(\\\"=\\\")[0] == \\\"id\\\") {  dev = msgs[m].split(\\\"=\\\")[1];  }\\n    else if (msgs[m].split(\\\"=\\\")[0] == \\\"group\\\") {  group = msgs[m].split(\\\"=\\\")[1];  }\\n}\\n\\nfor(var m in msgs){\\n    \\n    if (msgs[m].split(\\\"=\\\")[0]==\\\"id\\\") { continue; }\\n    if (msgs[m].split(\\\"=\\\")[0]==\\\"group\\\") { continue; }\\n    \\n    var mm = {};\\n    mm.topic = msgs[m].split(\\\"=\\\")[0];\\n    mm.payload = msgs[m].split(\\\"=\\\")[1];\\n    mm.dev = dev;\\n    mm.group = group;\\n    mm.node = msg.node;\\n    \\n    outs.push(mm);\\n    \\n}\\n\\n\\n\\n\\nreturn outs;\",\"outputs\":\"10\",\"noerr\":0,\"x\":770,\"y\":297,\"z\":\"52e0f4f0.10f40c\",\"wires\":[[\"5440d380.c51fcc\"],[\"5440d380.c51fcc\"],[\"5440d380.c51fcc\"],[\"5440d380.c51fcc\"],[\"5440d380.c51fcc\"],[\"5440d380.c51fcc\"],[\"5440d380.c51fcc\"],[\"5440d380.c51fcc\"],[\"5440d380.c51fcc\"],[\"5440d380.c51fcc\"]]},{\"id\":\"f5c63b2d.888fd\",\"type\":\"mqtt out\",\"name\":\"\",\"topic\":\"\",\"qos\":\"0\",\"retain\":\"false\",\"broker\":\"7b219459.8df41c\",\"x\":1123,\"y\":349,\"z\":\"52e0f4f0.10f40c\",\"wires\":[]},{\"id\":\"5440d380.c51fcc\",\"type\":\"function\",\"name\":\"pinnacle\",\"func\":\"msg.topic = \\\"pinnacle/\\\" + msg.node + \\\"/\\\" + msg.dev + \\\"/\\\" + msg.group + \\\"/\\\" + msg.topic;\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":961,\"y\":296,\"z\":\"52e0f4f0.10f40c\",\"wires\":[[\"e3bf9a6d.dba02\",\"f5c63b2d.888fd\"]]},{\"id\":\"e3bf9a6d.dba02\",\"type\":\"debug\",\"name\":\"\",\"active\":true,\"console\":\"false\",\"complete\":\"false\",\"x\":1153,\"y\":296,\"z\":\"52e0f4f0.10f40c\",\"wires\":[]},{\"id\":\"b3b4a8c1.d18368\",\"type\":\"mqtt in\",\"name\":\"\",\"topic\":\"lora/#\",\"broker\":\"a6926aca.dc23\",\"x\":250.79998779296875,\"y\":116.00000762939453,\"z\":\"52e0f4f0.10f40c\",\"wires\":[[\"55633c5c.b01bf4\",\"1f6a7670.23a04a\"]]},{\"id\":\"55633c5c.b01bf4\",\"type\":\"debug\",\"name\":\"\",\"active\":true,\"console\":\"false\",\"complete\":\"false\",\"x\":481.79998779296875,\"y\":58.00000762939453,\"z\":\"52e0f4f0.10f40c\",\"wires\":[]},{\"id\":\"1f6a7670.23a04a\",\"type\":\"function\",\"name\":\"\",\"func\":\"function ascii_to_hexa(str)\\n  {\\n\\tvar arr1 = [];\\n\\tfor (var n = 0, l = str.length; n < l; n ++) \\n     {\\n\\t\\tvar hex = Number(str.charCodeAt(n)).toString(16);\\n\\t\\tarr1.push(hex);\\n\\t }\\n\\treturn arr1.join('');\\n   }\\n   \\n\\nmsg.eui = ascii_to_hexa(msg.topic.split(\\\"/\\\")[1]); \\n\\nif (msg.eui.length!=16) { msg.eui = (\\\"0000000000000000\\\" + msg.eui).substr(0,16); }\\n\\nmsg.ack = false;\\n\\nmsg.payload = msg.topic.split(\\\"/\\\")[2] + \\\"/\\\" + msg.topic.split(\\\"/\\\")[3] + \\\"/\\\" + msg.topic.split(\\\"/\\\")[4] + \\\"=\\\" + msg.payload;\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":464,\"y\":117.00000762939453,\"z\":\"52e0f4f0.10f40c\",\"wires\":[[\"54990269.f8155c\"]]}]","output":"str","x":940,"y":60,"wires":[[]]},{"id":"7735d668.da1838","type":"random","z":"7fdb9ed3.bdb82","name":"","low":"0","high":"10000","inte":"true","property":"payload","x":500,"y":200,"wires":[["9066433d.435b78"]]},{"id":"9d530b09.2164","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":false,"console":"false","complete":"false","x":850,"y":640,"wires":[]},{"id":"f93fe35b.53ed2","type":"inject","z":"7fdb9ed3.bdb82","name":"","topic":"","payload":"30.95","payloadType":"num","repeat":"","crontab":"","once":false,"x":170,"y":1100,"wires":[["4a53ffa6.c3ea48"]]},{"id":"4a53ffa6.c3ea48","type":"function","z":"7fdb9ed3.bdb82","name":"","func":"var myint = parseInt(msg.payload*100);\n\nvar msg = {};\nmsg.payload = new Buffer.from([0x0, 0x0]);\n\nmsg.payload.writeInt16BE(myint, 0);\n\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1100,"wires":[["36e44ed0.2a7db2","52890ae0.443884"]]},{"id":"6aac5c6.3c5fca4","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":true,"console":"false","complete":"false","x":910,"y":1100,"wires":[]},{"id":"e1c0cb64.b61a38","type":"function","z":"7fdb9ed3.bdb82","name":"","func":"msg.payload = msg.payload.readInt16BE(0) / 100.0;\n\n\nreturn msg;","outputs":1,"noerr":0,"x":770,"y":1100,"wires":[["6aac5c6.3c5fca4"]]},{"id":"36e44ed0.2a7db2","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":true,"console":"false","complete":"false","x":530,"y":1040,"wires":[]},{"id":"30c0c20b.464c8e","type":"inject","z":"7fdb9ed3.bdb82","name":"","topic":"","payload":"-230.95","payloadType":"num","repeat":"","crontab":"","once":false,"x":170,"y":1040,"wires":[["4a53ffa6.c3ea48"]]},{"id":"52890ae0.443884","type":"mqtt out","z":"7fdb9ed3.bdb82","name":"","topic":"mytest","qos":"0","retain":"","broker":"60831a9f.fa680c","x":510,"y":1100,"wires":[]},{"id":"25a18fe0.c596b","type":"mqtt in","z":"7fdb9ed3.bdb82","name":"","topic":"mytest","qos":"0","broker":"60831a9f.fa680c","x":650,"y":1100,"wires":[["e1c0cb64.b61a38","24760e42.09ccfa"]]},{"id":"74ebe90d.6db3d","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":true,"console":"false","complete":"false","x":850,"y":940,"wires":[]},{"id":"43d39760.a53e8","type":"function","z":"7fdb9ed3.bdb82","name":"","func":"//msg.payload = Buffer.from(msg.payload);\nmsg.payload = msg.payload.readInt16BE(0) / 100.0;\n\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":940,"wires":[["74ebe90d.6db3d"]]},{"id":"24760e42.09ccfa","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":true,"console":"false","complete":"false","x":790,"y":1040,"wires":[]},{"id":"ed54f17.1c46f9","type":"switch","z":"7fdb9ed3.bdb82","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"msgLora","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":940,"wires":[["43d39760.a53e8"]]},{"id":"9066433d.435b78","type":"function","z":"7fdb9ed3.bdb82","name":"divide","func":"msg.payload = msg.payload / 100;\n\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":200,"wires":[["4c0a12c1.f1e44c"]]},{"id":"5e78f645.0948c","type":"inject","z":"7fdb9ed3.bdb82","name":"","topic":"db3456789012ca55/settings/CentralHeatingControl","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":730,"y":260,"wires":[["4c0a12c1.f1e44c"]]},{"id":"192cbaa9.2f098d","type":"inject","z":"7fdb9ed3.bdb82","name":"","topic":"db3456789012ca55/settings/CentralHeatingControl","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":730,"y":300,"wires":[["4c0a12c1.f1e44c"]]},{"id":"eecc79b3.79901","type":"inject","z":"7fdb9ed3.bdb82","name":"","topic":"db3456789012ca55/dat/tCo","payload":"54","payloadType":"num","repeat":"30","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":200,"wires":[["7735d668.da1838"]]},{"id":"55b8d491.f4714c","type":"debug","z":"7fdb9ed3.bdb82","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":410,"y":440,"wires":[]},{"id":"383c64a0.460a7c","type":"inject","z":"7fdb9ed3.bdb82","name":"","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":400,"wires":[["6a3a13e6.7180f4"]]},{"id":"57c1496c.09da9","type":"function","z":"7fdb9ed3.bdb82","name":"create message SIG16","func":"\nvar id = msg.topic.split(\"/\")[0];\nvar group = msg.topic.split(\"/\")[1];\nvar key = msg.topic.split(\"/\")[2];\nvar data = msg.payload;\n\nmsg.payload = \"id=\" + id;\nif (group != \"dat\") { msg.payload += \"&group=\" + group; }\n\nmsg.payload += \"&\" + key + \"=\" + data;\n \nvar line1 =\"lora.send('\" + msg.payload + \"')\";\n\nmsg2={};\nmsg2.payload = msg.payload;\n\nmsg.payload  = line1 + \"\\ntime.sleep(7)\\n\" + line1 + \"\\ntime.sleep(7)\\n\" + line1;\n\n\nvar myint = parseInt(data*100);\nvar myB = new Buffer.from([0x0, 0x0]);\nmyB.writeInt16BE(myint, 0);\n\n// 16 bit signed experiment. \n//msg.payload += '\\nmyArray = \"' +  String.fromCharCode(92) + 'x' + myB.toString('hex').substr(0,2) ;\n//msg.payload +=  String.fromCharCode(92) + 'x' + myB.toString('hex').substr(2,2) + '\"';\nvar line2 =\"lora.send(myArray)\";\n//msg.payload += \"\\n\" + line2;\n\n\n\nmsg.topic = flow.get(\"hexnode\");\n\nreturn [msg,msg2];","outputs":2,"noerr":0,"x":1030,"y":520,"wires":[[],[]]},{"id":"88b912d4.73eb1","type":"inject","z":"7fdb9ed3.bdb82","name":"","topic":"db3456789012ca55/dat/tH","payload":"77","payloadType":"num","repeat":"15","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":240,"wires":[["7735d668.da1838"]]},{"id":"8d072582.e83118","type":"function","z":"7fdb9ed3.bdb82","name":"SAVE","func":"\nflow.set(\"readings.\" + msg.utopic, msg.payload); \n\n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":120,"wires":[[]]},{"id":"11653036.dc2568","type":"change","z":"7fdb9ed3.bdb82","name":"","rules":[{"t":"set","p":"utopic","pt":"msg","to":"topic","tot":"msg"},{"t":"change","p":"utopic","pt":"msg","from":"/","fromt":"str","to":".","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":120,"wires":[["8d072582.e83118"]]},{"id":"4e7610ae.62136","type":"mqtt-broker","z":"","name":"","broker":"192.168.0.89","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"651711de.762cc8","type":"mqtt-broker","z":"","name":"lora","broker":"192.168.0.89","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"60831a9f.fa680c","type":"mqtt-broker","z":"","broker":"broker.hivemq.com","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""}]

MQTT Data

[{"id":"740abd28.796f4c","type":"tab","label":"Data","disabled":false,"info":""},{"id":"d6e9a0b3.70783","type":"function","z":"740abd28.796f4c","name":"save","func":"\nvar sensorname =  msg.topic.split(\"/\")[4];\nsensornameIn = sensorname;\nvar sensorgroup =  msg.topic.split(\"/\")[3];\nvar sensorparent =  msg.topic.split(\"/\")[2];\nmsg.node =  msg.topic.split(\"/\")[1];\n\nvar sensorobj = {};\nsensorobj[\"topic\"] = msg.topic; //sensorparent + \"/\" + sensorgroup + \"/\" + sensorname;\nsensorobj[\"timestamp\"] = msg.timin;\n\nif (sensorgroup==\"dat\") {sensorname = sensorparent + \"_\" + sensorname; }\nelse { sensorname = sensorparent + \"_\" + sensorgroup + \"_\" + sensorname; }\n\n//sensorobj[\"nickname\"] = sensorname;\n\n\nif (isNaN(msg.payload)) { sensorobj[\"value\"] = msg.payload; }\nelse { sensorobj[\"value\"] = parseFloat(msg.payload); }\n\n//global.set(\"readings.\" +sensorname, sensorobj);\n\nmsg.topic = \"readings.\" + sensorparent + \".\" + sensorgroup + \".\" + sensornameIn;\nmsg.payload = sensorobj;\n\nglobal.set(msg.topic, msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":180,"wires":[["2437124c.a04246","18d0fad2.d287d5"]]},{"id":"d46a0dc2.38cbe","type":"mqtt in","z":"740abd28.796f4c","name":"","topic":"ihiu/#","qos":"0","broker":"4130c613.cc9928","x":110,"y":120,"wires":[["f2ca8261.b7adf8","7261be34.d0d0f8"]]},{"id":"97e293e5.8f6f68","type":"inject","z":"740abd28.796f4c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":340,"wires":[["308d34e.5ec9ccc"]]},{"id":"308d34e.5ec9ccc","type":"change","z":"740abd28.796f4c","name":"","rules":[{"t":"delete","p":"readings","pt":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":340,"wires":[[]]},{"id":"84ba6f26.f20f78","type":"change","z":"740abd28.796f4c","name":"","rules":[{"t":"set","p":"timin","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":180,"wires":[["d6e9a0b3.70783"]]},{"id":"2437124c.a04246","type":"link out","z":"740abd28.796f4c","name":"","links":["123976e9.f97731"],"x":875,"y":180,"wires":[]},{"id":"f2ca8261.b7adf8","type":"switch","z":"740abd28.796f4c","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"/set/","vt":"str"},{"t":"cont","v":"/cmd/","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"x":250,"y":120,"wires":[[],[],["84ba6f26.f20f78"]]},{"id":"7261be34.d0d0f8","type":"debug","z":"740abd28.796f4c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":270,"y":60,"wires":[]},{"id":"18d0fad2.d287d5","type":"debug","z":"740abd28.796f4c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":770,"y":240,"wires":[]},{"id":"4130c613.cc9928","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Boot SD Detection

[{"id":"cd4aa9fd.098dd8","type":"function","z":"87974253.e11588","name":"initialise","func":"global.set(\"boot.root\",\"/var/www/html/\");\nglobal.set(\"boot.logs\",\"/var/www/html/logs/\");\nglobal.set(\"boot.settings\",\"/var/www/html/logs/nodered_settings.json\");\nglobal.set(\"boot.systemid\",\"xaCho7od\");\nglobal.set(\"boot.templateid\",\"test\"+\"system1\");\n\nglobal.set(\"SYSINFO\",{});\n\nmsg2={};\n\nif(\"xaCho7od\" == \"test\"+\"system1\") { msg2.enabled=false; }\nelse {  msg2.enabled=true; }\n\n\n\n\nreturn [msg,msg2];","outputs":"2","noerr":0,"x":245.8958282470703,"y":43.888885498046875,"wires":[["1bf50242.95258e"],["e5987cf0.a3dc9"]]},{"id":"f6808bc2.1bfdd8","type":"inject","z":"87974253.e11588","name":"BOOT","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":90.82455444335938,"y":44.095497131347656,"wires":[["cd4aa9fd.098dd8","59019d69.bbd7f4"]]},{"id":"1bf50242.95258e","type":"trigger","z":"87974253.e11588","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"10","extend":false,"units":"s","reset":"","name":"","x":1091.3820495605469,"y":47.177093505859375,"wires":[["c5950f.1128aaf"]]},{"id":"e5987cf0.a3dc9","type":"link out","z":"87974253.e11588","name":"private","links":["95e2ea9a.020a88","603c78ed.b45358","46b99e98.4a0a7","5aae8f87.3870f","b876fd1f.99d9d","e966bf87.10268"],"x":286,"y":110,"wires":[]},{"id":"59019d69.bbd7f4","type":"trigger","z":"87974253.e11588","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"30","extend":false,"units":"s","reset":"","name":"","x":139.83680725097656,"y":124.40278625488281,"wires":[["f1115eff.ad76"]]},{"id":"c5950f.1128aaf","type":"link out","z":"87974253.e11588","name":"booted","links":["363bdd5c.6c8332","fdfff421.8fd968","e436d341.1ae17","5f44f179.6d6bd"],"x":1200.5408630371094,"y":48.004364013671875,"wires":[]},{"id":"f1115eff.ad76","type":"exec","z":"87974253.e11588","command":"ls /dev/sda1","addpay":false,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"is there sda1","x":272,"y":198.99998474121094,"wires":[["b08d756.0e72b88"],["f608d767.dd86c8"],[]]},{"id":"b08d756.0e72b88","type":"switch","z":"87974253.e11588","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"sda1","vt":"str"}],"checkall":"true","outputs":1,"x":439.60069465637207,"y":143.32035303115845,"wires":[["a9df2619.fef1f8"]]},{"id":"f608d767.dd86c8","type":"debug","z":"87974253.e11588","name":"","active":true,"console":"false","complete":"false","x":440.82643127441406,"y":191.17361450195312,"wires":[]},{"id":"95dea939.ab11e8","type":"ui_button","z":"87974253.e11588","name":"","group":"fa775957.29a128","order":0,"width":0,"height":0,"passthru":false,"label":"Refresh","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":98.09153747558594,"y":197.5777587890625,"wires":[["f1115eff.ad76"]]},{"id":"a9df2619.fef1f8","type":"exec","z":"87974253.e11588","command":"ls /media/usb/*","addpay":false,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"ls usb","x":559.5877285003662,"y":142.77781105041504,"wires":[["8d1131ff.dfffa"],[],[]]},{"id":"8d1131ff.dfffa","type":"switch","z":"87974253.e11588","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":":","vt":"str"},{"t":"else"}],"checkall":"true","outputs":2,"x":695.8377552032471,"y":140.20059967041016,"wires":[["d9c4d6d8.e99218","3a9ce3e.d30a01c","82c99e66.c4599"],["9dc0993c.f1ce28"]]},{"id":"d9c4d6d8.e99218","type":"function","z":"87974253.e11588","name":"usb","func":"\n\nmsg.payload = msg.payload.replace(/\\/media\\/usb\\//g, '');\n\nmsg.payload = msg.payload.replace(/\\n/g, \"<br />\");\n\nmsg.payload = msg.payload.split(\"System Volume\")[0];\n\nif(msg.payload.indexOf(\"logs:\")>0) {\n    \n    global.set(\"boot.usb\",\"/media/usb/\");\n    \n    msg.payload += \"<br />USB drive present<br /> \" + global.get(\"boot.logs\");\n    \n    \n}\n\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":889.4852600097656,"y":135.18316650390625,"wires":[["d4f68582.f8d248","a3970aed.e87878"]]},{"id":"3a9ce3e.d30a01c","type":"debug","z":"87974253.e11588","name":"","active":true,"console":"false","complete":"false","x":907.8367652893066,"y":85.61111450195312,"wires":[]},{"id":"82c99e66.c4599","type":"switch","z":"87974253.e11588","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"/media/usb/wifi.txt","vt":"str"}],"checkall":"true","outputs":1,"x":868.6076965332031,"y":276.0069580078125,"wires":[["9e042589.092ed8"]]},{"id":"9dc0993c.f1ce28","type":"exec","z":"87974253.e11588","command":"sudo mkdir /media/usb","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":187.82638549804688,"y":295.90625,"wires":[["c220316e.82358"],["c220316e.82358"],[]]},{"id":"28519c7b.3c5974","type":"function","z":"87974253.e11588","name":"","func":"msg={}\nmsg.payload=\" \"\nreturn msg;","outputs":1,"noerr":0,"x":588.0448551177979,"y":85.62785530090332,"wires":[["8d1131ff.dfffa"]]},{"id":"d4f68582.f8d248","type":"ui_template","z":"87974253.e11588","group":"fa775957.29a128","name":"","order":0,"width":"6","height":"9","format":"<small><div ng-bind-html=\"msg.payload\"></div></small>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":1099.2075843811035,"y":191.83338928222656,"wires":[[]]},{"id":"a3970aed.e87878","type":"debug","z":"87974253.e11588","name":"usb","active":true,"console":"false","complete":"payload","x":1086.4766540527344,"y":136.87760162353516,"wires":[]},{"id":"58ff7338.f4827c","type":"switch","z":"87974253.e11588","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":":","vt":"str"},{"t":"else"}],"checkall":"true","outputs":2,"x":686.0730018615723,"y":266.4079895019531,"wires":[["d9c4d6d8.e99218","82c99e66.c4599"],[]]},{"id":"9e042589.092ed8","type":"exec","z":"87974253.e11588","command":"sudo cat /etc/wpa_supplicant/wpa_supplicant.conf","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"wifi list","x":990,"y":280,"wires":[["78ab5ee7.f814","25e0869c.f4c2ca"],["25e0869c.f4c2ca"],["25e0869c.f4c2ca"]]},{"id":"c220316e.82358","type":"exec","z":"87974253.e11588","command":"sudo mount -t vfat -o uid=pi,gid=pi /dev/sda1 /media/usb/","addpay":false,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"mount","x":394.0000247955322,"y":293.50438117980957,"wires":[["28d295a2.f71aaa"],["28d295a2.f71aaa"],[]]},{"id":"b5d6cacd.183318","type":"catch","z":"87974253.e11588","name":"","scope":["a9df2619.fef1f8"],"x":459.0213565826416,"y":85.77269172668457,"wires":[["28519c7b.3c5974"]]},{"id":"28d295a2.f71aaa","type":"exec","z":"87974253.e11588","command":"ls /media/usb/*","addpay":false,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"ls usb again","x":536.0408973693848,"y":281.0043640136719,"wires":[["58ff7338.f4827c"],[],[]]},{"id":"78ab5ee7.f814","type":"function","z":"87974253.e11588","name":"","func":"flow.set(\"wifilist\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":1150,"y":280,"wires":[["e1c87f93.b45f3"]]},{"id":"25e0869c.f4c2ca","type":"debug","z":"87974253.e11588","name":"","active":true,"console":"false","complete":"false","x":1170,"y":340,"wires":[]},{"id":"e1c87f93.b45f3","type":"file in","z":"87974253.e11588","name":"wifi.txt","filename":"/media/usb/wifi.txt","format":"utf8","chunk":false,"sendError":false,"x":1290,"y":280,"wires":[["b60089d.a090478","32167d4f.8538b2"]]},{"id":"b60089d.a090478","type":"switch","z":"87974253.e11588","name":"","property":"wifilist","propertyType":"flow","rules":[{"t":"cont","v":"payload","vt":"msg"},{"t":"else"}],"checkall":"true","outputs":2,"x":1450,"y":280,"wires":[[],["53b667c9.6a70e8","94073f39.69e06"]]},{"id":"32167d4f.8538b2","type":"function","z":"87974253.e11588","name":"","func":"msg.payload = msg.payload.replace(/\\n/g, '<br />');\nreturn msg;","outputs":1,"noerr":0,"x":1430,"y":200,"wires":[["855d7549.cbdf88"]]},{"id":"53b667c9.6a70e8","type":"debug","z":"87974253.e11588","name":"","active":true,"console":"false","complete":"false","x":1630,"y":360,"wires":[]},{"id":"94073f39.69e06","type":"exec","z":"87974253.e11588","command":"sudo bash /home/pi/addwifi.sh","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"wifi list","x":1610,"y":280,"wires":[[],[],[]]},{"id":"855d7549.cbdf88","type":"ui_template","z":"87974253.e11588","group":"fa775957.29a128","name":"","order":0,"width":"6","height":"3","format":"<small><div ng-bind-html=\"msg.payload\"></div></small>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":1560,"y":200,"wires":[[]]},{"id":"fa775957.29a128","type":"ui_group","z":"","name":"External Drive","tab":"25a3ca3e.b0eac6","disp":true,"width":"6"},{"id":"25a3ca3e.b0eac6","type":"ui_tab","z":"","name":"Storage","icon":"dashboard","order":11}]

NOIP Update Client

[{"id":"ead1f001.0733d","type":"tab","label":"NOIP","disabled":false,"info":""},{"id":"c7447fd.bc38b8","type":"exec","z":"ead1f001.0733d","command":"sudo /usr/local/bin/noip2","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":470,"y":140,"wires":[["976370f6.61be6"],[],[]]},{"id":"c7caccde.13adf","type":"inject","z":"ead1f001.0733d","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":250,"y":140,"wires":[["c7447fd.bc38b8"]]},{"id":"976370f6.61be6","type":"debug","z":"ead1f001.0733d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":140,"wires":[]},{"id":"bfb950e7.31d518","type":"comment","z":"ead1f001.0733d","name":"notes","info":"https://www.noip.com/support/knowledgebase/install-ip-duc-onto-raspberry-pi/","x":130,"y":60,"wires":[]}]

New Identity

[{"id":"4c59e626.ac8338","type":"file","z":"87974253.e11588","name":"","filename":"/home/pi/node-hiu/logs/nodered_id.txt","appendNewline":false,"createDir":true,"overwriteFile":"true","x":400,"y":60,"wires":[]},{"id":"15b36229.6705de","type":"inject","z":"87974253.e11588","name":"","topic":"","payload":"ivai3aip","payloadType":"str","repeat":"","crontab":"","once":true,"x":140,"y":100,"wires":[["4c59e626.ac8338","c8a95daa.5ba67"]]},{"id":"c8a95daa.5ba67","type":"function","z":"87974253.e11588","name":"ivai3aip","func":"global.set(\"settings\",{});\nglobal.set(\"settings.SYSid\", \"ivai3aip\");\n\nglobal.set(\"node\", \"ivai3aip\");\n\nglobal.set(\"readings\",{});\n\nif (\"ivai3aip\" == \"ooGe\" + \"is0i\") { return msg; }\n\nreturn null;","outputs":1,"noerr":0,"x":310,"y":120,"wires":[["50fd0b7d.28ae74"]]},{"id":"50fd0b7d.28ae74","type":"template","z":"87974253.e11588","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"echo \"Updating Node-RED\"\n\ncd /home/pi/.node-red\n\nex=\"testsystem1\"\nif [ -f /home/pi/node-hiu/logs/nodered_id.txt ]; then\n        ex=$(cat /home/pi/node-hiu/logs/nodered_id.txt)\n        echo \"Exising system code is: $ex\"\nfi\n\nsudo cp flows_ihiu.json flows_ihiu.json.old\n\n\nb=$(pwgen -B -1)\n\n\necho $b > /home/pi/node-hiu/logs/nodered_id.txt\n\na=\"s/$ex/\"\n\nc=\"/g\"\nSED_ARG=\"$a$b$c\"\necho $SED_ARG\nsudo sed -i -e $SED_ARG flows_ihiu.json\nsudo sed -i -e $SED_ARG /home/pi/node-hiu/logs/nodered_settings.json\n\na=\"s/nodehiu/\"\nSED_ARG=\"$a$b$c\"\necho $SED_ARG\nsudo sed -i -e $SED_ARG /etc/hostname\nsudo sed -i -e $SED_ARG /etc/hosts\n\n\nsudo reboot\n","output":"str","x":280,"y":200,"wires":[["fd3831cb.15f19","80ec6a30.5d94e8"]]},{"id":"fd3831cb.15f19","type":"file","z":"87974253.e11588","name":"","filename":"/home/pi/node-hiu-newname.sh","appendNewline":false,"createDir":true,"overwriteFile":"true","x":520,"y":200,"wires":[]},{"id":"80ec6a30.5d94e8","type":"trigger","z":"87974253.e11588","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"5","extend":false,"units":"s","reset":"","name":"","x":350,"y":280,"wires":[["98a51e9e.63559"]]},{"id":"12a7d8d8.811587","type":"inject","z":"87974253.e11588","name":"RENAME","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":130,"y":200,"wires":[["50fd0b7d.28ae74"]]},{"id":"98a51e9e.63559","type":"exec","z":"87974253.e11588","command":"bash","addpay":false,"append":"/home/pi/node-hiu-newname.sh","useSpawn":"true","timer":"","oldrc":false,"name":"","x":480,"y":280,"wires":[["ec7d2ac6.77d3e8"],[],["ec7d2ac6.77d3e8"]]},{"id":"ec7d2ac6.77d3e8","type":"debug","z":"87974253.e11588","name":"","active":true,"console":"false","complete":"false","x":640,"y":280,"wires":[]}]

Ethernet to WiFi Internet Bridge

[{"id":"75083d0e.07bdcc","type":"inject","z":"c151090a.0ed5d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":150,"y":100,"wires":[["bba50bf8.8093b"]]},{"id":"bba50bf8.8093b","type":"exec","z":"c151090a.0ed5d8","command":"sudo bash /home/pi/wifi-to-eth-route.sh","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":430,"y":100,"wires":[[],[],[]]},{"id":"8659f7fb.9ef9d","type":"template","z":"c151090a.0ed5d8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"#!/bin/bash\n\n# Share Wifi with Eth device\n#\n#\n# This script is created to work with Raspbian Stretch\n# but it can be used with most of the distributions\n# by making few changes. \n#\n# Make sure you have already installed `dnsmasq`\n# Please modify the variables according to your need\n# Don't forget to change the name of network interface\n# Check them with `ifconfig`\n\nip_address=\"192.168.2.1\"\nnetmask=\"255.255.255.0\"\ndhcp_range_start=\"192.168.2.2\"\ndhcp_range_end=\"192.168.2.100\"\ndhcp_time=\"12h\"\neth=\"eth0\"\nwlan=\"wlan0\"\n\nsudo iptables -F\nsudo iptables -t nat -F\nsudo iptables -t nat -A POSTROUTING -o $wlan -j MASQUERADE  \nsudo iptables -A FORWARD -i $wlan -o $eth -m state --state RELATED,ESTABLISHED -j ACCEPT  \nsudo iptables -A FORWARD -i $eth -o $wlan -j ACCEPT \n\nsudo sh -c \"echo 1 > /proc/sys/net/ipv4/ip_forward\"\n\nsudo ifconfig $eth $ip_address netmask $netmask\n\n# Remove default route created by dhcpcd\nsudo ip route del 0/0 dev $eth &> /dev/null\n\nsudo systemctl stop dnsmasq\n\nsudo rm -rf /etc/dnsmasq.d/*\n\necho -e \"interface=$eth\\n\\\nbind-interfaces\\n\\\nserver=8.8.8.8\\n\\\ndomain-needed\\n\\\nbogus-priv\\n\\\ndhcp-range=$dhcp_range_start,$dhcp_range_end,$dhcp_time\" > /etc/dnsmasq.d/custom-dnsmasq.conf\n\nsudo systemctl start dnsmasq","output":"str","x":318.49998474121094,"y":180.59999084472656,"wires":[["fc512639.1c6d38"]]},{"id":"c47920e2.8a202","type":"inject","z":"c151090a.0ed5d8","name":"install","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":130,"y":180,"wires":[["8659f7fb.9ef9d"]]},{"id":"fc512639.1c6d38","type":"file","z":"c151090a.0ed5d8","name":"","filename":"/home/pi/wifi-to-eth-route.sh","appendNewline":false,"createDir":false,"overwriteFile":"true","x":560,"y":180,"wires":[]}]

WiFi Scan

[{"id":"fcab4a28.18fbe8","type":"tab","label":"WiFi","disabled":false,"info":""},{"id":"e77ab8d0.7b9d88","type":"debug","z":"fcab4a28.18fbe8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":550,"y":260,"wires":[]},{"id":"64c2fcd8.c7ed14","type":"inject","z":"fcab4a28.18fbe8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":120,"wires":[["4f085b87.7d2fa4"]]},{"id":"b9db0ccf.c584e","type":"comment","z":"fcab4a28.18fbe8","name":"","info":"https://flows.nodered.org/node/node-red-contrib-wifiscan","x":80,"y":40,"wires":[]},{"id":"4f085b87.7d2fa4","type":"exec","z":"fcab4a28.18fbe8","command":"sudo iwlist wlan0 scan","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":350,"y":120,"wires":[["e31e2e9f.ab81c"],[],[]]},{"id":"e31e2e9f.ab81c","type":"split","z":"fcab4a28.18fbe8","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":270,"y":260,"wires":[["5c6850c.abfb0b"]]},{"id":"5c6850c.abfb0b","type":"switch","z":"fcab4a28.18fbe8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"ESSID","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":260,"wires":[["e77ab8d0.7b9d88"]]}]


USB Detect

[{"id":"f4ffabde.69ed6","type":"exec","z":"6ceb94f9.871584","command":"sudo mkdir /media/usb","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":200,"y":320,"wires":[["633ea96.26f3858"],["633ea96.26f3858"],[]]},{"id":"633ea96.26f3858","type":"exec","z":"6ceb94f9.871584","command":"sudo mount -t vfat -o uid=pi,gid=pi /dev/sda1 /media/usb/","addpay":false,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"mount","x":406.17363929748535,"y":317.59813117980957,"wires":[["5da9d75f.9e39d8"],["5da9d75f.9e39d8"],[]]},{"id":"ad5cad6.cbc395","type":"switch","z":"6ceb94f9.871584","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":":","vt":"str"},{"t":"else"}],"checkall":"true","outputs":2,"x":708.0113697052002,"y":164.29434967041016,"wires":[["e5b62213.fde93","916e8e7.ffa4e7","a53a701b.18d5c8"],["f4ffabde.69ed6"]]},{"id":"5da9d75f.9e39d8","type":"exec","z":"6ceb94f9.871584","command":"ls /media/usb/*","addpay":false,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"ls usb again","x":548.2145118713379,"y":305.0981140136719,"wires":[["a7598832.f02f3"],[],[]]},{"id":"e5b62213.fde93","type":"function","z":"6ceb94f9.871584","name":"usb","func":"\n\nmsg.payload = msg.payload.replace(/\\/media\\/usb\\//g, '');\n\nmsg.payload = msg.payload.replace(/\\n/g, \"<br />\");\n\nmsg.payload = msg.payload.split(\"System Volume\")[0];\n\nif(msg.payload.indexOf(\"logs:\")>0) {\n    \n    global.set(\"boot.usb\",\"/media/usb/\");\n    \n    msg.payload += \"<br />USB drive present<br /> \" + global.get(\"boot.logs\");\n    \n    \n}\n\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":901.6588745117188,"y":159.27691650390625,"wires":[["4a01f5f1.88cd84","1830f755.dc0129"]]},{"id":"916e8e7.ffa4e7","type":"debug","z":"6ceb94f9.871584","name":"","active":true,"console":"false","complete":"false","x":920.0103797912598,"y":109.70486450195312,"wires":[]},{"id":"a53a701b.18d5c8","type":"switch","z":"6ceb94f9.871584","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"/media/usb/wifi.txt","vt":"str"}],"checkall":"true","outputs":1,"x":880.7813110351562,"y":300.1007080078125,"wires":[["18fa5805.b3c5c8"]]},{"id":"632a3899.c9d598","type":"exec","z":"6ceb94f9.871584","command":"ls /media/usb/*","addpay":false,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"ls usb","x":571.7613430023193,"y":166.87156105041504,"wires":[["ad5cad6.cbc395"],[],[]]},{"id":"e2b7feb.6ecf98","type":"function","z":"6ceb94f9.871584","name":"","func":"msg={}\nmsg.payload=\" \"\nreturn msg;","outputs":1,"noerr":0,"x":600.218469619751,"y":109.72160530090332,"wires":[["ad5cad6.cbc395"]]},{"id":"a7598832.f02f3","type":"switch","z":"6ceb94f9.871584","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":":","vt":"str"},{"t":"else"}],"checkall":"true","outputs":2,"x":698.2466163635254,"y":290.5017395019531,"wires":[["e5b62213.fde93","a53a701b.18d5c8"],[]]},{"id":"4a01f5f1.88cd84","type":"ui_template","z":"6ceb94f9.871584","group":"8daf00e1.71efb8","name":"","order":0,"width":"6","height":"9","format":"<small><div ng-bind-html=\"msg.payload\"></div></small>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":1111.3811988830566,"y":215.92713928222656,"wires":[[]]},{"id":"1830f755.dc0129","type":"debug","z":"6ceb94f9.871584","name":"usb","active":true,"console":"false","complete":"payload","x":1098.6502685546875,"y":160.97135162353516,"wires":[]},{"id":"18fa5805.b3c5c8","type":"exec","z":"6ceb94f9.871584","command":"sudo cat /etc/wpa_supplicant/wpa_supplicant.conf","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"wifi list","x":1002.1736145019531,"y":304.09375,"wires":[["5648eb7b.62d95c","b1941dfe.0c74d8"],["b1941dfe.0c74d8"],["b1941dfe.0c74d8"]]},{"id":"1a8c33ef.fc0544","type":"switch","z":"6ceb94f9.871584","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"sda1","vt":"str"}],"checkall":"true","outputs":1,"x":451.7743091583252,"y":167.41410303115845,"wires":[["632a3899.c9d598"]]},{"id":"8c40dd1f.caa3d","type":"catch","z":"6ceb94f9.871584","name":"","scope":["632a3899.c9d598"],"x":471.1949710845947,"y":109.86644172668457,"wires":[["e2b7feb.6ecf98"]]},{"id":"5648eb7b.62d95c","type":"function","z":"6ceb94f9.871584","name":"","func":"flow.set(\"wifilist\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":1162.1736145019531,"y":304.09375,"wires":[["94673336.d8b3d"]]},{"id":"b1941dfe.0c74d8","type":"debug","z":"6ceb94f9.871584","name":"","active":true,"console":"false","complete":"false","x":1182.1736145019531,"y":364.09375,"wires":[]},{"id":"730fdbe8.aacefc","type":"exec","z":"6ceb94f9.871584","command":"ls /dev/sda1","addpay":false,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"is there sda1","x":284.1736145019531,"y":223.09373474121094,"wires":[["1a8c33ef.fc0544"],["3f524b0d.4f55b4"],[]]},{"id":"94673336.d8b3d","type":"file in","z":"6ceb94f9.871584","name":"wifi.txt","filename":"/media/usb/wifi.txt","format":"utf8","chunk":false,"sendError":false,"x":1302.1736145019531,"y":304.09375,"wires":[["e04f9585.da9668","90a42dcd.951a08"]]},{"id":"3f524b0d.4f55b4","type":"debug","z":"6ceb94f9.871584","name":"","active":true,"console":"false","complete":"false","x":453.0000457763672,"y":215.26736450195312,"wires":[]},{"id":"8f9024ed.4eb8d8","type":"ui_button","z":"6ceb94f9.871584","name":"","group":"8daf00e1.71efb8","order":0,"width":0,"height":0,"passthru":false,"label":"Refresh","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":110.26515197753906,"y":221.6715087890625,"wires":[["730fdbe8.aacefc"]]},{"id":"a92d401f.b4cd48","type":"trigger","z":"6ceb94f9.871584","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"30","extend":false,"units":"s","reset":"","name":"","x":152.0104217529297,"y":148.4965362548828,"wires":[["730fdbe8.aacefc"]]},{"id":"e04f9585.da9668","type":"switch","z":"6ceb94f9.871584","name":"","property":"wifilist","propertyType":"flow","rules":[{"t":"cont","v":"payload","vt":"msg"},{"t":"else"}],"checkall":"true","outputs":2,"x":1462.1736145019531,"y":304.09375,"wires":[[],["8237b931.45b17","c9c11be3.56092"]]},{"id":"90a42dcd.951a08","type":"function","z":"6ceb94f9.871584","name":"","func":"msg.payload = msg.payload.replace(/\\n/g, '<br />');\nreturn msg;","outputs":1,"noerr":0,"x":1442.1736145019531,"y":224.09375,"wires":[["9f768a65.e42de8"]]},{"id":"fd6213ad.0fc66","type":"inject","z":"6ceb94f9.871584","name":"BOOT","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":102.9981689453125,"y":68.18924713134766,"wires":[["a92d401f.b4cd48"]]},{"id":"8237b931.45b17","type":"debug","z":"6ceb94f9.871584","name":"","active":true,"console":"false","complete":"false","x":1642.1736145019531,"y":384.09375,"wires":[]},{"id":"c9c11be3.56092","type":"exec","z":"6ceb94f9.871584","command":"sudo bash /home/pi/addwifi.sh","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"wifi list","x":1622.1736145019531,"y":304.09375,"wires":[[],[],[]]},{"id":"9f768a65.e42de8","type":"ui_template","z":"6ceb94f9.871584","group":"8daf00e1.71efb8","name":"","order":0,"width":"6","height":"3","format":"<small><div ng-bind-html=\"msg.payload\"></div></small>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":1572.1736145019531,"y":224.09375,"wires":[[]]},{"id":"8daf00e1.71efb8","type":"ui_group","z":"","name":"External Drive","tab":"107d8d68.d3d0cb","disp":true,"width":"6"},{"id":"107d8d68.d3d0cb","type":"ui_tab","z":"","name":"Storage","icon":"dashboard","order":11}]

Flow Runtime Editor

This flow changes the password for the default MQTT user.

[{"id":"ebbb66d5.a3c45","type":"tab","label":"Flows","disabled":false,"info":""},{"id":"5820fd4.c3e0284","type":"debug","z":"ebbb66d5.a3c45","name":"","active":true,"console":"false","complete":"false","x":910,"y":240,"wires":[]},{"id":"a5d241a6.d6e5a","type":"inject","z":"ebbb66d5.a3c45","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":160,"y":280,"wires":[["eac21969.73d6d8"]]},{"id":"ac74a943.5af7f8","type":"change","z":"ebbb66d5.a3c45","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"http1","tot":"flow"},{"t":"change","p":"payload","pt":"msg","from":"ihiu/","fromt":"str","to":"ihiu/","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"\"broker\":\"localhost\"","fromt":"str","to":"\"broker\":\"localhost\", \"credentials\":{\"username\":\"nodereduser\", \"password\":\"node-hiu\"} ","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":280,"wires":[["60d7f3b6.be1664"]]},{"id":"eac21969.73d6d8","type":"function","z":"ebbb66d5.a3c45","name":"","func":"msg.headers={};\n\nmsg.headers.Authorization = \"Bearer \" + flow.get(\"auth.access_token\");\nmsg.headers['Content-type'] = \"application/json\";\nmsg.headers['Node-RED-Deployment-Type'] = \"full\";\n\nmsg.url=\"http://localhost:1880/flows\";\n\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":280,"wires":[["ac74a943.5af7f8"]]},{"id":"60d7f3b6.be1664","type":"http request","z":"ebbb66d5.a3c45","name":"","method":"POST","ret":"txt","url":"","tls":"","x":690,"y":280,"wires":[["5820fd4.c3e0284"]]},{"id":"a5dac8c.d13a538","type":"change","z":"ebbb66d5.a3c45","name":"","rules":[{"t":"set","p":"http1","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":200,"wires":[["5820fd4.c3e0284"]]},{"id":"216c3c0a.13581c","type":"http request","z":"ebbb66d5.a3c45","name":"","method":"GET","ret":"txt","url":"","tls":"","x":488.5,"y":199.80003356933594,"wires":[["a5dac8c.d13a538"]]},{"id":"4e988d50.8f8074","type":"function","z":"ebbb66d5.a3c45","name":"","func":"msg.headers={};\n\nmsg.headers.Authorization = \"Bearer \" + flow.get(\"auth.access_token\");\n\nmsg.url=\"http://localhost:1880/flows\";\n\nreturn msg;","outputs":1,"noerr":0,"x":318.5,"y":200.8000030517578,"wires":[["216c3c0a.13581c"]]},{"id":"2ac3a6ea.31a92a","type":"inject","z":"ebbb66d5.a3c45","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":160,"y":200,"wires":[["4e988d50.8f8074"]]},{"id":"d26d436c.5a1118","type":"function","z":"ebbb66d5.a3c45","name":"","func":"//var cmd = \"curl http://localhost:1880/auth/token --data 'client_id=node-red-admin&grant_type=password&scope=*&username=admin&password=Duu1cahe'\";\n\nmsg.payload={};\nmsg.payload['client_id']=\"node-red-admin\";\nmsg.payload['grant_type']=\"password\";\nmsg.payload['scope']=\"*\";\nmsg.payload['username']=\"admin\";\nmsg.payload['password']=msg.payload;\n\n\nmsg.url=\"http://localhost/auth/token\";\n\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":120,"wires":[["50cdf4e4.f2950c"]]},{"id":"50cdf4e4.f2950c","type":"http request","z":"ebbb66d5.a3c45","name":"","method":"POST","ret":"txt","url":"","tls":"","x":490,"y":120,"wires":[["2c785cc6.800e94"]]},{"id":"70346f75.092c58","type":"inject","z":"ebbb66d5.a3c45","name":"","topic":"","payload":"letmein","payloadType":"str","repeat":"","crontab":"","once":false,"x":149.44998168945312,"y":118.98333740234375,"wires":[["d26d436c.5a1118"]]},{"id":"952f7e96.5a1408","type":"debug","z":"ebbb66d5.a3c45","name":"","active":true,"console":"false","complete":"false","x":1010,"y":120,"wires":[]},{"id":"60935952.99bad","type":"change","z":"ebbb66d5.a3c45","name":"","rules":[{"t":"set","p":"auth","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":120,"wires":[["952f7e96.5a1408"]]},{"id":"2c785cc6.800e94","type":"json","z":"ebbb66d5.a3c45","name":"","pretty":false,"x":670,"y":120,"wires":[["60935952.99bad"]]},{"id":"6efd2626.e12c3","type":"inject","z":"ebbb66d5.a3c45","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":160,"y":360,"wires":[["52c40fbe.9cf4d"]]},{"id":"52c40fbe.9cf4d","type":"function","z":"ebbb66d5.a3c45","name":"revoke","func":"msg={};\nmsg.payload={};\nmsg.headers={};\n\nmsg.headers.Authorization = \"Bearer \" + flow.get(\"auth.access_token\");\nmsg.url=\"http://localhost:1880/auth/revoke\";\nmsg.payload.token = flow.get(\"auth.access_token\");\n\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":360,"wires":[["60d7f3b6.be1664"]]}]

JQuery website

[{"id":"412080f5.8877e","type":"tab","label":"Flow 2","disabled":false},{"id":"8ab04160.faca3","type":"template","z":"412080f5.8877e","name":"jquery","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t<title>Node-HIU Control System</title>\n\t<link rel=\"shortcut icon\" href=\"http://www.heatweb.info/iHIU/jquery/demos/favicon.ico\">\n    <link rel=\"stylesheet\" href=\"http://fonts.googleapis.com/css?family=Open+Sans:300,400,700\">\n\n\n\n\t<link rel=\"stylesheet\" href=\"http://www.heatweb.info/iHIU/jquery/demos/css/themes/default/jquery.mobile-1.4.3.min.css\">\n\t<link rel=\"stylesheet\" href=\"http://www.heatweb.info/iHIU/jquery/demos/_assets/css/jqm-demos.css\">\n\t<script src=\"http://www.heatweb.info/iHIU/jquery/demos/js/jquery.js\"></script>\n\t<script src=\"http://www.heatweb.info/iHIU/jquery/demos/_assets/js/index.js\"></script>\n\t<script src=\"http://www.heatweb.info/iHIU/jquery/demos/js/jquery.mobile-1.4.3.min.js\"></script>\n\n\t\n\t<script type=\"text/javascript\">\n\tfunction updateSection2(sect,uwith)\n\t{\n\t\n\t\tdocument.getElementById(sect).innerHTML=uwith;\n\n\t}\t\n\t</script>\n\t\n\t\n\t<script type=\"text/javascript\">\n\tfunction updateSection(sect,uwith,sysid,sendv)\n\t{\n\n\t\t//alert(uwith);\n\n\t\tif (sect.length==0)\n\t\t{\n\n\t\t\treturn;\n\t\t}\n\t\tif (window.XMLHttpRequest)\n\t\t  {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t  xmlhttp=new XMLHttpRequest();\n\t\t  }\n\t\telse\n\t\t  {// code for IE6, IE5\n\t\t  xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t  }\n\t\txmlhttp.onreadystatechange=function()\n\t\t  {\n\t\t  if (xmlhttp.readyState==4 && xmlhttp.status==200)\n\t\t\t{\n\t\t\tdocument.getElementById(sect).innerHTML=xmlhttp.responseText;\n\t\t\t}\n\t\t  }\n\t\t\n\t\t\n\t\tif(sendv) { \n\t\t\n\t\t\tuwith = uwith + \"&k=\" + sendv + \"&id=\" + sysid + \"&v=\" + document.getElementById(sendv).value;\n\t\t\n\t\t}\n\t\txmlhttp.open(\"GET\",uwith,true);\n\t\txmlhttp.send();\n\t\t\n\t}\n\t</script>\t\n\n\n\t\n<style>\n.tiltable, .tiltable TD, .tiltable TH\n{\nfont-size:10pt;\n}\n</style>\t\n\t\n\t\n\t\n</head>\n<body>\n\t\n<script>\t\nfunction goSave()  {\n\tvar MyIFrame = document.getElementById(\"bframe\");\n\tvar MyIFrameDoc = (MyIFrame.contentWindow || MyIFrame.contentDocument);\n\tif (MyIFrameDoc.document) MyIFrameDoc = MyIFrameDoc.document;\n\t//MyIFrameDoc.getElementById(\"codeform\").submit();\n\tMyIFrameDoc.getElementById(\"sbutton\").click();\n}\n</script>\t\n\t\n<div data-role=\"page\" class=\"jqm-demos\" data-quicklinks=\"true\">\n\n\n\t<div data-role=\"header\" class=\"jqm-header\">\n\t\t<h2><a href=\"frontpanel.php\" title=\"Thermal Integration Limited\"><img src=\"http://heatweb.info/iHIU/jqtilogo.png\" alt=\"Thermal Integration Ltd.\"></a></h2>\n\n\t\t<a href=\"frontpanel.php\" class=\"ui-btn ui-btn-icon-notext ui-corner-all ui-icon-home ui-nodisc-icon ui-alt-icon ui-btn-right\">Home</a>\n\n\t\t<a href=\"#\" class=\"jqm-navmenu-link ui-btn ui-btn-icon-notext ui-corner-all ui-icon-bars ui-nodisc-icon ui-alt-icon ui-btn-left\">Menu</a>\n\t\t<p><?php echo $userinf; ?></p>\n\t\t\n\t\t\n\t</div><!-- /header -->\n\n\t<div role=\"main\" class=\"ui-content jqm-content\">\n\n\n\n\n{{payload}}\n\n\n\t</div><!-- /content -->\n\t<div data-role=\"panel\" class=\"jqm-navmenu-panel\" data-position=\"left\" data-display=\"overlay\" data-theme=\"a\">\n\t    \t<ul class=\"jqm-list ui-alt-icon ui-nodisc-icon\">\n\t\t\t\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"demos homepage\" data-icon=\"home\"><a href=\"web\">Home</a></li>\n\n\t\t\t\t\n\t\t\n\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"demos homepage\" data-icon=\"home\"><a href=\"jqbrowser.php?inw=1&url=http://www.heatweb.info/listsystems.php\">System Summary</a></li>\n\n\n\t\t\t\t\n\t\t\t\t<li data-role=\"collapsible\" data-enhanced=\"true\" data-collapsed-icon=\"carat-d\" data-expanded-icon=\"carat-u\" data-iconpos=\"right\" data-inset=\"false\" class=\"ui-collapsible ui-collapsible-themed-content ui-collapsible-collapsed\">\t\t\t\n\t\t\t\t\t<h3 class=\"ui-collapsible-heading ui-collapsible-heading-collapsed\">\n\t\t\t\t\t\t<a href=\"#\" class=\"ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d\">\n\t\t\t\t\t\t\tSystem 58: Pellet Boiler Test Rig<span class=\"ui-collapsible-heading-status\"> click to expand contents</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div class=\"ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed\" aria-hidden=\"true\">\n\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?url=systeminfo.php?id=58_a_fn=c35exploded.d.svg&\">SVG Dashboard</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a target=\"_blank\" href=\"<?php\n\t\t\t\t$urlt = \"../graphdata.php?id=58&show=Auger,Fan,Pump,Blower,tF,tR,fR,pF,kW&dday=0\";\n\t\t\t\t//$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Graph</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"analyse_pelletboiler.php?id=58\">Analysis</a></li>\n\t\t\t\t\n\t\n\t\t\t\t</ul></div></li>\n\t\n\t\n\t\t\t\t\n\t\t\t\t<li data-role=\"collapsible\" data-enhanced=\"true\" data-collapsed-icon=\"carat-d\" data-expanded-icon=\"carat-u\" data-iconpos=\"right\" data-inset=\"false\" class=\"ui-collapsible ui-collapsible-themed-content ui-collapsible-collapsed\">\t\t\t\n\t\t\t\t\t<h3 class=\"ui-collapsible-heading ui-collapsible-heading-collapsed\">\n\t\t\t\t\t\t<a href=\"#\" class=\"ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d\">\n\t\t\t\t\t\t\tSystem 50: HSF Interface<span class=\"ui-collapsible-heading-status\"> click to expand contents</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div class=\"ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed\" aria-hidden=\"true\">\n\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?inw=1&nojq=1&url=../myfiles/files/homepageether.html\">Live Dashboard</a></li>\n\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?url=systeminfo.php?id=50_a_fn=ether.message.d.svg&\">SVG Dashboard</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a href=\"<?php\n\t\t\t\t$urlt = \"jqbrowser.php?url=../graphdata.php?show=t1,t2,t3,t4,t5,t6&id=50\";\n\t\t\t\t$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Graph</a></li>\n\t\t\t\t\n\t\t\t\t\n\t\n\t\t\t\t</ul></div></li>\n\t\n\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<li data-role=\"collapsible\" data-enhanced=\"true\" data-collapsed-icon=\"carat-d\" data-expanded-icon=\"carat-u\" data-iconpos=\"right\" data-inset=\"false\" class=\"ui-collapsible ui-collapsible-themed-content ui-collapsible-collapsed\">\t\t\t\n\t\t\t\t\t<h3 class=\"ui-collapsible-heading ui-collapsible-heading-collapsed\">\n\t\t\t\t\t\t<a href=\"#\" class=\"ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d\">\n\t\t\t\t\t\t\tSystem 22: Specflue iHIU<span class=\"ui-collapsible-heading-status\"> click to expand contents</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div class=\"ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed\" aria-hidden=\"true\">\n\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\">\n\t\t\t\t<a href=\"jqbrowser.php?url=../systeminfo.php?id=22\">Dashboard</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a href=\"<?php\n\t\t\t\t$urlt = \"jqbrowser.php?url=../ggraphsystem.php?count=50&startat=0&\" . \"notfirst=1&every=1&B1=Refresh&id=22&fH=checked&fC=checked&tH=checked&tHm=checked&tCo=checked&gwidth=1000&gheight=600&refreshs=60\";\n\t\t\t\t$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Graph</a></li>\n\t\t\t\t\n\t\t\t\t<li ata-role=\"list-divider\" data-filtertext=\"system graph\" data-icon=\"home\"><a href=\"<?php\n\t\t\t\t$urlt = \"jqbrowser.php?url=../rickshaw/examples/tilgraph.php?count=2000&startat=0&\" . \"notfirst=1&every=5&B1=Refresh&id=22&fH=checked&fC=checked&tH=checked&tHm=checked&tCo=checked&gwidth=1000&gheight=600&refreshs=60\";\n\t\t\t\t$urlt = str_replace(\"&\", \"_a_\", $urlt);\n\t\t\t\techo $urlt;\n\t\t\t\t?>\">Analysis</a></li>\n\t\n\t\t\t\t</ul></div></li>\n\t\n\t\t\t\t\n\n\t\t\t\n\n\t\t\t\t\n\t\n\n\t\t\t\t\t\t\n\t\t\n\t\n\t\t\n\t\t\t\t\n\n\n\t\t     </ul>\n\t\t</div><!-- /panel -->\n\n\n\t<div data-role=\"footer\" data-position=\"fixed\" data-tap-toggle=\"false\" class=\"jqm-footer\">\n\t\t<p>Node-HIU Control System <span class=\"jqm-version\"></span></p>\n\t\t<p>Copyright 2018 Thermal Integration Ltd.</p>\n\t</div><!-- /footer -->\n\n\n\n</div><!-- /page -->\n\n</body>\n</html>\n\n\n\n\n","output":"str","x":430,"y":120,"wires":[["beab9bd2.55cd18"]]},{"id":"d35336c.c1526c8","type":"http in","z":"412080f5.8877e","name":"","url":"/ihiu/:ihiu","method":"get","upload":false,"swaggerDoc":"","x":110,"y":120,"wires":[["92dfab05.f3f0a8"]]},{"id":"beab9bd2.55cd18","type":"http response","z":"412080f5.8877e","name":"","statusCode":"","headers":{},"x":570,"y":120,"wires":[]},{"id":"7b478fe7.b6d46","type":"http in","z":"412080f5.8877e","name":"","url":"/ihiu","method":"get","upload":false,"swaggerDoc":"","x":100,"y":60,"wires":[["2f96857c.a307ca"]]},{"id":"2f96857c.a307ca","type":"template","z":"412080f5.8877e","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This is a test","output":"str","x":270,"y":60,"wires":[["8ab04160.faca3"]]},{"id":"92dfab05.f3f0a8","type":"function","z":"412080f5.8877e","name":"","func":"msg.payload=msg.req.params.ihiu;\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":120,"wires":[["8ab04160.faca3"]]}]

Spreadsheet Communications

Mail Interface

[{"id":"abc0a55e.ede908","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"7b78737b.decaf4","type":"excel","z":"abc0a55e.ede908","name":"","file":"/home/pi/report.xlsx","x":990,"y":180,"wires":[["964fcbb8.92895"]]},{"id":"d84b4c4a.0a0638","type":"book","z":"abc0a55e.ede908","name":"","x":510,"y":940,"wires":[["c4ee60be.45171"]]},{"id":"c4ee60be.45171","type":"sheet","z":"abc0a55e.ede908","name":"","sheetName":"B4","x":630,"y":940,"wires":[["23f881a9.7f3ab6"]]},{"id":"23f881a9.7f3ab6","type":"sheet-to-json","z":"abc0a55e.ede908","name":"","raw":"false","range":"A1:BA74","header":"default","blankrows":false,"x":770,"y":940,"wires":[["118c9657.56af02"]]},{"id":"4a35d603.c3fe3","type":"file in","z":"abc0a55e.ede908","name":"","filename":"/home/pi/b4.xlsx","format":"","chunk":false,"sendError":false,"x":340,"y":940,"wires":[["d84b4c4a.0a0638","7170bd15.ae6314"]]},{"id":"e9c8659e.468e28","type":"inject","z":"abc0a55e.ede908","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":940,"wires":[["4a35d603.c3fe3"]]},{"id":"118c9657.56af02","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":990,"y":940,"wires":[]},{"id":"d10d3ac6.d8d2f8","type":"file in","z":"abc0a55e.ede908","name":"","filename":"/home/pi/b6.xlsx","format":"","chunk":false,"sendError":false,"x":340,"y":1000,"wires":[["b925deb.5468a2","7170bd15.ae6314"]]},{"id":"9f61feb1.bd33f","type":"inject","z":"abc0a55e.ede908","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":1000,"wires":[["d10d3ac6.d8d2f8"]]},{"id":"b925deb.5468a2","type":"book","z":"abc0a55e.ede908","name":"B6","x":510,"y":1000,"wires":[["5db5583c.7ddf4"]]},{"id":"5db5583c.7ddf4","type":"sheet","z":"abc0a55e.ede908","name":"B6","sheetName":"B6","x":630,"y":1000,"wires":[["a7475fb5.bc6858"]]},{"id":"a7475fb5.bc6858","type":"sheet-to-json","z":"abc0a55e.ede908","name":"","raw":"false","range":"A1:BA92","header":"default","blankrows":false,"x":790,"y":1000,"wires":[["118c9657.56af02"]]},{"id":"7170bd15.ae6314","type":"mqtt out","z":"abc0a55e.ede908","name":"","topic":"ihiu/global/global/set/properties.xlsx","qos":"0","retain":"false","broker":"8024f18.2ce709","x":760,"y":820,"wires":[]},{"id":"80ef4895.dfd8f","type":"mqtt in","z":"abc0a55e.ede908","name":"","topic":"ihiu/+/global/json/report","qos":"2","broker":"8024f18.2ce709","x":280,"y":180,"wires":[["197e9cf6.3c9afb"]]},{"id":"26bfbd74.08b4f2","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":810,"y":280,"wires":[]},{"id":"7b09a89e.f67fe8","type":"json","z":"abc0a55e.ede908","name":"","property":"payload","action":"obj","pretty":false,"x":690,"y":180,"wires":[["26bfbd74.08b4f2","433715bd.af6674"]]},{"id":"433715bd.af6674","type":"function","z":"abc0a55e.ede908","name":"","func":"outA = [];\n\nfor (var dev in msg.payload) {\n    \n    \n    var lout = {};\n    \n    if (dev.length == 16) {\n\n        lout[\"plotNo\"] = msg.payload[dev][\"system\"][\"plotNo\"];\n        lout[\"Serial\"] = dev;\n        lout[\"state\"] = msg.payload[dev][\"stat\"][\"state\"];\n        \n        for (var group in msg.payload[dev]) {\n            \n            for (var key in msg.payload[dev][group]) {\n            \n                lout[key] = msg.payload[dev][group][key];\n            \n            }\n            \n        }\n        \n        outA.push(lout)\n    }\n}\n\nmsg.payload = outA;\nreturn msg;","outputs":1,"noerr":0,"x":850,"y":180,"wires":[["7b78737b.decaf4","d1a9d900.79923"]]},{"id":"d1a9d900.79923","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1000,"y":240,"wires":[]},{"id":"5e141895.ff5238","type":"mqtt out","z":"abc0a55e.ede908","name":"","topic":"ihiu/global/global/cmd/report","qos":"2","retain":"false","broker":"8024f18.2ce709","x":520,"y":260,"wires":[]},{"id":"ff69fb43.684b1","type":"inject","z":"abc0a55e.ede908","name":"REPORT","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":260,"wires":[["5e141895.ff5238"]]},{"id":"d6a73148.b678a8","type":"link out","z":"abc0a55e.ede908","name":"","links":["a467afe3.1dda9"],"x":1255,"y":180,"wires":[]},{"id":"964fcbb8.92895","type":"function","z":"abc0a55e.ede908","name":"attach","func":"msg.payload=\"Data from Clapham Park \" + msg.topic.split(\"/\")[1];\nmsg.topic=\"Data from Clapham Park \"+ msg.topic.split(\"/\")[1];\nmsg.attachments = [{   // utf-8 string as an attachment \n            filename: 'report.xlsx',\n            path: '/home/pi/report.xlsx',\n            content: msg.xwordHTML\n        }];\n\nmsg.to=flow.get(\"email\") || \"admin@heatweb.com\";\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":1130,"y":180,"wires":[["d6a73148.b678a8"]]},{"id":"197e9cf6.3c9afb","type":"delay","z":"abc0a55e.ede908","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":520,"y":180,"wires":[["7b09a89e.f67fe8"]]},{"id":"60d691ce.bd6d2","type":"switch","z":"abc0a55e.ede908","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"RE:","vt":"str"},{"t":"eq","v":"REPORT","vt":"str"},{"t":"cont","v":"TRACKER","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":490,"y":500,"wires":[[],["afe136dd.7534e8"],["e4d9476f.9c0528","77661693.9ccbb"]]},{"id":"e42b8d7c.a3d7c8","type":"split","z":"abc0a55e.ede908","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":290,"y":600,"wires":[["46c6d3c9.eceb34"]]},{"id":"46c6d3c9.eceb34","type":"switch","z":"abc0a55e.ede908","name":"","property":"payload.fileName","propertyType":"msg","rules":[{"t":"nnull"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":430,"y":600,"wires":[["308dbec9.fbbdb2"],["9643cfbc.6d972"]]},{"id":"e4d9476f.9c0528","type":"function","z":"abc0a55e.ede908","name":"","func":"var topic = msg.topic;\nvar from = msg.from;\nmsg.body = msg.html;\n\nmsg.payload = msg.attachments;\n\nmsg.subject=topic;\nmsg.from=from;\n\nreturn msg;","outputs":1,"noerr":0,"x":150,"y":600,"wires":[["e42b8d7c.a3d7c8"]]},{"id":"3dc348c.dca5738","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"console":"false","complete":"false","x":470,"y":420,"wires":[]},{"id":"308dbec9.fbbdb2","type":"change","z":"abc0a55e.ede908","name":"","rules":[{"t":"set","p":"subject","pt":"msg","to":"topic","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"payload.fileName","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload.content","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":580,"wires":[["c557e2b.0728d2"]]},{"id":"9643cfbc.6d972","type":"change","z":"abc0a55e.ede908","name":"","rules":[{"t":"set","p":"subject","pt":"msg","to":"topic","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"payload.filename","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload.content","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":620,"wires":[["c557e2b.0728d2"]]},{"id":"d229dd07.49e388","type":"e-mail in","z":"abc0a55e.ede908","name":"","protocol":"IMAP","server":"imap.ionos.co.uk","useSSL":true,"port":"993","box":"INBOX","disposition":"Read","repeat":"15","x":210,"y":380,"wires":[["3e4bcd36.fa5ef2","df3620ed.b06ad"]]},{"id":"c557e2b.0728d2","type":"join","z":"abc0a55e.ede908","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"1","x":150,"y":760,"wires":[["bc512225.6b7c48","97f00aeb.ec4008"]]},{"id":"bc512225.6b7c48","type":"switch","z":"abc0a55e.ede908","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":".xls","vt":"str"},{"t":"cont","v":".XLS","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":350,"y":760,"wires":[["8cfcf459.5ff0b"],["8cfcf459.5ff0b"]]},{"id":"97f00aeb.ec4008","type":"debug","z":"abc0a55e.ede908","name":"","active":false,"console":"false","complete":"false","x":350,"y":800,"wires":[]},{"id":"8cfcf459.5ff0b","type":"function","z":"abc0a55e.ede908","name":"","func":"//msg.from = msg.subject.split(\"from \")[1].replace(/\\s/g, '');\n\nmsg.filename=\"/home/pi/node-hiu/xlsx/\" + msg.topic;\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":760,"wires":[["7ac05e34.268eb","b1952aa0.509128"]]},{"id":"7ac05e34.268eb","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"console":"false","complete":"false","x":630,"y":720,"wires":[]},{"id":"b1952aa0.509128","type":"delay","z":"abc0a55e.ede908","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":700,"y":760,"wires":[["77661693.9ccbb","7170bd15.ae6314","782d0e18.35b54"]]},{"id":"f17db2cd.bd737","type":"debug","z":"abc0a55e.ede908","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1030,"y":480,"wires":[]},{"id":"3e4bcd36.fa5ef2","type":"function","z":"abc0a55e.ede908","name":"","func":"msg.payload = msg;\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":380,"wires":[["3dc348c.dca5738"]]},{"id":"a271552e.8e7f2","type":"switch","z":"abc0a55e.ede908","name":"","property":"from","propertyType":"msg","rules":[{"t":"eq","v":"pp@heatweb.com","vt":"str"},{"t":"cont","v":"@ihiupower.","vt":"str"},{"t":"cont","v":"@heatweb.","vt":"str"},{"t":"cont","v":"@thermal","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":290,"y":480,"wires":[[],["60d691ce.bd6d2"],["60d691ce.bd6d2"],["60d691ce.bd6d2"]]},{"id":"afe136dd.7534e8","type":"change","z":"abc0a55e.ede908","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"from","tot":"msg"},{"t":"set","p":"email","pt":"flow","to":"from","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":480,"wires":[["5e141895.ff5238","f17db2cd.bd737"]]},{"id":"bb2607cf.62889","type":"inject","z":"abc0a55e.ede908","name":"","topic":"","payload":"admin@heatweb.com","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":200,"y":80,"wires":[["53bf84e0.097dd4"]]},{"id":"53bf84e0.097dd4","type":"change","z":"abc0a55e.ede908","name":"","rules":[{"t":"set","p":"email","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":80,"wires":[[]]},{"id":"df3620ed.b06ad","type":"function","z":"abc0a55e.ede908","name":"","func":"msg.topic = msg.topic.toUpperCase();\nreturn msg;","outputs":1,"noerr":0,"x":150,"y":480,"wires":[["a271552e.8e7f2"]]},{"id":"77661693.9ccbb","type":"trigger","z":"abc0a55e.ede908","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"20","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":830,"y":540,"wires":[["afe136dd.7534e8"]]},{"id":"782d0e18.35b54","type":"file","z":"abc0a55e.ede908","name":"","filename":"","appendNewline":true,"createDir":true,"overwriteFile":"false","x":910,"y":760,"wires":[[]]},{"id":"8024f18.2ce709","type":"mqtt-broker","z":"abc0a55e.ede908","name":"ihiu","broker":"mymqtt.heatweb.com","port":"10031","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Alarms

[{"id":"8377bea5.60c0b","type":"tab","label":"Alarms","disabled":false,"info":""},{"id":"9c98a437.dd7f78","type":"ui_dropdown","z":"8377bea5.60c0b","name":"","label":"Sensor","place":"Select option","group":"e3629e5b.86b03","order":2,"width":0,"height":0,"passthru":true,"options":[{"label":"Any Sensor","value":"any","type":"str"},{"label":"All Sensors","value":"all","type":"str"}],"payload":"","topic":"sensor","x":360,"y":320,"wires":[["26492332.a4e62c"]]},{"id":"6b7cda6f.6db494","type":"ui_dropdown","z":"8377bea5.60c0b","name":"","label":"Condition","place":"Select option","group":"e3629e5b.86b03","order":3,"width":0,"height":0,"passthru":true,"options":[{"label":"Less than","value":"<","type":"str"},{"label":"Greater than","value":">","type":"str"}],"payload":"","topic":"condition","x":360,"y":380,"wires":[["26492332.a4e62c"]]},{"id":"c583d444.dad8b8","type":"ui_numeric","z":"8377bea5.60c0b","name":"","label":"Alarm Setpoint","group":"e3629e5b.86b03","order":4,"width":0,"height":0,"passthru":true,"topic":"setpoint","format":"{{value}}","min":"1","max":"100","step":1,"x":380,"y":420,"wires":[["26492332.a4e62c"]]},{"id":"bec1533c.7641b","type":"ui_numeric","z":"8377bea5.60c0b","name":"","label":"For longer than","group":"e3629e5b.86b03","order":5,"width":0,"height":0,"passthru":true,"topic":"time","format":"{{value}}s","min":"5","max":"3600","step":"5","x":380,"y":500,"wires":[["26492332.a4e62c"]]},{"id":"cc6e20d1.1ae33","type":"ui_text_input","z":"8377bea5.60c0b","name":"","label":"Email","group":"e3629e5b.86b03","order":6,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"email","x":349,"y":575,"wires":[["26492332.a4e62c"]]},{"id":"9715638.80b06a","type":"ui_dropdown","z":"8377bea5.60c0b","name":"","label":"Repeat","place":"Select option","group":"e3629e5b.86b03","order":7,"width":0,"height":0,"passthru":true,"options":[{"label":"No Repeat","value":"0","type":"str"},{"label":"Every 5 minutes","value":"5","type":"str"},{"label":"Every 15 minutes","value":"15","type":"str"},{"label":"Every 30 minutes","value":"30","type":"str"},{"label":"Every hour","value":"60","type":"str"},{"label":"Every 6 hours","value":"360","type":"str"},{"label":"Every day","value":"1440","type":"str"}],"payload":"","topic":"repeat","x":360,"y":640,"wires":[["26492332.a4e62c"]]},{"id":"280b0dff.decd92","type":"ui_switch","z":"8377bea5.60c0b","name":"","label":"Send reset email","group":"e3629e5b.86b03","order":9,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"emailreset","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":390,"y":760,"wires":[["26492332.a4e62c"]]},{"id":"923b85df.3a88b8","type":"ui_numeric","z":"8377bea5.60c0b","name":"","label":"Reset after ok for","group":"e3629e5b.86b03","order":8,"width":0,"height":0,"passthru":true,"topic":"resettime","format":"{{value}}s","min":"5","max":"3600","step":"5","x":390,"y":700,"wires":[["26492332.a4e62c"]]},{"id":"8b1d2d45.0fcfb","type":"ui_dropdown","z":"8377bea5.60c0b","name":"","label":"Attach to Pin","place":"Select option","group":"e3629e5b.86b03","order":10,"width":0,"height":0,"passthru":true,"options":[{"label":"None","value":"0","type":"str"},{"label":"11","value":"11","type":"str"},{"label":"12","value":"12","type":"str"},{"label":"13","value":"13","type":"str"},{"label":"15","value":"15","type":"str"},{"label":"16","value":"16","type":"str"},{"label":"18","value":"18","type":"str"},{"label":"19","value":"19","type":"str"},{"label":"21","value":"21","type":"str"}],"payload":"","topic":"pin","x":370,"y":840,"wires":[["26492332.a4e62c"]]},{"id":"26492332.a4e62c","type":"function","z":"8377bea5.60c0b","name":"","func":"\nvar an = \"alarm.\" + msg.topic;\n\nglobal.set(an, msg.payload);\n\nmsg.topic = \"alarm.\" + msg.topic;\n\nmsg.payload = global.get(\"alarm\");\n\nreturn msg;","outputs":1,"noerr":0,"x":632,"y":474,"wires":[["fdb0e99b.2599d8"]]},{"id":"5768a1af.b8595","type":"function","z":"8377bea5.60c0b","name":"","func":"\nmsg.payload = global.get(\"alarm.description\") + \":<br/>\";\n\n\nmsg.payload += global.get(\"alarm.sensor\") + \" \";\n\nmsg.payload += global.get(\"alarm.condition\") + \" \";\n\nmsg.payload += global.get(\"alarm.setpoint\") + \" \";\n\nmsg.payload += \"for \" + global.get(\"alarm.time\") + \"s \";\n\nmsg.payload += \"<br />until ok for \" + global.get(\"alarm.resettime\") + \"s \";\n\n\nmsg.payload += \"<br />email \" + global.get(\"alarm.email\") + \" \";\n\nif(global.get(\"alarm.repeat\")>0) {\nmsg.payload += \"<br />every \" + global.get(\"alarm.repeat\") + \"min \";\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":780,"wires":[["3f3a724c.b9a4ce"]]},{"id":"3f3a724c.b9a4ce","type":"debug","z":"8377bea5.60c0b","name":"","active":true,"console":"false","complete":"false","x":810,"y":780,"wires":[]},{"id":"a184e9e0.fb1068","type":"debug","z":"8377bea5.60c0b","name":"","active":true,"console":"false","complete":"false","x":810,"y":340,"wires":[]},{"id":"9b331a00.da7a28","type":"inject","z":"8377bea5.60c0b","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":230,"y":40,"wires":[["c58beac1.4cdbc8"]]},{"id":"c58beac1.4cdbc8","type":"function","z":"8377bea5.60c0b","name":"initialise","func":"global.set(\"alarm\",{});\n\nglobal.set(\"alarm.state\",0);\n\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":40,"wires":[["10c9ba65.1bcc96"]]},{"id":"5faf8da4.cfc894","type":"ui_text_input","z":"8377bea5.60c0b","name":"","label":"Description","group":"e3629e5b.86b03","order":1,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"description","x":370,"y":280,"wires":[["26492332.a4e62c"]]},{"id":"692e40f9.6c105","type":"json","z":"8377bea5.60c0b","name":"","pretty":false,"x":1010,"y":480,"wires":[["a184e9e0.fb1068","1d287da0.c08a72"]]},{"id":"1d287da0.c08a72","type":"file","z":"8377bea5.60c0b","name":"","filename":"/home/pi/node-hiu/alarms/alarm1.json","appendNewline":false,"createDir":true,"overwriteFile":"true","x":1290,"y":480,"wires":[]},{"id":"10c9ba65.1bcc96","type":"file in","z":"8377bea5.60c0b","name":"","filename":"/home/pi/node-hiu/alarms/alarm1.json","format":"utf8","chunk":false,"sendError":false,"x":310,"y":160,"wires":[["cf1d8d67.dd816"]]},{"id":"cf1d8d67.dd816","type":"json","z":"8377bea5.60c0b","name":"","pretty":false,"x":550,"y":160,"wires":[["e8b46a6d.f096e8"]]},{"id":"bd7c5408.3c5358","type":"debug","z":"8377bea5.60c0b","name":"","active":true,"console":"false","complete":"false","x":330,"y":220,"wires":[]},{"id":"e8b46a6d.f096e8","type":"change","z":"8377bea5.60c0b","name":"","rules":[{"t":"set","p":"alarm","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":160,"wires":[["f17056e2.6b65b8"]]},{"id":"fdb0e99b.2599d8","type":"trigger","z":"8377bea5.60c0b","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"5","extend":true,"units":"s","reset":"","name":"","x":800,"y":480,"wires":[["692e40f9.6c105"]]},{"id":"f17056e2.6b65b8","type":"split","z":"8377bea5.60c0b","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":130,"y":280,"wires":[["cac5b3ac.73c34"]]},{"id":"cac5b3ac.73c34","type":"switch","z":"8377bea5.60c0b","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"description","vt":"str"},{"t":"eq","v":"sensor","vt":"str"},{"t":"eq","v":"condition","vt":"str"},{"t":"eq","v":"setpoint","vt":"str"},{"t":"eq","v":"time","vt":"str"},{"t":"eq","v":"email","vt":"str"},{"t":"eq","v":"repeat","vt":"str"},{"t":"eq","v":"resettime","vt":"str"},{"t":"eq","v":"emailreset","vt":"str"},{"t":"eq","v":"pin","vt":"str"}],"checkall":"false","outputs":10,"x":130,"y":400,"wires":[["5faf8da4.cfc894"],["9c98a437.dd7f78"],["6b7cda6f.6db494"],["c583d444.dad8b8"],["bec1533c.7641b"],["cc6e20d1.1ae33"],["9715638.80b06a"],["923b85df.3a88b8"],["280b0dff.decd92"],["8b1d2d45.0fcfb"]]},{"id":"2d0288f9.86d3c8","type":"inject","z":"8377bea5.60c0b","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"x":170,"y":1040,"wires":[["83297891.4aa6e8"]]},{"id":"83297891.4aa6e8","type":"function","z":"8377bea5.60c0b","name":"","func":"msg.timestamp = msg.payload;\n\nmsg.payload = \"\";\nvar inalarm = false;\nvar all = true;\nfor (var key in global.get(\"readings\")) {\n    \n    var t1 = global.get(\"alarm.setpoint\");\n    var t2 = global.get(\"readings.\"+key);\n\n    if (global.get(\"alarm.setpoint\")==\">\") {\n     t2 = global.get(\"alarm.setpoint\");\n     t1 = global.get(\"readings.\"+key);\n    }\n    \n    \n    if (t1 > t2) {\n        \n        inalarm = true;\n        break;\n        \n    } else {\n        \n        all = false;\n    }\n    \n}\n\nif (all === true) { inalarm = true; }\n\n\nvar a = global.get(\"alarm.state\") || 0;\n\n\nif ((a === 0) && (inalarm === true)) { \n    \n     global.set(\"alarm.started\",msg.timestamp);\n     global.set(\"alarm.state\",1);\n \n \n} else if ((a === 1) && (inalarm === true)) { \n\n     var onfor = msg.timestamp - global.get(\"alarm.started\");\n     \n     if (onfor > (1000 * global.get(\"alarm.time\"))) {    \n        global.set(\"alarm.activated\",msg.timestamp);\n        global.set(\"alarm.state\",2);\n     }\n\n} else if ((a === 1) && (inalarm === false)) { \n\n     \n    global.set(\"alarm.state\",0);\n     \n\n} else if ((a === 2) && (inalarm === false)) { \n\n    global.set(\"alarm.ok\",msg.timestamp);\n    global.set(\"alarm.state\",3);\n     \n\n} else if ((a === 3) && (inalarm === false)) { \n\n     var offfor = msg.timestamp - global.get(\"alarm.ok\");\n     \n     if (offfor > (1000 * global.get(\"alarm.resettime\"))) {    \n        global.set(\"alarm.deactivated\",msg.timestamp);\n        global.set(\"alarm.state\",0);\n     }\n\n} else if ((a === 3) && (inalarm === true)) { \n\n        \n    global.set(\"alarm.activated\",msg.timestamp);\n    global.set(\"alarm.state\",2);\n     \n\n} else {\n    \n    return null;\n}  \n\n    \nif (global.get(\"alarm.state\")>1) {   \n    \n    msg.payload = true; \n    \n    \n} else {   \n    \n    msg.payload = false; \n    \n    \n}\n\n\nreturn msg;","outputs":"1","noerr":0,"x":330,"y":1040,"wires":[["4eb6651c.ca350c","661f2a45.c1e734","8db96836.8c8b98"]]},{"id":"dc478040.8f2a1","type":"debug","z":"8377bea5.60c0b","name":"","active":true,"console":"false","complete":"false","x":770,"y":940,"wires":[]},{"id":"4eb6651c.ca350c","type":"ui_text","z":"8377bea5.60c0b","group":"e3629e5b.86b03","order":0,"width":0,"height":0,"name":"","label":"Alarm","format":"{{msg.payload}}","layout":"row-spread","x":510,"y":1200,"wires":[]},{"id":"6df269f6.4eb908","type":"function","z":"8377bea5.60c0b","name":"ohd0Dong","func":"msg.payload=\"Software JSON attached from ohd0Dong\";\nmsg.topic=global.get(\"alarm.description\") + \" on node ohd0Dong\";\n\nmsg.to=global.get(\"alarm.email\");\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":770,"y":1040,"wires":[["fd254168.d567c"]]},{"id":"fd254168.d567c","type":"link out","z":"8377bea5.60c0b","name":"","links":["6a42fb04.15b4f4"],"x":895,"y":1040,"wires":[]},{"id":"661f2a45.c1e734","type":"rbe","z":"8377bea5.60c0b","name":"","func":"rbe","gap":"","start":"","inout":"out","x":490,"y":1040,"wires":[["319d1c08.bcc7a4","8db96836.8c8b98"]]},{"id":"319d1c08.bcc7a4","type":"switch","z":"8377bea5.60c0b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","outputs":1,"x":610,"y":1040,"wires":[["6df269f6.4eb908","dc478040.8f2a1"]]},{"id":"8db96836.8c8b98","type":"debug","z":"8377bea5.60c0b","name":"","active":true,"console":"false","complete":"false","x":531.25,"y":950,"wires":[]},{"id":"e3629e5b.86b03","type":"ui_group","z":"","name":"Alarm Details","tab":"3acde22f.d864fe","order":4,"disp":true,"width":"6"},{"id":"3acde22f.d864fe","type":"ui_tab","z":"","name":"Alarms","icon":"dashboard"}]

automation phat

[{"id":"f13ecf89.2b5ad","type":"tab","label":"AutoPhat","disabled":false,"info":""},{"id":"ee3768b1.b8e648","type":"template","z":"f13ecf89.2b5ad","name":"python","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"#!/usr/bin/python\nimport time\nimport automationhat\nimport sys\nfrom sys import argv\nimport os.path\nimport os\n\ntry:\n\tscript, command, value = argv\nexcept ValueError:\n\tcommand = 'relay'\n\tvalue = '0'\n\noutput = 'error'\ncommand = 'relay'\n\nwhile 1==1:\n    time.sleep(5)\n    \n    if 1==1:\n        logFile = '/var/www/html/logs/automationphat.txt'\n        f1 = open(logFile, 'r')\n    \tusbuse = f1.read()\n#    \tprint usbuse\n    \tf1.close()\n    \tvalue,b,c = usbuse.split(',')\n\n    \t\n#    except:\n#    \tvalue = '0'\n    \n#    print command\n#    print value\n    if command == 'relay':\n    \tif value == '1':\n    \t\tautomationhat.relay.one.on()\n    \t\toutput = 'relay on'\n    \telif value == '0':\n    \t\tautomationhat.relay.one.off()\n    \t\toutput = 'relay off'\n    \n    print(\"%s,%s,%s,%s\" % (automationhat.analog.one.read(),automationhat.analog.two.read(),automationhat.analog.three.read(),output))\n    \n \n\n\n\n\n","output":"str","x":288,"y":81,"wires":[["d43925b4.057838"]]},{"id":"38ef97e2.c11c68","type":"inject","z":"f13ecf89.2b5ad","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":140,"y":80,"wires":[["ee3768b1.b8e648"]]},{"id":"d43925b4.057838","type":"file","z":"f13ecf89.2b5ad","name":"","filename":"/home/pi/node-hiu/automationphat.py","appendNewline":false,"createDir":true,"overwriteFile":"true","x":528,"y":81,"wires":[]},{"id":"672933b5.79e32c","type":"exec","z":"f13ecf89.2b5ad","command":"python /home/pi/node-hiu/automationphat.py","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":true,"name":"anain 2","x":380,"y":160,"wires":[["5fea12fa.d46c6c"],[],[]]},{"id":"7394647f.61427c","type":"inject","z":"f13ecf89.2b5ad","name":"","topic":"","payload":" anain 2","payloadType":"str","repeat":"","crontab":"","once":true,"x":160,"y":160,"wires":[["672933b5.79e32c"]]},{"id":"ec3e3980.218798","type":"debug","z":"f13ecf89.2b5ad","name":"","active":true,"console":"false","complete":"false","x":730,"y":160,"wires":[]},{"id":"de79b6c.48055c8","type":"inject","z":"f13ecf89.2b5ad","name":"kill","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"x":110,"y":220,"wires":[["f01c5f1a.35e4e"]]},{"id":"e2b7885c.8e4738","type":"comment","z":"f13ecf89.2b5ad","name":"install","info":"curl https://get.pimoroni.com/automationhat | bash","x":110,"y":620,"wires":[]},{"id":"e5e7eec.1798d1","type":"debug","z":"f13ecf89.2b5ad","name":"","active":true,"console":"false","complete":"false","x":650,"y":340,"wires":[]},{"id":"dfb795dc.bdae18","type":"range","z":"f13ecf89.2b5ad","minin":"0.5","maxin":"3.5","minout":"0","maxout":"100","action":"scale","round":false,"name":"Grundfos Temp","x":560,"y":260,"wires":[["7c3a636e.f51c1c"]]},{"id":"4215bc6d.5b7254","type":"function","z":"f13ecf89.2b5ad","name":"","func":"msg.payload=parseFloat(msg.payload.split(\",\")[1])\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":260,"wires":[["dfb795dc.bdae18"]]},{"id":"33599006.a52b7","type":"file","z":"f13ecf89.2b5ad","name":"","filename":"/var/www/html/logs/automationphat.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":490,"y":540,"wires":[]},{"id":"46773a95.f49064","type":"inject","z":"f13ecf89.2b5ad","name":"","topic":"","payload":"1,0,0","payloadType":"str","repeat":"","crontab":"","once":false,"x":190,"y":540,"wires":[["33599006.a52b7"]]},{"id":"feb655e8.b10788","type":"template","z":"f13ecf89.2b5ad","name":"python","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"#!/usr/bin/python\nimport time\nimport automationhat\nimport sys\n\nfrom sys import argv\n\n\ntry:\n\tscript, command, value = argv\nexcept ValueError:\n\tcommand = 'anain'\n\tvalue = '1'\n\noutput = 'error'\n\nif 1==1:\n    time.sleep(1)\n    \n    if command == 'relay':\n    \tif value == '1':\n    \t\tautomationhat.relay.one.on()\n    \t\toutput = 'relay on'\n    \telif value == '0':\n    \t\tautomationhat.relay.one.off()\n    \t\toutput = 'relay off'\n    \n    elif command == 'anain':\n    \tif value == '1':\n    \t\toutput = automationhat.analog.one.read()\n    \telif value == '2':\n    \t\toutput = automationhat.analog.two.read()\n    \telif value == '3':\n    \t\toutput = automationhat.analog.three.read()\n    \n    print(output)\n\n\n\n\n","output":"str","x":270,"y":40,"wires":[[]]},{"id":"4ba18423.e9c64c","type":"inject","z":"f13ecf89.2b5ad","name":"","topic":"","payload":"0,0,0","payloadType":"str","repeat":"","crontab":"","once":false,"x":190,"y":580,"wires":[["33599006.a52b7"]]},{"id":"f01c5f1a.35e4e","type":"change","z":"f13ecf89.2b5ad","name":"kill","rules":[{"t":"set","p":"kill","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":230,"y":220,"wires":[["672933b5.79e32c"]]},{"id":"5fea12fa.d46c6c","type":"switch","z":"f13ecf89.2b5ad","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":",","vt":"str"}],"checkall":"true","outputs":1,"x":530,"y":160,"wires":[["ec3e3980.218798","4215bc6d.5b7254"]]},{"id":"7c3a636e.f51c1c","type":"function","z":"f13ecf89.2b5ad","name":"","func":"msg.payload=parseInt(msg.payload*10) /10;\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":340,"wires":[["e5e7eec.1798d1"]]}]

Remote PC

Full

[{"id":"e119fc62.49d5f","type":"tab","label":"RLink","disabled":false,"info":""},{"id":"63fd2957.fe629","type":"mqtt in","z":"e119fc62.49d5f","name":"","topic":"ihiu/+/+/data","qos":"0","broker":"3548613c.89d736","x":190,"y":180,"wires":[["8451e246.45adf"]]},{"id":"4f5682fb.4bfc4c","type":"debug","z":"e119fc62.49d5f","name":"","active":false,"console":"false","complete":"false","x":630,"y":140,"wires":[]},{"id":"a363d946.4ae99","type":"serial out","z":"e119fc62.49d5f","name":"seroutdata","serial":"377de22e.11d6ae","x":1170,"y":180,"wires":[]},{"id":"cf3b1162.cc6ad8","type":"serial in","z":"e119fc62.49d5f","name":"","serial":"377de22e.11d6ae","x":170,"y":1020,"wires":[["1fe5eb25.79d4cd","fc36ef73.8dbc4","b6eab42d.85ce38","aeb08e66.d99218"]]},{"id":"c99aba0f.333898","type":"mqtt out","z":"e119fc62.49d5f","name":"","topic":"","qos":"0","retain":"false","broker":"3548613c.89d736","x":790,"y":1020,"wires":[]},{"id":"a9d4cabd.011f68","type":"catch","z":"e119fc62.49d5f","name":"","scope":["a363d946.4ae99"],"x":1020,"y":60,"wires":[[]]},{"id":"29a10aeb.9f8426","type":"debug","z":"e119fc62.49d5f","name":"","active":true,"console":"false","complete":"false","x":810,"y":1080,"wires":[]},{"id":"1fe5eb25.79d4cd","type":"change","z":"e119fc62.49d5f","name":"","rules":[{"t":"set","p":"usbtime","pt":"flow","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":960,"wires":[["1c09d52f.3e451b"]]},{"id":"7bc94753.7be1c8","type":"function","z":"e119fc62.49d5f","name":"anticipated in","func":"var usbtimediff = msg.usbtime - flow.get(\"usbtime\");\n\nif (usbtimediff>500 && usbtimediff<1100) { return [null,msg]; }\n\nreturn [msg,null];","outputs":"2","noerr":0,"x":810,"y":180,"wires":[["a363d946.4ae99"],["8c6c21d6.525fb"]]},{"id":"c038a55b.49344","type":"change","z":"e119fc62.49d5f","name":"","rules":[{"t":"set","p":"usbtime","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":180,"wires":[["7bc94753.7be1c8"]]},{"id":"8c6c21d6.525fb","type":"delay","z":"e119fc62.49d5f","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":990,"y":220,"wires":[["a363d946.4ae99"]]},{"id":"1c09d52f.3e451b","type":"function","z":"e119fc62.49d5f","name":"record","func":"\n\n//var ttt = msg.payload.toString();\n//msg.payload = ttt.charCodeAt(0) + \",\" + ttt.charCodeAt(1)  + \",\" +  ttt.charCodeAt(2)  + \",\" +  ttt.charCodeAt(3) + \",\" +  ttt.charCodeAt(4)  + \",\" +  ttt.charCodeAt(5)  + \",\" +  ttt.charCodeAt(6)  + \",\" +  ttt.charCodeAt(7)  + \",\" +  ttt.charCodeAt(8)  + \",\" +  ttt.charCodeAt(9); \n\n//flow.set(\"usbrecord\",(flow.get(\"usbrecord\")||\"time,data\\n\")+flow.get(\"usbtime\")+\",\"+msg.payload+\"\\n\");\n\nflow.set(\"usbrecord.\"+flow.get(\"usbtime\"), msg.payload);\n\n\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":960,"wires":[[]]},{"id":"dd51bfb3.313d68","type":"inject","z":"e119fc62.49d5f","name":"","topic":"","payload":"usbrecord","payloadType":"flow","repeat":"","crontab":"","once":false,"x":340,"y":560,"wires":[["b8632f8c.52bc7"]]},{"id":"3ace5e0a.a7ba62","type":"inject","z":"e119fc62.49d5f","name":"clear","topic":"","payload":"{}","payloadType":"str","repeat":"","crontab":"","once":true,"x":310,"y":500,"wires":[["10b27e85.456209"]]},{"id":"944a6d33.563fe8","type":"debug","z":"e119fc62.49d5f","name":"","active":false,"console":"false","complete":"false","x":720,"y":520,"wires":[]},{"id":"10b27e85.456209","type":"function","z":"e119fc62.49d5f","name":"","func":"flow.set(\"usbrecord\",{});\nreturn msg;","outputs":1,"noerr":0,"x":450,"y":500,"wires":[[]]},{"id":"b8632f8c.52bc7","type":"json","z":"e119fc62.49d5f","name":"","pretty":false,"x":520,"y":560,"wires":[["944a6d33.563fe8","260e0090.f9807"]]},{"id":"260e0090.f9807","type":"mqtt out","z":"e119fc62.49d5f","name":"","topic":"ihiu/testsystem1/node/recording/testsystem1","qos":"0","retain":"false","broker":"3548613c.89d736","x":820,"y":560,"wires":[]},{"id":"340c904f.fddfb","type":"inject","z":"e119fc62.49d5f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":500,"y":1080,"wires":[["fc36ef73.8dbc4"]]},{"id":"8451e246.45adf","type":"switch","z":"e119fc62.49d5f","name":"Eisi4vax","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"selectednode","vt":"flow"}],"checkall":"true","outputs":1,"x":340,"y":180,"wires":[["76b0d270.0e0bec"]]},{"id":"3d323b81.e82824","type":"function","z":"e119fc62.49d5f","name":"store readings","func":"\nif(!msg.topic) { return null; }\n\nmsg.network = msg.topic.split(\"/\")[0] ;\nmsg.node = msg.topic.split(\"/\")[1] ;\n\nmsg.hiu = msg.topic.split(\"/\")[2] ;\nif (msg.hiu==\"undefined\") { return null; }\nif (msg.hiu==\"node\") { return null; }\n\nmsg.group = msg.topic.split(\"/\")[3] ;\nmsg.topic = msg.topic.split(\"/\")[4] ;\n\nif (msg.group==\"local\") { msg.topic = \"n_\" + msg.topic; }\n\nif (!flow.get(\"readings\")) { flow.set(\"readings\", {}); }\n\nif (!flow.get(\"readings.\"+msg.hiu)) { \n    flow.set(\"readings.\"+msg.hiu, {}); \n    flow.set(\"readings.\"+msg.hiu+\".system\", {});\n}\n\nflow.set(\"readings.\"+msg.hiu+\".system.node\", msg.node);\nflow.set(\"readings.\"+msg.hiu+\".system.network\", msg.network);\nflow.set(\"readings.\"+msg.hiu+\".system.Serial\", msg.hiu);\n\nvar today = new Date();\nflow.set(\"readings.\"+msg.hiu+\".system.lastcontact\", today.toString().split(\"GMT\")[0]);\n\nflow.set(\"readings.\"+msg.hiu+\".system.usb\", msg.payload);  \n\n\n//if(msg.hiu!=flow.get(\"selectedhiu\")) { return null; }\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":100,"wires":[[]]},{"id":"d595a286.89b78","type":"change","z":"e119fc62.49d5f","name":"","rules":[{"t":"set","p":"selectedhiu","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":850,"y":860,"wires":[["bba889d7.cd2158"]]},{"id":"8ddb18e1.9f5ab8","type":"ui_template","z":"e119fc62.49d5f","group":"e6029533.137868","name":"","order":0,"width":"6","height":"9","format":"","storeOutMessages":true,"fwdInMessages":false,"templateScope":"local","x":640,"y":800,"wires":[["d595a286.89b78"]]},{"id":"f28ef2e9.1f153","type":"change","z":"e119fc62.49d5f","name":"","rules":[{"t":"set","p":"template","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":800,"wires":[["8ddb18e1.9f5ab8"]]},{"id":"d68e88d2.adb358","type":"function","z":"e119fc62.49d5f","name":"","func":"var htmlt = '<table width=\"100%\" cellpadding=\"5\">';\n\nvar hiudata = flow.get(\"readings\");\n\nfor (var key in hiudata) {\n    \n    var shortkey = key.substr(0,6) + \"...\" + key.substr(-6);\n    \n    var lk = \"send({payload:action('\" + key + \"')})\";\n    htmlt += '<tr><td width=\"100%\">';\n    //if(flow.get(\"selectedhiu\")==key) { htmlt += '*'; }  \n    htmlt += '<md-button ng-click=\"' + lk + '\">'\n    htmlt += hiudata[key].system.node + \".\" + hiudata[key].system.usb + \".\" +shortkey;\n    htmlt += '</md-button>';\n    if(flow.get(\"selectedhiu\")==key) { htmlt += '*'; }  \n    htmlt += '</td></tr>';\n\n    \n}\nhtmlt += '</table>';\n\n\n\nmsg.payload+=htmlt;\n\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":800,"wires":[["f28ef2e9.1f153"]]},{"id":"550777bf.a6e348","type":"template","z":"e119fc62.49d5f","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<script>\nvar value = \"hello world\";\n// or overwrite value in your callback function ...\nthis.scope.action = function(hiu) { return hiu; }\n</script>\n","output":"str","x":150,"y":800,"wires":[["d68e88d2.adb358"]]},{"id":"f061bb5c.cc74f8","type":"inject","z":"e119fc62.49d5f","name":"","topic":"","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"x":130,"y":720,"wires":[["550777bf.a6e348"]]},{"id":"623c72f4.3aa01c","type":"mqtt in","z":"e119fc62.49d5f","name":"","topic":"ihiu/+/+/+/usb","qos":"0","broker":"3548613c.89d736","x":190,"y":100,"wires":[["3d323b81.e82824","f646871e.f6eb18"]]},{"id":"f646871e.f6eb18","type":"debug","z":"e119fc62.49d5f","name":"","active":true,"console":"false","complete":"false","x":430,"y":40,"wires":[]},{"id":"fc36ef73.8dbc4","type":"function","z":"e119fc62.49d5f","name":"","func":"\nvar usb = flow.get(\"readings.\"+flow.get(\"selectedhiu\")+\".system.usb\");\nvar node = flow.get(\"readings.\"+flow.get(\"selectedhiu\")+\".system.node\");\nmsg.topic=\"ihiu/\"+ node +\"/\"+ usb +\"/remote\";\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":1020,"wires":[["c99aba0f.333898","29a10aeb.9f8426"]]},{"id":"3ca7131a.dc66fc","type":"inject","z":"e119fc62.49d5f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 00 * * 1","once":false,"x":350,"y":700,"wires":[["2fd548da.1aa1a8"]]},{"id":"2fd548da.1aa1a8","type":"function","z":"e119fc62.49d5f","name":"initialise","func":"flow.set(\"readings\",{});\nflow.set(\"graphs\",{});\nreturn msg;","outputs":1,"noerr":0,"x":520,"y":700,"wires":[[]]},{"id":"bba889d7.cd2158","type":"function","z":"e119fc62.49d5f","name":"","func":"var node = flow.get(\"readings.\"+msg.payload+\".system.node\");\nvar usb = flow.get(\"readings.\"+msg.payload+\".system.usb\");\nflow.set(\"selectednode\",node);\nflow.set(\"selectedusb\",usb);\nmsg.payload=node;\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":920,"wires":[["b926de9b.91d91","fc36ef73.8dbc4"]]},{"id":"b926de9b.91d91","type":"debug","z":"e119fc62.49d5f","name":"","active":true,"console":"false","complete":"false","x":1090,"y":920,"wires":[]},{"id":"76b0d270.0e0bec","type":"switch","z":"e119fc62.49d5f","name":"Eisi4vax","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"selectedusb","vt":"flow"}],"checkall":"true","outputs":1,"x":480,"y":180,"wires":[["c038a55b.49344","4f5682fb.4bfc4c","86b3628c.672c5"]]},{"id":"ae8686cb.a0c128","type":"ui_template","z":"e119fc62.49d5f","group":"38fae3e9.c6b86c","name":"","order":0,"width":"6","height":"9","format":"<small><div ng-bind-html=\"msg.payload\"></div></small>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":960,"y":360,"wires":[[]]},{"id":"3d0dfdec.3b6cb2","type":"function","z":"e119fc62.49d5f","name":"","func":"msg.payload = '<table width=\"100%\"><tr><td>' + msg.payload+ '</td></tr></table>';\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":360,"wires":[["27cdb699.09463a"]]},{"id":"86b3628c.672c5","type":"join","z":"e119fc62.49d5f","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"<br />","joinerType":"str","accumulate":false,"timeout":"0.5","count":"","x":470,"y":260,"wires":[["3d0dfdec.3b6cb2"]]},{"id":"481454f.da770ac","type":"ui_template","z":"e119fc62.49d5f","group":"ba6005f2.507178","name":"","order":1,"width":"6","height":"7","format":"<small><div ng-bind-html=\"msg.payload\"></div></small>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":500,"y":920,"wires":[[]]},{"id":"27cdb699.09463a","type":"change","z":"e119fc62.49d5f","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"\\n","fromt":"str","to":"<br />","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":",","fromt":"str","to":"   ","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":360,"wires":[["ae8686cb.a0c128"]]},{"id":"b6eab42d.85ce38","type":"function","z":"e119fc62.49d5f","name":"","func":"\n\nvar history = flow.get(\"history\") || \"\";\n\n//var str = msg.payload.toString('utf8');\n//var linin = str.charCodeAt(0) + \" \" + str.charCodeAt(1)  + \" \" + str.charCodeAt(2) + \" \" + str.charCodeAt(3) + \" \" + str.charCodeAt(4) + \" \" + str.charCodeAt(5) + \" \" + str.charCodeAt(6) + \" \" + str.charCodeAt(7) + \" \" + str.charCodeAt(8) + \" \" + str.charCodeAt(9);\n//history += linin + \"<br />\" ;\n\n//var textChunk = msg.payload.toString('utf8');\n\nlinin = msg.payload[0] + \" \" + msg.payload[1] + \" \" + msg.payload[2]  + \" \" + msg.payload[3]  + \" \" + msg.payload[4]  + \" \" + msg.payload[5]  + \" \" + msg.payload[6]  + \" \" + msg.payload[7]  + \" \" + msg.payload[8] + \" \" + msg.payload[9];\nhistory += linin + \"<br />\" ;\n\n\n\nflow.set(\"history\", history);\n\nmsg.payload = history;\n\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":920,"wires":[["481454f.da770ac","aeb08e66.d99218"]]},{"id":"aeb08e66.d99218","type":"debug","z":"e119fc62.49d5f","name":"","active":true,"console":"false","complete":"false","x":410,"y":1200,"wires":[]},{"id":"a8c88540.a492b","type":"ui_button","z":"e119fc62.49d5f","name":"","group":"ba6005f2.507178","order":2,"width":0,"height":0,"passthru":false,"label":"Clear","color":"","bgcolor":"","icon":"","payload":" ","payloadType":"str","topic":"","x":350,"y":880,"wires":[["481454f.da770ac"]]},{"id":"70918b07.e0b314","type":"mqtt out","z":"e119fc62.49d5f","name":"","topic":"ihiu/testsystem1/node/recording/testsystem1","qos":"0","retain":"false","broker":"3548613c.89d736","x":610,"y":1260,"wires":[]},{"id":"e4cef19d.50b1f","type":"ui_button","z":"e119fc62.49d5f","name":"","group":"ba6005f2.507178","order":2,"width":0,"height":0,"passthru":false,"label":"Save","color":"","bgcolor":"","icon":"","payload":" ","payloadType":"str","topic":"","x":150,"y":1260,"wires":[["96940e0d.8e6f8"]]},{"id":"96940e0d.8e6f8","type":"change","z":"e119fc62.49d5f","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"history","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":1260,"wires":[["70918b07.e0b314"]]},{"id":"3548613c.89d736","type":"mqtt-broker","z":"","broker":"mqtt.heatweb.com","port":"10031","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"377de22e.11d6ae","type":"serial-port","z":"","serialport":"/dev/ttyUSB0","serialbaud":"115200","databits":"8","parity":"none","stopbits":"1","newline":"10","bin":"bin","out":"count","addchar":false},{"id":"e6029533.137868","type":"ui_group","z":"","name":"HIUs","tab":"22cf85c5.0bb7ca","order":1,"disp":true,"width":"6"},{"id":"38fae3e9.c6b86c","type":"ui_group","z":"","name":"HIU Data","tab":"22cf85c5.0bb7ca","order":2,"disp":true,"width":"6"},{"id":"ba6005f2.507178","type":"ui_group","z":"","name":"PC Data","tab":"22cf85c5.0bb7ca","order":3,"disp":true,"width":"6"},{"id":"22cf85c5.0bb7ca","type":"ui_tab","z":"","name":"Remote Link","icon":"backup"}]


Basic

[{"id":"e119fc62.49d5f","type":"tab","label":"RLink","disabled":false,"info":""},{"id":"63fd2957.fe629","type":"mqtt in","z":"e119fc62.49d5f","name":"","topic":"ihiu/testsystem1/usb0/data","qos":"0","broker":"3548613c.89d736","x":270,"y":120,"wires":[["4f5682fb.4bfc4c","c038a55b.49344"]]},{"id":"4f5682fb.4bfc4c","type":"debug","z":"e119fc62.49d5f","name":"","active":true,"console":"false","complete":"false","x":490,"y":60,"wires":[]},{"id":"a363d946.4ae99","type":"serial out","z":"e119fc62.49d5f","name":"seroutdata","serial":"377de22e.11d6ae","x":1030,"y":120,"wires":[]},{"id":"cf3b1162.cc6ad8","type":"serial in","z":"e119fc62.49d5f","name":"","serial":"377de22e.11d6ae","x":210,"y":380,"wires":[["29a10aeb.9f8426","e97d276c.2dd5c8","c99aba0f.333898","1fe5eb25.79d4cd"]]},{"id":"c99aba0f.333898","type":"mqtt out","z":"e119fc62.49d5f","name":"","topic":"ihiu/testsystem1/usb0/remote","qos":"0","retain":"false","broker":"3548613c.89d736","x":480,"y":300,"wires":[]},{"id":"a9d4cabd.011f68","type":"catch","z":"e119fc62.49d5f","name":"","scope":["a363d946.4ae99"],"x":1020,"y":60,"wires":[[]]},{"id":"29a10aeb.9f8426","type":"debug","z":"e119fc62.49d5f","name":"","active":true,"console":"false","complete":"false","x":410,"y":380,"wires":[]},{"id":"e97d276c.2dd5c8","type":"join","z":"e119fc62.49d5f","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"20","count":"","x":390,"y":440,"wires":[["1da514b8.7cd63b"]]},{"id":"1da514b8.7cd63b","type":"change","z":"e119fc62.49d5f","name":"","rules":[{"t":"set","p":"usbrecord","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":440,"wires":[["4492de34.856a68"]]},{"id":"4492de34.856a68","type":"debug","z":"e119fc62.49d5f","name":"","active":true,"console":"false","complete":"false","x":790,"y":440,"wires":[]},{"id":"1fe5eb25.79d4cd","type":"change","z":"e119fc62.49d5f","name":"","rules":[{"t":"set","p":"usbtime","pt":"flow","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":260,"wires":[[]]},{"id":"7bc94753.7be1c8","type":"function","z":"e119fc62.49d5f","name":"anticipated in","func":"var usbtimediff = msg.usbtime - flow.get(\"usbtime\");\n\nif (usbtimediff>500 && usbtimediff<1100) { return [null,msg]; }\n\nreturn [msg,null];","outputs":"2","noerr":0,"x":670,"y":120,"wires":[["a363d946.4ae99"],["8c6c21d6.525fb"]]},{"id":"c038a55b.49344","type":"change","z":"e119fc62.49d5f","name":"","rules":[{"t":"set","p":"usbtime","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":120,"wires":[["7bc94753.7be1c8"]]},{"id":"8c6c21d6.525fb","type":"delay","z":"e119fc62.49d5f","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":850,"y":160,"wires":[["a363d946.4ae99"]]},{"id":"3548613c.89d736","type":"mqtt-broker","z":"","broker":"mqtt.heatweb.com","port":"10031","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"377de22e.11d6ae","type":"serial-port","z":"","serialport":"/dev/ttyUSB0","serialbaud":"115200","databits":"8","parity":"none","stopbits":"1","newline":"10","bin":"bin","out":"count","addchar":false}]


[{"id":"8d9eec49.a62fd","type":"tab","label":"RLink","disabled":false,"info":""},{"id":"4461fcf2.8e8bcc","type":"mqtt in","z":"8d9eec49.a62fd","name":"","topic":"ihiu/xaCho7od/usb1/data","qos":"0","broker":"21d5b6ce.b50c4a","x":210,"y":120,"wires":[["498f8ec2.ff2ac","7d161322.e1becc","7c7bdd7f.286e54"]]},{"id":"498f8ec2.ff2ac","type":"debug","z":"8d9eec49.a62fd","name":"","active":false,"console":"false","complete":"false","x":490,"y":120,"wires":[]},{"id":"7d161322.e1becc","type":"serial out","z":"8d9eec49.a62fd","name":"seroutdata","serial":"756df2f3.3749dc","x":490,"y":180,"wires":[]},{"id":"d5c652db.0145f8","type":"serial in","z":"8d9eec49.a62fd","name":"","serial":"756df2f3.3749dc","x":190,"y":340,"wires":[["8ac6a8e.3639b58","b37b0deb.cf11e8"]]},{"id":"8ac6a8e.3639b58","type":"mqtt out","z":"8d9eec49.a62fd","name":"","topic":"ihiu/xaCho7od/usb1/remote","qos":"0","retain":"false","broker":"21d5b6ce.b50c4a","x":450,"y":340,"wires":[]},{"id":"98bb2f87.6971b","type":"catch","z":"8d9eec49.a62fd","name":"","scope":["7d161322.e1becc"],"x":480,"y":240,"wires":[[]]},{"id":"7c7bdd7f.286e54","type":"link out","z":"8d9eec49.a62fd","name":"datain","links":["dc580a25.26f7e8"],"x":435,"y":60,"wires":[]},{"id":"2bab6e02.232fea","type":"function","z":"8d9eec49.a62fd","name":"set HIU","func":" \n var tosend = \"\";\n \n var msg2 = {};\n \n function convertSet(setp) {\n     \n     \n    var setdec = 100 * parseFloat(setp);\n\t\n    var b3 = Math.floor(setdec / 256);\n    var b4 = setdec % 256;\n\n    var cs = String.fromCharCode(0) +  String.fromCharCode(0) + String.fromCharCode(parseInt(b3)) + String.fromCharCode(parseInt(b4)) ;\n\t\n\treturn cs;\n\n }\n \n if (msg.topic.indexOf(\"/CentralHeatingControl\")>0) {\n \n    if (msg.payload === \"1\") { \n        \n        tosend = String.fromCharCode(83) + String.fromCharCode(89) + String.fromCharCode(78) + String.fromCharCode(67) + String.fromCharCode(38) + String.fromCharCode(1) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(59);\n \n    } else { \n        \n        tosend = String.fromCharCode(83) + String.fromCharCode(89) + String.fromCharCode(78) + String.fromCharCode(67) + String.fromCharCode(38) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(59);\n        \n    }\n\n}\nelse if (msg.topic.indexOf(\"/EcoMode\")>0) {\n \n    if (msg.payload === \"1\") { \n        \n        tosend = String.fromCharCode(83) + String.fromCharCode(89) + String.fromCharCode(78) + String.fromCharCode(67) + String.fromCharCode(10) + String.fromCharCode(1) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(59);\n \n    } else { \n        \n        tosend = String.fromCharCode(83) + String.fromCharCode(89) + String.fromCharCode(78) + String.fromCharCode(67) + String.fromCharCode(10) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(59);\n        \n    }\n\n}\nelse if (msg.topic.indexOf(\"/setpoint\")>0) {\n\n    tosend = String.fromCharCode(83) + String.fromCharCode(89) + String.fromCharCode(78) + String.fromCharCode(67) + String.fromCharCode(9) + convertSet(msg.payload) + String.fromCharCode(59);\n\n}\nelse if (msg.topic.indexOf(\"/DHWExchangerEcoHeatTemperature\")>0) {\n\n    tosend = String.fromCharCode(83) + String.fromCharCode(89) + String.fromCharCode(78) + String.fromCharCode(67) + String.fromCharCode(33) + convertSet(msg.payload) + String.fromCharCode(59);\n\n}\nelse if (msg.topic == \"setpoint\") {\n\n\n    var setdec = 100 * parseFloat(msg.payload);\n\t\n    var b3 = Math.floor(setdec / 256);\n    var b4 = setdec % 256;\n\n\n    tosend = String.fromCharCode(83) + String.fromCharCode(89) + String.fromCharCode(78) + String.fromCharCode(67) + String.fromCharCode(9) + String.fromCharCode(0) +  String.fromCharCode(0) + String.fromCharCode(parseInt(b3)) + String.fromCharCode(parseInt(b4)) + String.fromCharCode(59);\n\t\n    \n    msg2.payload = \"setdec \" + b3 + \" .. \" + b4;\n    \n\n    return null; // DISABLED TEMP CONTROL\n\n}\nelse { return null;  }\n\n\n\nmsg.payload = tosend;\n\nreturn msg;\n\n","outputs":"1","noerr":0,"x":260,"y":540,"wires":[["d227a6e0.a0a978","a68f9149.851aa8"]]},{"id":"d227a6e0.a0a978","type":"trigger","z":"8d9eec49.a62fd","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"0.1","extend":true,"units":"s","reset":"","name":"","x":468.36088943481445,"y":501.722279548645,"wires":[["a791ea19.71ae7"]]},{"id":"a791ea19.71ae7","type":"function","z":"8d9eec49.a62fd","name":"store HIU","func":"var tosend = String.fromCharCode(83) + String.fromCharCode(89) + String.fromCharCode(78) + String.fromCharCode(67) + String.fromCharCode(13) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(59)\n\nmsg.payload = tosend;\n\nreturn msg;\n","outputs":1,"noerr":0,"x":637.3609809875488,"y":501.6110429763794,"wires":[["a68f9149.851aa8"]]},{"id":"a68f9149.851aa8","type":"function","z":"8d9eec49.a62fd","name":"pass","func":"msg.topic=msg.usb;\nreturn msg;","outputs":1,"noerr":0,"x":790,"y":540,"wires":[["9d40ecfc.5de5c","c86bcdab.6db8d"]]},{"id":"9d40ecfc.5de5c","type":"mqtt out","z":"8d9eec49.a62fd","name":"","topic":"ihiu/wharncliffe1/usb0/remote","qos":"0","retain":"false","broker":"21d5b6ce.b50c4a","x":1020,"y":540,"wires":[]},{"id":"3ca04ca6.04e60c","type":"inject","z":"8d9eec49.a62fd","name":"","topic":"set/DHWExchangerEcoHeatTemperature","payload":"40","payloadType":"num","repeat":"","crontab":"","once":false,"x":90,"y":540,"wires":[["2bab6e02.232fea"]]},{"id":"c86bcdab.6db8d","type":"mqtt out","z":"8d9eec49.a62fd","name":"","topic":"ihiu/wharncliffe1/remote","qos":"0","retain":"false","broker":"21d5b6ce.b50c4a","x":1010,"y":500,"wires":[]},{"id":"b37b0deb.cf11e8","type":"debug","z":"8d9eec49.a62fd","name":"","active":true,"console":"false","complete":"false","x":382.4499816894531,"y":293.5833435058594,"wires":[]},{"id":"21d5b6ce.b50c4a","type":"mqtt-broker","z":"","broker":"mqtt.heatweb.com","port":"10031","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"756df2f3.3749dc","type":"serial-port","z":"","serialport":"/dev/ttyUSB0","serialbaud":"115200","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false}]
[{"id":"4b77f91.f408008","type":"subflow","name":"Log","info":"","in":[{"x":140,"y":270,"wires":[{"id":"14b9e2c9.b6a2cd"}]}],"out":[]},{"id":"14b9e2c9.b6a2cd","type":"function","z":"4b77f91.f408008","name":"","func":"var today = new Date();\nvar dd = today.getDate();\nvar mm = today.getMonth()+1; //January is 0!\n\nvar yyyy = today.getFullYear();\nif(dd<10){\n    dd='0'+dd;\n} \nif(mm<10){\n    mm='0'+mm;\n} \nvar today = yyyy+\"\"+mm+\"\"+dd;\n\n\nmsg.filename=global.get(\"boot.logs\") || \"/var/www/html/logs/\";\n\n\nmsg.filename += \"nodered_\"+msg.topic+\"_\"+today+\".txt\";\n\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":320.83677673339844,"y":270.8055725097656,"wires":[["b7e7c310.b0824"]]},{"id":"b7e7c310.b0824","type":"file","z":"4b77f91.f408008","name":"","filename":"","appendNewline":true,"createDir":false,"overwriteFile":"false","x":522.8402557373047,"y":269.4653015136719,"wires":[]},{"id":"3d0a40a7.66aa4","type":"subflow","name":"html table","info":"","in":[{"x":100,"y":180,"wires":[{"id":"790d9c49.fccc04"}]}],"out":[{"x":380,"y":180,"wires":[{"id":"790d9c49.fccc04","port":0}]}]},{"id":"790d9c49.fccc04","type":"function","z":"3d0a40a7.66aa4","name":"htmltable","func":"var htmlt = '<table width=\"100%\">';\n\nfor (var key in msg.payload) {\n    \n    \n    htmlt += '<tr><td>' + key.replace(/_/g, ' ') + '</td><td align=\"right\">' + msg.payload[key] + '</td></tr>';\n}\n\nhtmlt += '<table>';\n\nmsg.payload=htmlt;\n\nreturn msg;","outputs":1,"noerr":0,"x":240,"y":180,"wires":[[]]},{"id":"c69445a1.8298f8","type":"tab","label":"Flow 1"},{"id":"41abe852.00f138","type":"function","z":"c69445a1.8298f8","name":"DAT","func":"var DAT = msg.payload.split(',');\n\nvar msg1 = {}; msg1.payload = {};\n\nmsg.payload = {};\n\nmsg.topic = \"DATlog\";\nvar ts = Math.round((new Date()).getTime() / 1000);\nmsg.payload.time = ts;\n\nmsg.payload.st = DAT[2];  // state\nvar msg2 = {}; msg2.payload = DAT[2];\nmsg2.topic = \"Flow Temperature\";\n\nmsg.payload.fC = Math.round( parseFloat(DAT[3]) * 10 ) / 10 ;  // Flow Tapping (l/min)\nvar msg3 = {}; msg3.payload = msg.payload.fC;\nmsg3.topic = \"fC\";\n\n\nmsg.payload.tCo = Math.round( parseFloat(DAT[4]) * 10 ) / 10 ;  // Temperature Tapping (°C)\nvar msg4 = {}; msg4.payload = parseFloat(DAT[4]);\nmsg4.topic = \"tCo\";\n\n\nvar ts = Math.round((new Date()).getTime() / 1000);\nvar lastfC = global.get(\"readings.fC\") || 0;\n\nif (msg.payload.fC>0 && lastfC===0) {  \n    \n    context.set('lastOn',ts);  \n    global.set('timeto45',0);\n}\n\nif (msg.payload.fC===0) { \n    \n    context.set('lastOff',ts);\n    msg.payload.fCtime = 0;\n    \n    \n    \n} else {  \n    \n    msg.payload.fCtime = ts - (context.get('lastOn') || 0); \n    \n    if (msg.payload.tCo<45) { global.set('timeto45', msg.payload.fCtime);  }\n}\n\n\n\n\nmsg.payload.tH = Math.round( parseFloat(DAT[5]) * 10 ) / 10 ;  // Temperature District Heating (°C)\nvar msg5 = {}; msg5.payload = parseFloat(DAT[5]);\nmsg5.topic = \"tH\";\n\nmsg.payload.tHoCH = Math.round( parseFloat(DAT[6]) * 10 ) / 10 ;  // Temperature DH Return CH (°C)\nvar msg6 = {}; msg6.payload = parseFloat(DAT[6]);\nmsg6.topic = \"tHoCH\";\n\nmsg.payload.xDHW = DAT[7];  // Stepper Motor Position for DHW (0 - 270)\nvar msg7 = {}; msg7.payload = DAT[7];\nmsg7.topic = \"xDHW\";\n\nmsg.payload.stat = DAT[8];  // Thermostat (0.0 OFF<br>1.0 ON )\nvar msg8 = {}; msg8.payload = DAT[8];\nmsg8.topic = \"stst\";\n\nmsg.payload.dpH = DAT[9];  // District Heating pressure, estimated (bar)\nvar msg9 = {}; msg9.payload = DAT[9];\nmsg9.topic = \"dpH\";\n\nmsg.payload.r1 = DAT[10];  // District Heating pressure, estimated (bar)\nvar msg10 = {}; msg10.payload = DAT[10];\nmsg10.topic = \"r1\";\n\nmsg.payload.r2 = DAT[11];  // District Heating pressure, estimated (bar)\nvar msg11 = {}; msg11.payload = DAT[11];\nmsg11.topic = \"r2\";\n\nmsg.payload.r3 = DAT[12];  // District Heating pressure, estimated (bar)\nvar msg12 = {}; msg12.payload = DAT[12];\nmsg12.topic = \"r3\";\n\nmsg.payload.fHDHW = parseFloat(DAT[13]);  // District Heating Flow, DHW (l/min)\nvar msg13 = {}; msg13.payload = parseFloat(DAT[13]);\nmsg13.topic = \"fHDHW\";\n\nmsg.payload.eT = Math.round( parseFloat(DAT[14]) * 10 ) / 10 ;  // Temperature Error (°C)\nvar msg14 = {}; msg14.payload = parseFloat(DAT[14]);\nmsg14.topic = \"eT\";\n\n\nmsg.payload.r4 = DAT[15];  // District Heating pressure, estimated (bar)\nvar msg15 = {}; msg15.payload = DAT[15];\nmsg15.topic = \"r4\";\n\nmsg.payload.TTdhw = DAT[16];  // Setpoint(°C)\nvar msg16 = {}; msg16.payload = DAT[16];\nmsg16.topic = \"TTdhw\";\n\nmsg.payload.eS = DAT[17];  // ErrorStatus\nvar msg17 = {}; msg17.payload = DAT[17];\nmsg17.topic = \"eS\";\n\nmsg.payload.tHoDHW = Math.round( parseFloat(DAT[18]) * 10 ) / 10 ;  // District Heating Return temperature (°C)\nvar msg18 = {}; msg18.payload = parseFloat(DAT[18]);\nmsg18.topic = \"tHoDHW\";\n\nmsg.payload.tCHo = Math.round( parseFloat(DAT[19]) * 10 ) / 10 ;  // Grundfos temperature (°C) -> central heating T   \nvar msg19 = {}; msg19.payload = parseFloat(DAT[19]);\nmsg19.topic = \"tCHo\";\n\nmsg.payload.r5 = DAT[20];  // District Heating pressure, estimated (bar)\nvar msg20 = {}; msg20.payload = DAT[20];\nmsg20.topic = \"r5\";\n\nmsg.payload.pCH = Math.round( parseFloat(DAT[21]) * 10 ) / 10 ;   // Grundfos pressure (bar) [1.1 - 2.5]\nvar msg21 = {}; msg21.payload = Math.round( parseFloat(DAT[21]) * 10 ) / 10 ; \nmsg21.topic = \"pCH\";\n\nmsg.payload.r6 = DAT[22];  // District Heating pressure, estimated (bar)\nvar msg22 = {}; msg22.payload = DAT[22];\nmsg22.topic = \"r6\";\n\nmsg.payload.pump = DAT[23];  // Valve 24V Out(1 open<br>0 close)-> pump\nvar msg23 = {}; msg23.payload = parseFloat(DAT[23]);\nmsg23.topic = \"pump\";\n\nmsg.payload.xCH = DAT[24];  // Stepper Motor Position for CH (0 - 270)\nvar msg24 = {}; msg24.payload = parseFloat(DAT[24]);\nmsg24.topic = \"xCH\";\n\nmsg.payload.fHCH = DAT[25];  // District Heating Flow, CH (l/min)\nvar msg25 = {}; msg25.payload = parseFloat(DAT[25]);\nmsg25.topic = \"fHCH\";\n\n\nglobal.set(\"readings\",msg.payload);\n\n\nreturn [msg,msg1,msg2,msg3,msg4,msg5,msg6,msg7,msg8,msg9,msg10,msg11,msg12,msg13,msg14,msg15,msg16,msg17,msg18,msg19,msg20,msg21,msg22,msg23,msg24,msg25];","outputs":"26","noerr":0,"x":254.67444229125977,"y":1068.8864212036133,"wires":[["c0dce072.68bbe","93adf4c8.5d7818"],[],[],["61b635d7.7f34ec","11d76d63.8f2e93"],["11d76d63.8f2e93"],["11d76d63.8f2e93","d93c0381.bb926"],["f3e6c796.950b98"],[],[],["5b96b6eb.7136d8"],[],[],[],["9ab6c3ef.6ad5"],[],[],["11d76d63.8f2e93"],[],["8b823998.42aeb8"],[],[],["f75103e1.73cc2"],[],["7c641918.049af8"],[],["7000ba25.3f9eb4"]]},{"id":"db8ff4b0.d99138","type":"switch","z":"c69445a1.8298f8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"DAT,","vt":"str"},{"t":"cont","v":"STAT,","vt":"str"},{"t":"cont","v":"PARAM,","vt":"str"},{"t":"cont","v":"Command","vt":"str"},{"t":"cont","v":"HEATER","vt":"str"},{"t":"cont","v":":","vt":"str"}],"checkall":"false","outputs":6,"x":214.67444229125977,"y":248.88642120361328,"wires":[["41abe852.00f138"],["494d0124.178f1"],["f0129271.261c2"],[],[],["f0034561.820988","c1a270b6.d7a3"]]},{"id":"c0dce072.68bbe","type":"trigger","z":"c69445a1.8298f8","op1":"","op2":"","op1type":"pay","op2type":"nul","duration":"10","extend":false,"units":"s","reset":"","name":"","x":440.6848793029785,"y":905.7890396118164,"wires":[["69de98b9.e2fc98"]]},{"id":"93adf4c8.5d7818","type":"function","z":"c69445a1.8298f8","name":"","func":"var htmlt = '<table width=\"100%\">';\n\nfor (var key in msg.payload) {\n    htmlt += '<tr><td>' + key + '</td><td align=\"right\">' + msg.payload[key] + '</td></tr>';\n}\n\nhtmlt += '<table>';\n\nmsg.payload=htmlt;\n\nreturn msg;","outputs":1,"noerr":0,"x":289.1883087158203,"y":1459.5425186157227,"wires":[["8f8b3f3a.6e937"]]},{"id":"61b635d7.7f34ec","type":"rbe","z":"c69445a1.8298f8","name":"","func":"rbe","gap":"","start":"","inout":"out","x":876.1146240234375,"y":946.7355117797852,"wires":[["81d81556.0c7b68"]]},{"id":"11d76d63.8f2e93","type":"function","z":"c69445a1.8298f8","name":"","func":"if(msg.topic==\"fC\") { msg.topic=\"Flow rate [ltr/min]\"; }\nelse if(msg.topic==\"tCo\") { msg.topic=\"Water temperature [°C]\"; }\nelse if(msg.topic==\"TTdhw\") { msg.topic=\"Set temperature [°C]\"; }\nelse if(msg.topic==\"tH\") { msg.topic=\"Primary temperature [°C]\"; }\n\n\n\n\nif (global.get(\"readings.fC\")===0) { \n    \n    if (context.get(\"turnedoff\")===true) { return null; }\n\n    context.set(\"turnedoff\",true);\n    \n} else {\n    \n    context.set(\"turnedoff\",false);\n}\n\nif (global.get(\"readings.fCtime\")>60) { \n    \n    \n\n    return null; \n    \n}\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":657.1882400512695,"y":1116.0981216430664,"wires":[["f11c7873.e12f18"]]},{"id":"d93c0381.bb926","type":"trigger","z":"c69445a1.8298f8","op1":"","op2":"","op1type":"pay","op2type":"nul","duration":"5","extend":false,"units":"s","reset":"","name":"","x":649.5147171020508,"y":1000.8688659667969,"wires":[["cb9afadd.f2fcc8"]]},{"id":"f3e6c796.950b98","type":"trigger","z":"c69445a1.8298f8","op1":"","op2":"","op1type":"pay","op2type":"nul","duration":"5","extend":false,"units":"s","reset":"","name":"","x":650.6813430786133,"y":1033.8689880371094,"wires":[["cb9afadd.f2fcc8"]]},{"id":"5b96b6eb.7136d8","type":"ui_template","z":"c69445a1.8298f8","group":"80677809.00f498","name":"dp","order":1,"width":0,"height":0,"format":"<div layout=\"row\" layout-align=\"space-between\">\n    <p>Primary Differential</p>\n    <p ng-style=\"{color: (msg.payload || 0) <0.5 ? 'red' : 'lightgreen'}\">\n        {{msg.payload + \" bar\"}}\n    </p>\n</div>","storeOutMessages":true,"fwdInMessages":true,"x":387.2222442626953,"y":1037.1631240844727,"wires":[[]]},{"id":"9ab6c3ef.6ad5","type":"ui_gauge","z":"c69445a1.8298f8","name":"","group":"80677809.00f498","order":3,"width":"3","height":"3","gtype":"gage","title":"DHW","label":"ltr/min","format":"{{value}}","min":0,"max":"30","colors":["#6783f3","#35e203","#ca3838"],"seg1":"10","seg2":"20","x":448.84454345703125,"y":1137.2055940628052,"wires":[]},{"id":"8b823998.42aeb8","type":"trigger","z":"c69445a1.8298f8","op1":"","op2":"","op1type":"pay","op2type":"nul","duration":"5","extend":false,"units":"s","reset":"","name":"","x":653.6813430786133,"y":1067.8689880371094,"wires":[["cb9afadd.f2fcc8"]]},{"id":"f75103e1.73cc2","type":"ui_template","z":"c69445a1.8298f8","group":"981056cf.d9a7f8","name":"pressure","order":5,"width":0,"height":0,"format":"<div layout=\"row\" layout-align=\"space-between\">\n    <p>Pressure</p>\n    <p ng-style=\"{color: (msg.payload || 0) <1 ? 'red' : 'lightgreen'}\">\n        {{((msg.payload || 0) < 1 ? 'Warning ' : '')+msg.payload+ \" bar\" }}\n    </p>\n</div>","storeOutMessages":true,"fwdInMessages":true,"x":454.1111488342285,"y":1180.274024963379,"wires":[[]]},{"id":"7c641918.049af8","type":"ui_template","z":"c69445a1.8298f8","group":"981056cf.d9a7f8","name":"pump","order":4,"width":0,"height":0,"format":"<div layout=\"row\" layout-align=\"space-between\">\n    <p>Pump</p>\n    <p ng-style=\"{color: (msg.payload || 0) % 2 === 0 ? 'lightblue' : 'lightgreen'}\">\n        {{(msg.payload || 0) % 2 === 0 ? 'Off' : 'On'}}\n    </p>\n</div>","storeOutMessages":true,"fwdInMessages":true,"x":444.7701835632324,"y":1263.541103363037,"wires":[[]]},{"id":"7000ba25.3f9eb4","type":"ui_gauge","z":"c69445a1.8298f8","name":"","group":"80677809.00f498","order":4,"width":"3","height":"3","gtype":"gage","title":"Heating","label":"ltr/min","format":"{{value}}","min":0,"max":"10","colors":["#6783f3","#35e203","#ca3838"],"seg1":"3","seg2":"6","x":449.64404296875,"y":1325.2092447280884,"wires":[]},{"id":"494d0124.178f1","type":"function","z":"c69445a1.8298f8","name":"STAT","func":"//STAT\n//seconds counter starts again after every power-up\n//vC:total liter tapped\n//cC:tap counter, resets after every power-up \n//cSt:time in current state (seconds) \n//cEr:error counter, Resets after every power-up [0-0]\n//e1:TEMPERATURESENSORS\t[0-0]\n//e2:FLOWSENSOR [0-0]\n//e3:PRIMARYCONTROL [0-0]\n//e4:DISTRICTHEATING [0-0]\n//e5:CH RETURN TEMP [0-0]\n//e6:DHW TEMP [0-0]\n//e7:DISTRICT HEATING TEMP [0-0]\n//e8:DHRETURN TEMP [0-0]\n//e9:CENTRAL HEATING [0-0]\n//e10:WARMUP_TIMER [0-0]\n//e11:CH TEMP WARNING [0-0]\n//e12:CH TEMP ERROR [0-0]\n\n\nvar DAT = msg.payload.split(',');\n\n\n\nmsg.payload = {};\n\nmsg.payload.vC = DAT[2];  // state\nvar msg2 = {}; msg2.payload = DAT[2];\nmsg2.topic = \"Litres Drawn\";\n\n\nmsg.payload.DHWCount = DAT[3];\nvar msg3 = {}; msg3.payload = DAT[3];\nmsg3.topic = \"Tap Counter\";\n\n\nmsg.payload.TimeInState = DAT[4];\nvar msg4 = {}; msg4.payload = DAT[4];\nmsg4.topic = \"Time in State\";\n\nmsg.payload.e_Counter = DAT[5];\nvar msg5 = {}; msg5.payload = DAT[5];\nmsg5.topic = \"Error Counter\";\n\nmsg.payload.e_TEMPERATURESENSORS = DAT[6];\nmsg.payload.e_FLOWSENSOR = DAT[7];\nmsg.payload.e_PRIMARYCONTROL = DAT[8];\nmsg.payload.e_DISTRICTHEATING = DAT[9];\nmsg.payload.e_CHRETURNTEMP = DAT[10];\nmsg.payload.e_DHWTEMP = DAT[11];\nmsg.payload.e_DISTRICTHEATINGTEMP = DAT[12];\nmsg.payload.e_DHRETURNTEMP = DAT[13];\nmsg.payload.e_CENTRALHEATING = DAT[14];\nmsg.payload.e_WARMUPTIMER = DAT[15];\nmsg.payload.e_CHTEMPWARNING = DAT[16];\nmsg.payload.e_CHTEMPERROR = DAT[17];\n\nglobal.set(\"statistics\",msg.payload);\n\n\nreturn [msg,msg2,msg3,msg4,msg5];\n\n","outputs":"5","noerr":0,"x":390,"y":120,"wires":[["54b1b367.f13a2c"],[],[],[],[]]},{"id":"f0129271.261c2","type":"function","z":"c69445a1.8298f8","name":"PARAM","func":"var DAT = msg.payload.split(',');\n\n\n\nmsg.payload = {};\n\n\n\nmsg.payload.Firmware = DAT[1];  // state\nvar msg2 = {}; msg2.payload = DAT[1];\nmsg2.topic = \"Firmware\";\n\n\nmsg.payload.Serial = DAT[9];\nvar msg3 = {}; msg3.payload = DAT[9];\nmsg3.topic = \"Serial Number\";\n\nglobal.set(\"settings.firmware\",msg2.payload);\nglobal.set(\"settings.serial\",msg3.payload);\nglobal.set(\"parameters\",msg.payload);\n\n\nreturn [msg,msg2,msg3];","outputs":"3","noerr":0,"x":164.67444229125977,"y":388.8864212036133,"wires":[["37fcf0f8.e8208"],["129c06cb.11c6e9"],["129c06cb.11c6e9"]]},{"id":"f0034561.820988","type":"function","z":"c69445a1.8298f8","name":"clean","func":"if (msg.payload.indexOf(':')) {\n    \n    \n    \n    var a0 = msg.payload.split(':')[0].replace(/\\s/g, '');\n    var a1 = msg.payload.split(':')[1].replace(/\\s/g, '');\n    \n    msg.payload = {};\n    msg.payload = a1;\n    msg.topic = a0;\n    \n    if (a0=='EEPROM' || a0=='magic') { return null; }\n    \n    else if (a0=='ErrorCounter') { \n\n        msg.payload = parseInt(a1);\n        return [null, msg]; \n        \n    } else if (a0=='PowerUpCounter') { \n\n        msg.payload = parseInt(a1);\n        return [null, null, msg]; \n        \n    }\n \n   \n    else {\n    \n       \n       \n        return msg;  \n    }\n    \n    \n}\nreturn null;\n","outputs":"3","noerr":0,"x":637.0146522521973,"y":280.2022171020508,"wires":[["e6b9b9c.9ce4848"],["e6b9b9c.9ce4848"],["e6b9b9c.9ce4848"]]},{"id":"c1a270b6.d7a3","type":"debug","z":"c69445a1.8298f8","name":"","active":false,"console":"false","complete":"false","x":583.6188850402832,"y":231.94873809814453,"wires":[]},{"id":"69de98b9.e2fc98","type":"function","z":"c69445a1.8298f8","name":"if","func":"if (global.get(\"settings.logtosd\") !== true) { return null; }\nreturn msg;","outputs":1,"noerr":0,"x":638.844612121582,"y":905.5425186157227,"wires":[["eb26fd8d.fbb42"]]},{"id":"8f8b3f3a.6e937","type":"ui_template","z":"c69445a1.8298f8","group":"f810fd87.39f8a","name":"","order":0,"width":"6","height":"12","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"x":457.1778869628906,"y":1460.0459365844727,"wires":[[]]},{"id":"81d81556.0c7b68","type":"ui_gauge","z":"c69445a1.8298f8","name":"","group":"382e297b.53acd6","order":0,"width":0,"height":0,"gtype":"gage","title":"Tap Flow Rate","label":"ltr/min","format":"{{value}}","min":0,"max":"30","colors":["#00b500","#e6e600","#ca3838"],"seg1":"10","seg2":"20","x":1078.1146240234375,"y":950.8688735961914,"wires":[]},{"id":"f11c7873.e12f18","type":"ui_chart","z":"c69445a1.8298f8","name":"","group":"8843cc04.de4ea","order":2,"width":"6","height":"4","label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"bezier","nodata":"","ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"colors":["#2e56f5","#0eb9eb","#fe0e0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":817.0771789550781,"y":1117.6572093963623,"wires":[[],[]]},{"id":"cb9afadd.f2fcc8","type":"ui_chart","z":"c69445a1.8298f8","name":"","group":"80677809.00f498","order":2,"width":0,"height":0,"label":"Primary Temperatures","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"5","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"colors":["#cf0e03","#4858e6","#32dcdc","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":832.674201965332,"y":1026.8897399902344,"wires":[[],[]]},{"id":"54b1b367.f13a2c","type":"subflow:3d0a40a7.66aa4","z":"c69445a1.8298f8","x":535.6882781982422,"y":94.02508544921875,"wires":[["66008cbc.0d2804"]]},{"id":"37fcf0f8.e8208","type":"subflow:3d0a40a7.66aa4","z":"c69445a1.8298f8","name":"html table","x":341.1813545227051,"y":383.21610260009766,"wires":[["e4e70620.0d17f8"]]},{"id":"129c06cb.11c6e9","type":"debug","z":"c69445a1.8298f8","name":"","active":true,"console":"false","complete":"false","x":177.18134689331055,"y":508.0529022216797,"wires":[]},{"id":"e6b9b9c.9ce4848","type":"join","z":"c69445a1.8298f8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","timeout":"3","count":"","x":548.1814079284668,"y":349.27506256103516,"wires":[["96f33139.1aaf3"]]},{"id":"eb26fd8d.fbb42","type":"subflow:4b77f91.f408008","z":"c69445a1.8298f8","name":"","x":754.459114074707,"y":906.1086807250977,"wires":[]},{"id":"66008cbc.0d2804","type":"ui_template","z":"c69445a1.8298f8","group":"dd8470c4.5741b","name":"","order":0,"width":"6","height":"8","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"x":542.6813507080078,"y":153.1326904296875,"wires":[[]]},{"id":"e4e70620.0d17f8","type":"ui_template","z":"c69445a1.8298f8","group":"ebf0a5bd.363498","name":"","order":0,"width":"6","height":"9","format":"<div ng-bind-html=\"msg.payload\"></div>\n<br />\n<img src=\"http://www.heatweb.co.uk/w/images/thumb/8/8c/SLIM_Extra_With_Security_Case2.png/457px-SLIM_Extra_With_Security_Case2.png\" width=\"100%\">","storeOutMessages":true,"fwdInMessages":true,"x":450.18481826782227,"y":481.3793716430664,"wires":[[]]},{"id":"96f33139.1aaf3","type":"function","z":"c69445a1.8298f8","name":"","func":"var htmlt = '<table width=\"100%\">';\n\nfor (var key in msg.payload) {\n    htmlt += '<tr><td>' + key + '</td><td align=\"right\">' + msg.payload[key] + '</td></tr>';\n}\n\nhtmlt += '<table>';\n\nhtmlt = htmlt.replace(/Exchanger/g, \"\");\n\nmsg.payload=htmlt;\n\nreturn msg;","outputs":1,"noerr":0,"x":496.18481826782227,"y":419.42447662353516,"wires":[["5223e8e4.c2aa78"]]},{"id":"8b62f390.2da5d","type":"function","z":"c69445a1.8298f8","name":"pass","func":"\nreturn msg;","outputs":1,"noerr":0,"x":1740.0069580078125,"y":612.9825439453125,"wires":[["b92064e7.179268","73838ea8.c54be"]]},{"id":"5223e8e4.c2aa78","type":"ui_template","z":"c69445a1.8298f8","group":"c00ac9a8.47bd28","name":"","order":0,"width":"6","height":"8","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"x":646.1744270324707,"y":419.48694610595703,"wires":[[]]},{"id":"b92064e7.179268","type":"serial out","z":"c69445a1.8298f8","name":"","serial":"6cb6f27e.dcf5fc","x":1928.0069885253906,"y":612.9825744628906,"wires":[]},{"id":"73838ea8.c54be","type":"debug","z":"c69445a1.8298f8","name":"","active":false,"console":"false","complete":"false","x":1919.0068969726562,"y":686.9825744628906,"wires":[]},{"id":"3851f460.54dd0c","type":"function","z":"c69445a1.8298f8","name":"","func":" \n var tosend = \"\";\n \n    \ntosend = String.fromCharCode(83) + String.fromCharCode(89) + String.fromCharCode(78) + String.fromCharCode(67) + String.fromCharCode(14) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(0) + String.fromCharCode(59);\n \n \n\nmsg.payload = tosend;\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":1670.8404235839844,"y":800.8712692260742,"wires":[["8b62f390.2da5d"]]},{"id":"e4eb1660.f7acb8","type":"trigger","z":"c69445a1.8298f8","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"1","extend":false,"units":"min","reset":"","name":"","x":1506.7361755371094,"y":801.3574142456055,"wires":[["3851f460.54dd0c"]]},{"id":"9d9e7a6c.9c14a8","type":"inject","z":"c69445a1.8298f8","name":"","topic":"","payload":"","payloadType":"date","repeat":"3600","crontab":"","once":true,"x":1457.8473815917969,"y":742.204704284668,"wires":[["e4eb1660.f7acb8"]]},{"id":"dc580a25.26f7e8","type":"link in","z":"c69445a1.8298f8","name":"","links":["7c7bdd7f.286e54"],"x":95,"y":120,"wires":[["db8ff4b0.d99138"]]},{"id":"80677809.00f498","type":"ui_group","z":"","name":"Heat Network","tab":"5e8bedc0.4f0814","order":1,"disp":true,"width":"6"},{"id":"981056cf.d9a7f8","type":"ui_group","z":"","name":"Central Heating","tab":"b12654b0.f63f48","order":1,"disp":true,"width":"6"},{"id":"f810fd87.39f8a","type":"ui_group","z":"","name":"Current","tab":"31d8777.fd68588","order":2,"disp":true,"width":"6"},{"id":"382e297b.53acd6","type":"ui_group","z":"","name":"Hot Water","tab":"b12654b0.f63f48","order":2,"disp":true,"width":"6"},{"id":"8843cc04.de4ea","type":"ui_group","z":"","name":"Domestic Hot Water","tab":"5e8bedc0.4f0814","order":3,"disp":true,"width":"6"},{"id":"dd8470c4.5741b","type":"ui_group","z":"","name":"Statistics","tab":"31d8777.fd68588","order":4,"disp":true,"width":"6"},{"id":"ebf0a5bd.363498","type":"ui_group","z":"","name":"System","tab":"31d8777.fd68588","order":1,"disp":true,"width":"6"},{"id":"c00ac9a8.47bd28","type":"ui_group","z":"","name":"Settings","tab":"31d8777.fd68588","order":3,"disp":true,"width":"6"},{"id":"6cb6f27e.dcf5fc","type":"serial-port","z":"","serialport":"/dev/ttyUSB0","serialbaud":"115200","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false},{"id":"5e8bedc0.4f0814","type":"ui_tab","z":"","name":"Performance","icon":"dashboard","order":3},{"id":"b12654b0.f63f48","type":"ui_tab","z":"","name":"User Interface","icon":"tune","order":2},{"id":"31d8777.fd68588","type":"ui_tab","z":"","name":"Readings","icon":"dashboard","order":4}]

Modbus

Master

[{"id":"825e4531.85b4c","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"6ad0a674.b5eea8","type":"modbus-write","z":"825e4531.85b4c","name":"","showStatusActivities":true,"showErrors":true,"unitid":"","dataType":"MHoldingRegisters","adr":"33280","quantity":"2","server":"7061eb7a.ba7864","x":780,"y":140,"wires":[["6c1a9a05.26b5d4"],["d62e278d.682448"]]},{"id":"7de54799.0711f","type":"inject","z":"825e4531.85b4c","name":"","topic":"","payload":"50","payloadType":"num","repeat":"","crontab":"","once":false,"x":130,"y":140,"wires":[["77a8a8aa.b3e7c"]]},{"id":"d62e278d.682448","type":"modbus-response","z":"825e4531.85b4c","name":"","registerShowMax":20,"x":1030,"y":160,"wires":[]},{"id":"6c1a9a05.26b5d4","type":"debug","z":"825e4531.85b4c","name":"","active":true,"console":"false","complete":"false","x":1010,"y":120,"wires":[]},{"id":"dfc70f77.73e068","type":"modbus-read","z":"825e4531.85b4c","name":"","topic":"","showStatusActivities":true,"showErrors":true,"unitid":"","dataType":"InputRegister","adr":"33280","quantity":"2","rate":"1","rateUnit":"m","delayOnStart":false,"startDelayTime":"","server":"7061eb7a.ba7864","x":170,"y":460,"wires":[["ded91661.755688","a77e069.e43ee78"],["dd260905.54949"]]},{"id":"dd260905.54949","type":"modbus-response","z":"825e4531.85b4c","name":"","registerShowMax":20,"x":410,"y":500,"wires":[]},{"id":"ded91661.755688","type":"debug","z":"825e4531.85b4c","name":"","active":true,"console":"false","complete":"false","x":390,"y":460,"wires":[]},{"id":"1f3c1d34.325b0b","type":"debug","z":"825e4531.85b4c","name":"","active":true,"console":"false","complete":"false","x":810,"y":280,"wires":[]},{"id":"f17b1d12.03ab98","type":"inject","z":"825e4531.85b4c","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"x":130,"y":100,"wires":[["77a8a8aa.b3e7c"]]},{"id":"36e29086.8975d8","type":"inject","z":"825e4531.85b4c","name":"","topic":"","payload":"0.1","payloadType":"num","repeat":"","crontab":"","once":false,"x":130,"y":180,"wires":[["77a8a8aa.b3e7c"]]},{"id":"882318b5.ab01a","type":"inject","z":"825e4531.85b4c","name":"","topic":"","payload":"100","payloadType":"num","repeat":"","crontab":"","once":false,"x":130,"y":220,"wires":[["77a8a8aa.b3e7c"]]},{"id":"a77e069.e43ee78","type":"change","z":"825e4531.85b4c","name":"","rules":[{"t":"set","p":"lastNV1","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":420,"wires":[[]]},{"id":"817b266.c717858","type":"join","z":"825e4531.85b4c","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"1","count":"","x":570,"y":140,"wires":[["1f3c1d34.325b0b","6ad0a674.b5eea8"]]},{"id":"ec91aa14.4fe228","type":"split","z":"825e4531.85b4c","name":"","splt":"\\n","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":false,"addname":"","x":450,"y":140,"wires":[["817b266.c717858"]]},{"id":"77a8a8aa.b3e7c","type":"function","z":"825e4531.85b4c","name":"","func":"function numToFloat32Hex(v,le)\n{\n    if(isNaN(v)) return false;\n    var buf = new ArrayBuffer(4);\n    var dv  = new DataView(buf);\n    dv.setFloat32(0, v, true);\n    //return (dv.getUint32(0,!(le||false)));\n    return (\"0000000\"+dv.getUint32(0,!(le||false)).toString(16)).slice(-8).toUpperCase();\n}\n\n\nvar h0 = numToFloat32Hex(msg.payload,false);\n\n\noutmodb = {};\noutmodb[0] = parseInt(h0.substr(0, 4), 16); // hex1a(h0).toString(16);\noutmodb[1] = parseInt(h0.substr(4, 4), 16); //hex2a(h0).toString(16);\nmsg.payload = outmodb;\n\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":140,"wires":[["ec91aa14.4fe228"]]},{"id":"b31b4b03.72eb38","type":"inject","z":"825e4531.85b4c","name":"last","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"x":130,"y":280,"wires":[["32866d57.1b899a"]]},{"id":"32866d57.1b899a","type":"change","z":"825e4531.85b4c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"lastNV1","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":280,"wires":[["6ad0a674.b5eea8","1f3c1d34.325b0b"]]},{"id":"7061eb7a.ba7864","type":"modbus-client","z":"","name":"","clienttype":"serial","bufferCommands":false,"stateLogEnabled":true,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB0","serialType":"RTU","serialBaudrate":"38400","serialDatabits":"8","serialStopbits":"1","serialParity":"even","serialConnectionDelay":"100","unit_id":"","commandDelay":"1","clientTimeout":"1000","reconnectTimeout":"2000"}]

Slave

See Modbus Registers for HIUs

[{"id":"b83ae32f.a6a9e8","type":"tab","label":"Modbus Slave","disabled":false,"info":""},{"id":"e16c1ee8.9c00d8","type":"serial in","z":"b83ae32f.a6a9e8","name":"","serial":"f9dcb3e3.138bf","x":130,"y":80,"wires":[["ee53d630.346648","d2540385.e34c4"]]},{"id":"ee53d630.346648","type":"debug","z":"b83ae32f.a6a9e8","name":"","active":false,"console":"false","complete":"false","x":330,"y":140,"wires":[]},{"id":"db6dc54.55189b8","type":"debug","z":"b83ae32f.a6a9e8","name":"","active":false,"console":"false","complete":"false","x":650,"y":140,"wires":[]},{"id":"bac6106e.3930b","type":"serial out","z":"b83ae32f.a6a9e8","name":"","serial":"f9dcb3e3.138bf","x":650,"y":80,"wires":[]},{"id":"9b8f54ee.bb5a1","type":"function","z":"b83ae32f.a6a9e8","name":"store HIU","func":"// http://www.simplymodbus.ca/FC03.htm\n//11 03 006B 0003 7687\n// 11 03 06 AE41 5652 4340 49AD\n\n// uses address 17 as default.\n\n\nvar address = msg.payload[0] ;\nif (address != 17) { return null; }\n\n\nvar register = msg.payload[3] ;\n\nvar targetv = 0;\n\nif(register==107) { targetv = 23.5; }\nelse if(register==1) { targetv = 15.73; }\n\n\nvar tosend = String.fromCharCode(17) + String.fromCharCode(3) + String.fromCharCode(2);\n\n\n// testing value 99.9  = 999 (multiplier of 10)\n\ntargetv = parseInt(targetv *10) ;\nvar hexStringValue  = \"0000\" + targetv.toString(16);\nhexStringValue = hexStringValue.substr(-4);\n\n\ntosend += String.fromCharCode(parseInt(hexStringValue.substr(0,2),16)) + String.fromCharCode(parseInt(hexStringValue.substr(2,2),16)) ;\n//tosend += hexStringValue ;\n//tosend += String.fromCharCode(174) + String.fromCharCode(99) ;\n\n\n//tosend += String.fromCharCode(86) + String.fromCharCode(82) ;\n\n//tosend += String.fromCharCode(67) + String.fromCharCode(64) ;\n\n\n//tosend += String.fromCharCode(73) + String.fromCharCode(173) ;\n\nmsg.payload  = Buffer.from(tosend, 'ascii');\n\nfunction crc16(buffer) {\n    var crc = 0xFFFF;\n    var odd;\n\n    for (var i = 0; i < buffer.length; i++) {\n        crc = crc ^ buffer[i];\n\n        for (var j = 0; j < 8; j++) {\n            odd = crc & 0x0001;\n            crc = crc >> 1;\n            if (odd) {\n                crc = crc ^ 0xA001;\n            }\n        }\n    }\n\n    return crc;\n}\n\nmsg.payload = crc16(msg.payload);\n\nvar hexString  = \"0000\" + msg.payload.toString(16);\nhexString = hexString.substr(-4);\n\n\ntosend += String.fromCharCode(parseInt(hexString.substr(2,2),16)) + String.fromCharCode(parseInt(hexString.substr(0,2),16)) ;\nmsg.payload  = Buffer.from(tosend, 'ascii');\n\n\n\n\n\n\nreturn msg;\n","outputs":1,"noerr":0,"x":480,"y":80,"wires":[["db6dc54.55189b8","bac6106e.3930b"]]},{"id":"d2540385.e34c4","type":"trigger","z":"b83ae32f.a6a9e8","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"1","extend":false,"units":"ms","reset":"","name":"","x":330,"y":80,"wires":[["9b8f54ee.bb5a1"]]},{"id":"f9dcb3e3.138bf","type":"serial-port","z":"","serialport":"/dev/ttyUSB0","serialbaud":"38400","databits":"8","parity":"even","stopbits":"1","newline":"250","bin":"bin","out":"time","addchar":false}]

Valve Controller

[{"id":"f2c36c56.17d06","type":"tab","label":"Novocon","disabled":false,"info":""},{"id":"b32fb9f6.eb5d8","type":"modbus-write","z":"f2c36c56.17d06","name":"","showStatusActivities":true,"showErrors":true,"unitid":"","dataType":"MHoldingRegisters","adr":"33280","quantity":"2","server":"a684c200.c1fab8","x":920,"y":160,"wires":[["39a063ad.9a1bf4"],["55405767.9e383"]]},{"id":"d25c1db.8bc366","type":"inject","z":"f2c36c56.17d06","name":"","topic":"","payload":"50","payloadType":"num","repeat":"","crontab":"","once":false,"x":150,"y":200,"wires":[["8f67be2e.7927e"]]},{"id":"55405767.9e383","type":"modbus-response","z":"f2c36c56.17d06","name":"","registerShowMax":20,"x":1170,"y":180,"wires":[]},{"id":"39a063ad.9a1bf4","type":"debug","z":"f2c36c56.17d06","name":"","active":false,"console":"false","complete":"false","x":1150,"y":140,"wires":[]},{"id":"9130e2e4.cd3b28","type":"modbus-read","z":"f2c36c56.17d06","name":"","topic":"","showStatusActivities":true,"showErrors":true,"unitid":"","dataType":"InputRegister","adr":"33280","quantity":"2","rate":"1","rateUnit":"m","delayOnStart":false,"startDelayTime":"","server":"a684c200.c1fab8","x":170,"y":460,"wires":[["46fe82d.ffdf57c","441fc814.1c141"],["2502da81.90dbee"]]},{"id":"2502da81.90dbee","type":"modbus-response","z":"f2c36c56.17d06","name":"","registerShowMax":20,"x":410,"y":500,"wires":[]},{"id":"46fe82d.ffdf57c","type":"debug","z":"f2c36c56.17d06","name":"","active":true,"console":"false","complete":"false","x":390,"y":460,"wires":[]},{"id":"9f85e940.5c448","type":"debug","z":"f2c36c56.17d06","name":"","active":false,"console":"false","complete":"false","x":950,"y":300,"wires":[]},{"id":"8473609c.c5be88","type":"inject","z":"f2c36c56.17d06","name":"","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":true,"x":150,"y":160,"wires":[["8f67be2e.7927e"]]},{"id":"441fc814.1c141","type":"change","z":"f2c36c56.17d06","name":"","rules":[{"t":"set","p":"lastNV1","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":420,"wires":[[]]},{"id":"7dcd8c0e.dc3474","type":"join","z":"f2c36c56.17d06","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"1","count":"","x":710,"y":160,"wires":[["9f85e940.5c448","b32fb9f6.eb5d8"]]},{"id":"40878935.4e76c8","type":"split","z":"f2c36c56.17d06","name":"","splt":"\\n","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":false,"addname":"","x":590,"y":160,"wires":[["7dcd8c0e.dc3474"]]},{"id":"3ab90a15.dcde86","type":"function","z":"f2c36c56.17d06","name":"","func":"function numToFloat32Hex(v,le)\n{\n    if(isNaN(v)) return false;\n    var buf = new ArrayBuffer(4);\n    var dv  = new DataView(buf);\n    dv.setFloat32(0, v, true);\n    //return (dv.getUint32(0,!(le||false)));\n    return (\"0000000\"+dv.getUint32(0,!(le||false)).toString(16)).slice(-8).toUpperCase();\n}\n\n\nvar h0 = numToFloat32Hex(msg.payload,false);\n\n\noutmodb = {};\noutmodb[0] = parseInt(h0.substr(0, 4), 16); // hex1a(h0).toString(16);\noutmodb[1] = parseInt(h0.substr(4, 4), 16); //hex2a(h0).toString(16);\nmsg.payload = outmodb;\n\nreturn msg;","outputs":1,"noerr":0,"x":450,"y":160,"wires":[["40878935.4e76c8"]]},{"id":"e6a2cbda.3bb138","type":"link in","z":"f2c36c56.17d06","name":"valveFlow1","links":["2ce96253.891b2e"],"x":195,"y":80,"wires":[["8f67be2e.7927e"]]},{"id":"8f67be2e.7927e","type":"ui_slider","z":"f2c36c56.17d06","name":"","label":"slider","group":"c00ac9a8.47bd28","order":0,"width":0,"height":0,"passthru":true,"topic":"","min":0,"max":"100","step":"0.5","x":310,"y":160,"wires":[["3ab90a15.dcde86","1b997823.21f44","802470af.aa5838"]]},{"id":"1b997823.21f44","type":"ui_text","z":"f2c36c56.17d06","group":"c00ac9a8.47bd28","order":0,"width":0,"height":0,"name":"","label":"","format":"{{msg.payload}}%","layout":"row-spread","x":447.4499816894531,"y":213.05001831054688,"wires":[]},{"id":"802470af.aa5838","type":"switch","z":"f2c36c56.17d06","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"},{"t":"else"}],"checkall":"false","outputs":2,"x":450,"y":80,"wires":[["b98e6076.3e1cc"],["3bd16163.340d8e"]]},{"id":"546f0824.464478","type":"mqtt out","z":"f2c36c56.17d06","name":"","topic":"ihiu/bobe4gag/beacon/user/red","qos":"2","retain":"true","broker":"1868193e.9bda27","x":930,"y":80,"wires":[]},{"id":"b98e6076.3e1cc","type":"change","z":"f2c36c56.17d06","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":40,"wires":[["546f0824.464478","bf891053.6a254"]]},{"id":"3bd16163.340d8e","type":"change","z":"f2c36c56.17d06","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":80,"wires":[["546f0824.464478","bf891053.6a254"]]},{"id":"bf891053.6a254","type":"debug","z":"f2c36c56.17d06","name":"","active":true,"console":"false","complete":"false","x":870,"y":40,"wires":[]},{"id":"a684c200.c1fab8","type":"modbus-client","z":"","name":"","clienttype":"serial","bufferCommands":false,"stateLogEnabled":true,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB0","serialType":"RTU","serialBaudrate":"38400","serialDatabits":"8","serialStopbits":"1","serialParity":"even","serialConnectionDelay":"100","unit_id":"","commandDelay":"1","clientTimeout":"1000","reconnectTimeout":"2000"},{"id":"c00ac9a8.47bd28","type":"ui_group","z":"","name":"Settings","tab":"31d8777.fd68588","order":4,"disp":true,"width":"6"},{"id":"1868193e.9bda27","type":"mqtt-broker","z":"","broker":"mqtt.heatweb.com","port":"10031","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"31d8777.fd68588","type":"ui_tab","z":"","name":"Readings","icon":"dashboard","order":4}]

IEEE-745

[{"id":"f64c029.2c5838","type":"function","z":"2ae8b25a.bffaa6","name":"IEEE-754 to float","func":"/* Converts from an number, string, buffer or array representing an IEEE-754 value\n * to a javascript float.\n * The following may be given in msg.payload:\n *      A string representing a number, which may be hex or binary\n *        examples, \"1735\"  \"0x02045789\"  0b01000000010010010000111111011011\n *      An integer value\n *      A four element array or buffer of 8 bit values, most significant byte first.\n*/ \n// first make a number from the given payload if necessary\nlet intValue;\nif (typeof msg.payload === \"number\") {\n    intValue = msg.payload;\n} else if (typeof msg.payload === \"string\") {\n    intValue = Number(msg.payload);\n} else if (msg.payload.length == 4) {\n    // four byte array or buffer\n    intValue = (((((msg.payload[0] << 8) + msg.payload[1]) << 8) + msg.payload[2]) << 8) + msg.payload[3];\n} else {\n    node.warn(\"Unrecognised payload type or length\");\n}\n\nmsg.payload = Int2Float32(intValue);\nreturn msg;\n\nfunction Int2Float32(bytes) {\n    var sign = (bytes & 0x80000000) ? -1 : 1;\n    var exponent = ((bytes >> 23) & 0xFF) - 127;\n    var significand = (bytes & ~(-1 << 23));\n\n    if (exponent == 128) \n        return sign * ((significand) ? Number.NaN : Number.POSITIVE_INFINITY);\n\n    if (exponent == -127) {\n        if (significand === 0) return sign * 0.0;\n        exponent = -126;\n        significand /= (1 << 22);\n    } else significand = (significand | (1 << 23)) / (1 << 23);\n\n    return sign * significand * Math.pow(2, exponent);\n}","outputs":1,"noerr":0,"x":385,"y":724,"wires":[["6e888b6a.40c874"]]},{"id":"6e888b6a.40c874","type":"debug","z":"2ae8b25a.bffaa6","name":"Value","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":574,"y":724,"wires":[]},{"id":"2dc3b0d4.06517","type":"inject","z":"2ae8b25a.bffaa6","name":"1 string hex","topic":"","payload":"0x3f800000","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":105,"y":614,"wires":[["f64c029.2c5838"]]},{"id":"43e54f8e.0cf598","type":"inject","z":"2ae8b25a.bffaa6","name":"-2 string hex","topic":"","payload":"0xc0000000","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":104,"y":650,"wires":[["f64c029.2c5838"]]},{"id":"a8fc7865.b2a438","type":"inject","z":"2ae8b25a.bffaa6","name":"Pi string hex","topic":"","payload":"0x40490fdb","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":104,"y":684,"wires":[["f64c029.2c5838"]]},{"id":"f2c4c56.6390138","type":"inject","z":"2ae8b25a.bffaa6","name":"Pi string dec","topic":"","payload":"1078530011","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":101.5,"y":758,"wires":[["f64c029.2c5838"]]},{"id":"e830bb54.c9cf08","type":"inject","z":"2ae8b25a.bffaa6","name":"Pi string binary","topic":"","payload":"0b01000000010010010000111111011011","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":112,"y":720,"wires":[["f64c029.2c5838"]]},{"id":"d1f3247b.ea8798","type":"inject","z":"2ae8b25a.bffaa6","name":"Pi integer","topic":"","payload":"1078530011","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":97,"y":545,"wires":[["f64c029.2c5838"]]},{"id":"d7bfbaa2.85c4c8","type":"inject","z":"2ae8b25a.bffaa6","name":"Pi Array","topic":"","payload":"[64,73,15,219]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":83,"y":817,"wires":[["f64c029.2c5838"]]},{"id":"70a1c40f.9a925c","type":"inject","z":"2ae8b25a.bffaa6","name":"Pi Buffer","topic":"","payload":"[64,73,15,219]","payloadType":"bin","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":92,"y":855,"wires":[["f64c029.2c5838"]]}]

Printer

[{"id":"3b0a9ca5.856884","type":"tab","label":"Printer","disabled":false,"info":""},{"id":"ad1ef3e0.eeb88","type":"comment","z":"3b0a9ca5.856884","name":"","info":"https://www.howtogeek.com/169679/how-to-add-a-printer-to-your-raspberry-pi-or-other-linux-computer/\n\n\n//http://192.168.0.55:631/help/options.html?TOPIC=Getting+Started&QUERY=\n\nCUPS understands many different types of files directly, \nincluding text, PostScript, PDF, and image files. \n\nThis allows you to print from inside your applications or at the command-line, whichever is most convenient!\n\nlp -o landscape -o fit-to-page -o media=A4 filename.jpg\nlpr -o landscape -o fit-to-page -o media=A4 filename.jpg\n\n\nlpoptions -p DYMO_LabelWriter_450 -l\nPageSize/Media Size: *w81h252 w101h252 w54h144 w167h288 w162h540 w162h504 w41h248 w41h144 w153h198\n\nhttps://opensource.apple.com/source/cups/cups-86/ppd/dymo.ppd.auto.html\nOpenUI *PageSize/Media Size: PickOne\n*OrderDependency: 10 AnySetup *PageSize\n*DefaultPageSize: w81h252\n*PageSize w81h252/Address - 1 1/8 x 3 1/2\":\t\t\t\"<</PageSize[81 252]/ImagingBBox null>>setpagedevice\"\n*PageSize w101h252/Large Address - 1 4/10 x 3 1/2\":\t\t\"<</PageSize[101 252]/ImagingBBox null>>setpagedevice\"\n*PageSize w54h144/Return Address - 3/4 x 2\":\t\t\t\"<</PageSize[54 144]/ImagingBBox null>>setpagedevice\"\n*PageSize w167h288/Shipping Address - 2 5/16 x 4\":\t\t\"<</PageSize[167 288]/ImagingBBox null>>setpagedevice\"\n*PageSize w162h540/Internet Postage 2-Part - 2 1/4 x 7 1/2\":\t\"<</PageSize[162 540]/ImagingBBox null>>setpagedevice\"\n*PageSize w162h504/Internet Postage 3-Part - 2 1/4 x 7\":\t\"<</PageSize[162 504]/ImagingBBox null>>setpagedevice\"\n*PageSize w41h248/File Folder - 9/16 x 3 7/16\":\t\t\t\"<</PageSize[41 248]/ImagingBBox null>>setpagedevice\"\n*PageSize w41h144/Hanging Folder - 9/16 x 2\":\t\t\t\"<</PageSize[41 144]/ImagingBBox null>>setpagedevice\"\n*PageSize w153h198/3.5\" Disk - 2 1/8 x 2 3/4\":\t\t\t\"<</PageSize[153 198]/ImagingBBox null>>setpagedevice\"\n*CloseUI: *PageSize\n\nlp -o landscape -o fit-to-page -o media=w54h144 filename.jpg\n\nlp -d DYMO_LabelWriter_450 -o landscape -o fit-to-page -o media=w54h144 /home/pi/node-hiu/labels/test.txt","x":120,"y":40,"wires":[]},{"id":"ff602037.9626f","type":"inject","z":"3b0a9ca5.856884","name":"","topic":"","payload":"/home/pi/node-hiu/labels/test2.jpg","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":140,"wires":[["90d457b6.6d03f8"]]},{"id":"165abc2a.2e85d4","type":"inject","z":"3b0a9ca5.856884","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":360,"wires":[["2d02c6ef.f1dd2a"]]},{"id":"2d02c6ef.f1dd2a","type":"template","z":"3b0a9ca5.856884","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"ID: 1234567890\nDQ: 1234-45\nModel: Data\n","output":"str","x":320,"y":360,"wires":[["d165bd05.160ee"]]},{"id":"d165bd05.160ee","type":"change","z":"3b0a9ca5.856884","name":"","rules":[{"t":"set","p":"filename","pt":"msg","to":"/home/pi/node-hiu/labels/test.txt","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":360,"wires":[["9a4c9655.35a178","771e4da5.28ca44"]]},{"id":"9a4c9655.35a178","type":"file","z":"3b0a9ca5.856884","name":"","filename":"","appendNewline":false,"createDir":true,"overwriteFile":"true","x":690,"y":360,"wires":[]},{"id":"f6fc9ea6.d30a5","type":"change","z":"3b0a9ca5.856884","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"filename","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":240,"wires":[["657ac253.3f4f74"]]},{"id":"771e4da5.28ca44","type":"trigger","z":"3b0a9ca5.856884","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"250","extend":false,"units":"ms","reset":"","bytopic":"all","name":"","x":300,"y":280,"wires":[["f6fc9ea6.d30a5"]]},{"id":"657ac253.3f4f74","type":"exec","z":"3b0a9ca5.856884","command":"lp -d DYMO_LabelWriter_450 -o landscape","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":610,"y":240,"wires":[[],[],[]]},{"id":"90d457b6.6d03f8","type":"exec","z":"3b0a9ca5.856884","command":"lp -d DYMO_LabelWriter_450 -o landscape -o fit-to-page","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":630,"y":140,"wires":[[],[],[]]},{"id":"f8121b4c.04b0b8","type":"exec","z":"3b0a9ca5.856884","command":"lpr -d DYMO_LabelWriter_450 -o portrait -o fit-to-page  -o media=w54h144","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":780,"y":60,"wires":[[],[],[]]}]


Camera

[{"id":"6899ef37.2aa1a8","type":"tab","label":"Camera"},{"id":"f1bbf645.f347c8","type":"inject","z":"6899ef37.2aa1a8","name":"","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"x":138.826416015625,"y":124.875,"wires":[["39797f7c.e7db88"]]},{"id":"39797f7c.e7db88","type":"function","z":"6899ef37.2aa1a8","name":"","func":"\n\n\nvar today = new Date();\nvar dd = today.getDate();\nvar mm = today.getMonth()+1; //January is 0!\nvar hh = today.getHours(); //January is 0!\nvar mmm = today.getMinutes(); //January is 0!\n\nvar yyyy = today.getFullYear();\nif(dd<10){\n    dd='0'+dd;\n} \nif(mm<10){\n    mm='0'+mm;\n} \nvar today = yyyy+\".\"+mm+\".\"+dd+\".\"+hh+\".\"+mmm;\n\n\nglobal.set(\"photofile\", 'n_photo_'+today+'.jpg');\n\n\nvar logFile = '/var/www/html/logs/'+'n_photo_'+today+'.jpg';\nmsg.payload = '-r 1280x720 ' + logFile;\n\nmsg2={}; msg2.payload = logFile; msg2.filename = logFile;\n\nreturn [msg,msg2];","outputs":"2","noerr":0,"x":301.83673095703125,"y":125.11111450195312,"wires":[["24ee095b.802c4e"],[]]},{"id":"24ee095b.802c4e","type":"exec","z":"6899ef37.2aa1a8","command":"fswebcam","addpay":true,"append":"","useSpawn":"","timer":"","name":"","x":464.8298797607422,"y":117.68055725097656,"wires":[["ab6cee08.04e3d8","435ce17e.8fe798"],[],[]]},{"id":"ab6cee08.04e3d8","type":"debug","z":"6899ef37.2aa1a8","name":"","active":true,"console":"false","complete":"false","x":690,"y":100,"wires":[]},{"id":"38bcd321.ed763c","type":"http response","z":"6899ef37.2aa1a8","name":"","x":624.8957977294922,"y":585.0002746582031,"wires":[]},{"id":"88c97dcd.2b7398","type":"function","z":"6899ef37.2aa1a8","name":"Set Content-Type header","func":"msg.headers = {\n    \"Content-Type\":\"image/jpeg\"\n};\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":580,"wires":[["38bcd321.ed763c"]]},{"id":"ddb60c17.19868","type":"file in","z":"6899ef37.2aa1a8","name":"","filename":"","format":"","x":410,"y":400,"wires":[["88c97dcd.2b7398","6bd0f868.b5a6d8"]]},{"id":"2e94320d.51d916","type":"http in","z":"6899ef37.2aa1a8","name":"","url":"/takephoto","method":"get","swaggerDoc":"","x":126.89581298828125,"y":473.0000305175781,"wires":[["39797f7c.e7db88"]]},{"id":"435ce17e.8fe798","type":"function","z":"6899ef37.2aa1a8","name":"","func":"\n\nvar logFile = '/var/www/html/logs/'+global.get(\"photofile\");\n\n\nmsg.filename = logFile;\n\nvar logFile2 = '/logs/'+global.get(\"photofile\");\n\nmsg2={};\nmsg2.payload = logFile2;\n\n\nreturn [msg, msg2];","outputs":"2","noerr":0,"x":356.8402557373047,"y":245.21182250976562,"wires":[["ddb60c17.19868"],["6c013196.4b246","9a684269.4b34a"]]},{"id":"17c49e0f.9b8e52","type":"watch","z":"6899ef37.2aa1a8","name":"","files":"/var/www/html/iHIU/myfiles/","x":284.2669847276476,"y":718.7423027886284,"wires":[["88b57e29.6f5e9"]]},{"id":"88b57e29.6f5e9","type":"debug","z":"6899ef37.2aa1a8","name":"","active":true,"console":"false","complete":"false","x":562.0293680826823,"y":719.4367472330729,"wires":[]},{"id":"6c013196.4b246","type":"ui_template","z":"6899ef37.2aa1a8","group":"41e96ecd.b81a","name":"","order":2,"width":"6","height":"5","format":"\n\n\n<a href=\"{{msg.payload}}\" target=\"_blank\">\n<img src=\"{{msg.payload}}\" alt=\"image\" style=\"float:right;width:100%;\">\n</a>\n<br /><br />\n{{msg.payload}}","storeOutMessages":true,"fwdInMessages":true,"x":618.6998901367188,"y":251.99077796936035,"wires":[[]]},{"id":"b6d5d2fb.4ca72","type":"ui_button","z":"6899ef37.2aa1a8","name":"","group":"41e96ecd.b81a","order":1,"width":0,"height":0,"passthru":false,"label":"Take Photo","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":124.25927734375,"y":73.4490795135498,"wires":[["39797f7c.e7db88"]]},{"id":"ce9a4aad.56b78","type":"ui_ui_control","z":"6899ef37.2aa1a8","name":"ui control","x":795.8264007568359,"y":312.0243225097656,"wires":[[]]},{"id":"9a684269.4b34a","type":"trigger","z":"6899ef37.2aa1a8","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"1","extend":false,"units":"s","reset":"","name":"","x":498.8333282470703,"y":302.16668701171875,"wires":[["fc75d6ae.a4dde8"]]},{"id":"fc75d6ae.a4dde8","type":"function","z":"6899ef37.2aa1a8","name":"","func":"msg={};\nmsg.payload=\"Camera\";\nreturn msg;","outputs":1,"noerr":0,"x":641.8333892822266,"y":314.54168701171875,"wires":[["ce9a4aad.56b78"]]},{"id":"6bd0f868.b5a6d8","type":"mqtt out","z":"6899ef37.2aa1a8","name":"","topic":"ihiu/cameraunit1/camera1/photo/jpeg","qos":"0","retain":"false","broker":"1868193e.9bda27","x":670,"y":380,"wires":[]},{"id":"41e96ecd.b81a","type":"ui_group","z":"","name":"Photograph","tab":"4e8cb497.f3c004","disp":true,"width":"6"},{"id":"1868193e.9bda27","type":"mqtt-broker","z":"","broker":"mqtt.heatweb.com","port":"10031","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"4e8cb497.f3c004","type":"ui_tab","z":"","name":"Camera","icon":"camera","order":12}]

Micro

[{"id":"4644cc7d.a66fb4","type":"tab","label":"Micro","disabled":false},{"id":"58783892.6a3628","type":"serial in","z":"4644cc7d.a66fb4","name":"Arduino","serial":"f9dcb3e3.138bf","x":190,"y":140,"wires":[["6a5bf84c.4bde88"]]},{"id":"4044d737.bdded8","type":"split","z":"4644cc7d.a66fb4","name":"","splt":"&","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":false,"addname":"","x":470,"y":140,"wires":[["7dc8b757.3a7df"]]},{"id":"1fd31c0c.bcb1c4","type":"serial out","z":"4644cc7d.a66fb4","name":"","serial":"f9dcb3e3.138bf","x":548.0000152587891,"y":61.00001525878906,"wires":[]},{"id":"570c57eb.f91f38","type":"inject","z":"4644cc7d.a66fb4","name":"setup","topic":"pulse","payload":"&setPULSE=30&","payloadType":"str","repeat":"","crontab":"","once":true,"x":210,"y":60,"wires":[["9535a9bd.3ab3a8"]]},{"id":"9535a9bd.3ab3a8","type":"delay","z":"4644cc7d.a66fb4","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":365.99998474121094,"y":59.33333778381348,"wires":[["1fd31c0c.bcb1c4"]]},{"id":"6a5bf84c.4bde88","type":"function","z":"4644cc7d.a66fb4","name":"","func":"msg.payload = msg.payload.replace(/\\s/g, '') + \"&\";\nreturn msg;","outputs":1,"noerr":0,"x":322.84027099609375,"y":140.22222900390625,"wires":[["4044d737.bdded8"]]},{"id":"7dc8b757.3a7df","type":"debug","z":"4644cc7d.a66fb4","name":"","active":true,"console":"false","complete":"false","x":650,"y":140,"wires":[]},{"id":"f9dcb3e3.138bf","type":"serial-port","z":"","serialport":"/dev/ttyACM0","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false}]

Radio

[{"id":"57c92b42.8228b4","type":"tab","label":"UI"},{"id":"bd77f798.54f778","type":"ui_text","z":"57c92b42.8228b4","group":"2d125913.7b1f56","order":3,"width":"5","height":"1","name":"Artist","label":"","format":"{{msg.payload}}","layout":"col-center","x":410,"y":620,"wires":[]},{"id":"4177930e.4f234c","type":"ui_text","z":"57c92b42.8228b4","group":"2d125913.7b1f56","order":4,"width":"5","height":"1","name":"Titel","label":"","format":"{{msg.payload}}","layout":"col-center","x":412,"y":688,"wires":[]},{"id":"3428e17e.7f9eae","type":"ui_text","z":"57c92b42.8228b4","group":"2d125913.7b1f56","order":2,"width":"5","height":"1","name":"","label":"","format":"{{msg.payload}}","layout":"col-center","x":411,"y":566,"wires":[]},{"id":"d9f0654c.b21d78","type":"ui_button","z":"57c92b42.8228b4","name":"play","group":"550e7a29.0775f4","order":4,"width":"1","height":"1","passthru":false,"label":"","color":"","bgcolor":"","icon":"play_arrow","payload":"http://pulseedm.cdnstream1.com:8124/1373_128.m3u","payloadType":"str","topic":"","x":90,"y":120,"wires":[["60b65117.25879"]]},{"id":"9f776a98.f76118","type":"ui_button","z":"57c92b42.8228b4","name":"stop","group":"550e7a29.0775f4","order":3,"width":"1","height":"1","passthru":false,"label":"","color":"","bgcolor":"","icon":"stop","payload":"stop","payloadType":"str","topic":"","x":370,"y":320,"wires":[["9ed53d5.f91abc"]]},{"id":"8b31c9f8.3cf348","type":"ui_button","z":"57c92b42.8228b4","name":"next","group":"550e7a29.0775f4","order":5,"width":"1","height":"1","label":"","color":"","icon":"fast_forward","payload":"0","payloadType":"str","topic":"radio/tracklist/next","x":423,"y":812,"wires":[[]]},{"id":"57058adf.c47a94","type":"ui_button","z":"57c92b42.8228b4","name":"previous","group":"550e7a29.0775f4","order":2,"width":"1","height":"1","label":"","color":"","icon":"fast_rewind","payload":"0","payloadType":"str","topic":"radio/tracklist/previous","x":427,"y":863,"wires":[[]]},{"id":"19679fa0.2fb58","type":"ui_template","z":"57c92b42.8228b4","group":"2d125913.7b1f56","name":"","order":5,"width":"3","height":"3","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"x":447.24005126953125,"y":758.2649841308594,"wires":[[]]},{"id":"1e8d4dbf.e30362","type":"template","z":"57c92b42.8228b4","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<img id=\"img\" src=\"{{payload}}\" height=\"128\" width=\"128\"/>","x":263.3540344238281,"y":753.0210113525391,"wires":[["19679fa0.2fb58"]]},{"id":"44f0fc0b.0914f4","type":"ui_button","z":"57c92b42.8228b4","name":"volume up","group":"550e7a29.0775f4","order":7,"width":"1","height":"1","label":"","color":"","icon":"volume_up","payload":"0","payloadType":"str","topic":"radio/mixer/volup","x":423,"y":932,"wires":[[]]},{"id":"f7d366f.7223a98","type":"ui_button","z":"57c92b42.8228b4","name":"volume down","group":"550e7a29.0775f4","order":6,"width":"1","height":"1","passthru":false,"label":"","color":"","bgcolor":"","icon":"volume_down","payload":"0","payloadType":"str","topic":"radio/mixer/voldown","x":429,"y":988,"wires":[[]]},{"id":"c5b91f7e.4cd35","type":"debug","z":"57c92b42.8228b4","name":"","active":false,"console":"false","complete":"false","x":970,"y":120,"wires":[]},{"id":"40df26cf.58c618","type":"exec","z":"57c92b42.8228b4","command":"cvlc","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":810,"y":120,"wires":[["c5b91f7e.4cd35"],["c5b91f7e.4cd35"],["c5b91f7e.4cd35"]]},{"id":"60b65117.25879","type":"ui_dropdown","z":"57c92b42.8228b4","name":"","label":"Station","place":"Select option","group":"550e7a29.0775f4","order":1,"width":0,"height":0,"passthru":true,"options":[{"label":"Dance Attack UK","value":"http://uk6.internet-radio.com:8152/live.m3u","type":"str"},{"label":"Pulse FM","value":"http://pulseedm.cdnstream1.com:8124/1373_128.m3u","type":"str"}],"payload":"","topic":"","x":180,"y":200,"wires":[["23324cfb.938044"]]},{"id":"68533819.b39d28","type":"function","z":"57c92b42.8228b4","name":"","func":"msg={};\nmsg.kill = \"SIGTERM\";\nreturn msg;","outputs":1,"noerr":0,"x":670,"y":180,"wires":[["40df26cf.58c618"]]},{"id":"56c81cc6.1cc8c4","type":"inject","z":"57c92b42.8228b4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":440,"y":240,"wires":[["68533819.b39d28"]]},{"id":"f103c159.5677c","type":"trigger","z":"57c92b42.8228b4","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"250","extend":false,"units":"ms","reset":"","name":"delay","x":670,"y":120,"wires":[["40df26cf.58c618"]]},{"id":"6e41cafe.c7e434","type":"http request","z":"57c92b42.8228b4","name":"","method":"GET","ret":"txt","url":"https://www.internet-radio.com/stations/trance/","tls":"","x":330,"y":400,"wires":[["ef1de22.f4ef52"]]},{"id":"7d6a721b.cfb58c","type":"debug","z":"57c92b42.8228b4","name":"","active":false,"console":"false","complete":"false","x":770,"y":500,"wires":[]},{"id":"f5a6e042.d454d","type":"inject","z":"57c92b42.8228b4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":230,"y":500,"wires":[["6e41cafe.c7e434"]]},{"id":"ef1de22.f4ef52","type":"split","z":"57c92b42.8228b4","name":"","splt":"3u&amp","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":true,"addname":"","x":430,"y":500,"wires":[["7e8c5e27.fc676"]]},{"id":"7e8c5e27.fc676","type":"function","z":"57c92b42.8228b4","name":"split","func":"//href=\"/servers/tools/playlistgenerator/?u=http://pulseedm.cdnstream1.com:8124/1373_128.m3u&t=.pls\">\n\n\nmsg.payload = msg.payload.split('u=http:')[1];\n\nif (! msg.payload) { return null; }\n\nif (msg.payload.length>70) { return null; }\n\nif (! msg.payload.indexOf(\".m3u\")) { return null; }\n\nmsg.payload = \"http:\" + msg.payload + \"3u\";\n\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":400,"wires":[["28af1d63.aed622"]]},{"id":"b806a854.6ffc28","type":"ui_dropdown","z":"57c92b42.8228b4","name":"","label":"","place":"Select option","group":"2d125913.7b1f56","order":1,"width":0,"height":0,"passthru":true,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"","x":820,"y":400,"wires":[["5c38f948.47e858"]]},{"id":"28af1d63.aed622","type":"join","z":"57c92b42.8228b4","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"payload","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"2","count":"","x":590,"y":500,"wires":[["7d6a721b.cfb58c","3930c8ae.792648"]]},{"id":"3930c8ae.792648","type":"function","z":"57c92b42.8228b4","name":"","func":"msg.options=msg.payload;\n\nmsg.payload={};\n\nreturn msg;","outputs":1,"noerr":0,"x":670,"y":400,"wires":[["b806a854.6ffc28"]]},{"id":"5c38f948.47e858","type":"function","z":"57c92b42.8228b4","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":120,"wires":[["f103c159.5677c","68533819.b39d28"]]},{"id":"cf1bf1b9.3a7e5","type":"mqtt in","z":"57c92b42.8228b4","name":"radiostation","topic":"ihiu/Noy3ahja/radiostation","qos":"0","broker":"1868193e.9bda27","x":90,"y":320,"wires":[["c002b74d.a2acb8"]]},{"id":"23324cfb.938044","type":"trigger","z":"57c92b42.8228b4","op1":"","op2":"","op1type":"pay","op2type":"nul","duration":"1","extend":true,"units":"s","reset":"","name":"3s","x":370,"y":120,"wires":[["5c38f948.47e858"]]},{"id":"c002b74d.a2acb8","type":"function","z":"57c92b42.8228b4","name":"","func":"if (parseInt(msg.payload) ==1) { msg.payload = \"https://www.internet-radio.com/servers/tools/playlistgenerator/?u=http://pulseedm.cdnstream1.com:8124/1373_128.m3u&t=.m3u\"; }\nelse if (parseInt(msg.payload) ==2) { msg.payload = \"https://www.internet-radio.com/servers/tools/playlistgenerator/?u=http://uk6.internet-radio.com:8454/listen.pls&t=.m3u\"; }\nelse if (parseInt(msg.payload) ==3) { msg.payload = \"https://www.internet-radio.com/servers/tools/playlistgenerator/?u=http://uk2.internet-radio.com:8024/listen.pls&t=.m3u\"; }\nelse if (parseInt(msg.payload) ==4) { msg.payload = \"https://www.internet-radio.com/servers/tools/playlistgenerator/?u=http://uk6.internet-radio.com:8152/live.m3u&t=.m3u\"; }\nelse if (parseInt(msg.payload) ==5) { msg.payload = \"https://www.internet-radio.com/servers/tools/playlistgenerator/?u=http://www.partyviberadio.com:8010/listen.pls?sid=1&t=.m3u\"; }\nelse if (parseInt(msg.payload) ==6) { msg.payload = \"https://www.internet-radio.com/servers/tools/playlistgenerator/?u=http://uk5.internet-radio.com:8306/listen.pls&t=.m3u\"; }\nelse if (parseInt(msg.payload) ==7) { msg.payload = \"https://www.internet-radio.com/servers/tools/playlistgenerator/?u=http://uk6.internet-radio.com:8171/live.m3u&t=.m3u\"; }\nelse if (parseInt(msg.payload) ==8) { msg.payload = \"https://www.internet-radio.com/servers/tools/playlistgenerator/?u=http://uk1.internet-radio.com:8054/listen.pls&t=.m3u\"; }\nelse { \n    \n    msg.payload = \"1\";\n    return [null,msg]; \n\n}\n\n\nreturn msg;","outputs":"2","noerr":0,"x":250,"y":260,"wires":[["23324cfb.938044"],["9f776a98.f76118"]]},{"id":"157755af.0df72a","type":"inject","z":"57c92b42.8228b4","name":"","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"x":90,"y":260,"wires":[["c002b74d.a2acb8"]]},{"id":"9ed53d5.f91abc","type":"exec","z":"57c92b42.8228b4","command":"pidof vlc","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":500,"y":320,"wires":[["c332b516.ca34c8"],[],[]]},{"id":"c332b516.ca34c8","type":"exec","z":"57c92b42.8228b4","command":"kill","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":670,"y":320,"wires":[[],[],[]]},{"id":"5a20aae.7071e54","type":"inject","z":"57c92b42.8228b4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":592,"y":630,"wires":[[]]},{"id":"64488451.60931c","type":"ui_slider","z":"57c92b42.8228b4","name":"","label":"slider","group":"2d125913.7b1f56","order":0,"width":0,"height":0,"passthru":true,"topic":"","min":"-2400","max":"400","step":1,"x":610,"y":680,"wires":[["41f67551.86529c"]]},{"id":"39397de5.39a1ea","type":"exec","z":"57c92b42.8228b4","command":"amixer set PCM -- ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":1050,"y":780,"wires":[[],[],[]]},{"id":"41f67551.86529c","type":"trigger","z":"57c92b42.8228b4","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"500","extend":false,"units":"ms","reset":"","name":"","x":780,"y":680,"wires":[["39397de5.39a1ea"]]},{"id":"692ffa3e.c86d94","type":"mqtt in","z":"57c92b42.8228b4","name":"","topic":"ihiu/Noy3ahja/radiovolume","qos":"0","broker":"d13401c2.3bc3a","x":670,"y":780,"wires":[["2378fba5.d76c6c"]]},{"id":"2378fba5.d76c6c","type":"function","z":"57c92b42.8228b4","name":"","func":"var incom = parseInt(msg.payload);\n\nincom = parseInt((28 * incom) - 2400);\n\nif (incom< -2400) { incom = -2400; }\nif (incom > 400) { incom = 400; }\n\nmsg.payload = incom;\n\nreturn msg;","outputs":1,"noerr":0,"x":870,"y":780,"wires":[["39397de5.39a1ea"]]},{"id":"998e3339.dbfdf8","type":"inject","z":"57c92b42.8228b4","name":"","topic":"","payload":"10","payloadType":"num","repeat":"","crontab":"","once":true,"x":710,"y":860,"wires":[["2378fba5.d76c6c"]]},{"id":"2d125913.7b1f56","type":"ui_group","z":"57c92b42.8228b4","name":"Radio","tab":"24789d17.492c72","order":2,"disp":false,"width":"6"},{"id":"550e7a29.0775f4","type":"ui_group","z":"57c92b42.8228b4","name":"Buttons","tab":"24789d17.492c72","order":1,"disp":false,"width":"6"},{"id":"1868193e.9bda27","type":"mqtt-broker","z":"","broker":"heatweb.ddns.net","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"d13401c2.3bc3a","type":"mqtt-broker","z":"","broker":"192.168.0.99","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"24789d17.492c72","type":"ui_tab","z":"57c92b42.8228b4","name":"Radio","icon":"dashboard"}]

Alexa

cd .node-red
sudo npm install node-red-contrib-alexa-home-skill
[{"id":"fdf92c03.0ea07","type":"alexa-home","z":"88299879.c934f8","conf":"b66a6471.a7725","device":"17110","acknoledge":false,"name":"Central Heating","topic":"","x":177.49998474121094,"y":141.59999084472656,"wires":[["c3814888.d1f7d8","cb38306b.053d4","80eb1e78.ca146"]]},{"id":"c3814888.d1f7d8","type":"debug","z":"88299879.c934f8","name":"","active":true,"console":"false","complete":"false","x":630,"y":140,"wires":[]},{"id":"cb38306b.053d4","type":"change","z":"88299879.c934f8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"command","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":200,"wires":[["c3814888.d1f7d8"]]},{"id":"80eb1e78.ca146","type":"switch","z":"88299879.c934f8","name":"","property":"command","propertyType":"msg","rules":[{"t":"eq","v":"GetTemperatureReadingRequest","vt":"str"},{"t":"eq","v":"SetTargetTemperatureRequest","vt":"str"},{"t":"eq","v":"IncrementTargetTemperatureRequest","vt":"str"},{"t":"eq","v":"DecrementTargetTemperatureRequest","vt":"str"},{"t":"eq","v":"TurnOnRequest","vt":"str"},{"t":"eq","v":"TurnOffRequest","vt":"str"}],"checkall":"false","outputs":6,"x":370,"y":320,"wires":[["86157e8e.62a32"],["e7b1ee43.341ec8"],["16ccd912.5d6097"],["16ccd912.5d6097"],["637c9dbe.82690c"],["637c9dbe.82690c"]]},{"id":"18d55534.411b93","type":"alexa-home-resp","z":"88299879.c934f8","x":820,"y":300,"wires":[]},{"id":"e7b1ee43.341ec8","type":"function","z":"88299879.c934f8","name":"","func":"if (msg.payload < 10 || msg.payload > 30) {\n    var range = {\n        min: 10.0,\n        max: 30.0\n    }\n    msg.payload = false;\n    msg.extra = range;\n    \n\n} else {\n    msg.extra = {\n        targetTemperature: {\n            value: msg.payload\n        }\n    };\n    \n    global.set(\"CentralHeatingTargetTemperature\",msg.payload);\n    msg.payload = true;\n    \n}\n    \nreturn msg;","outputs":1,"noerr":0,"x":570,"y":300,"wires":[["18d55534.411b93"]]},{"id":"637c9dbe.82690c","type":"change","z":"88299879.c934f8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":400,"wires":[["18d55534.411b93"]]},{"id":"86157e8e.62a32","type":"function","z":"88299879.c934f8","name":"","func":"msg.extra = {\n    \"temperatureReading\": {\n        \"value\": 21.11\n    },\n    \"applianceResponseTimestamp\": new Date().toISOString()\n};\nmsg.payload = true;\nreturn msg; ","outputs":1,"noerr":0,"x":570,"y":260,"wires":[["18d55534.411b93"]]},{"id":"16ccd912.5d6097","type":"function","z":"88299879.c934f8","name":"","func":"cv = global.get(\"CentralHeatingTargetTemperature\")|| 19;\n\ncv = cv + msg.payload;\n\nif (cv < 10 || msg.payload > 30) {\n    var range = {\n        min: 10.0,\n        max: 30.0\n    }\n    msg.payload = false;\n    msg.extra = range;\n    \n\n} else {\n    msg.extra = {\n        targetTemperature: {\n            value: cv\n        }\n    };\n    \n    global.set(\"CentralHeatingTargetTemperature\",cv);\n    msg.payload = true;\n    \n}\n    \nreturn msg;","outputs":1,"noerr":0,"x":570,"y":340,"wires":[["18d55534.411b93"]]},{"id":"b66a6471.a7725","type":"alexa-home-conf","z":"","username":"admin@heatweb.com"}]

or

cd .node-red
sudo npm install node-red-contrib-wemo-emulator


[{"id":"91f7f464.370fb8","type":"debug","z":"2da36d32.fd2722","name":"","active":true,"console":"false","complete":"false","x":400,"y":280,"wires":[]},{"id":"f1f05302.a844d","type":"wemo-emulator","z":"2da36d32.fd2722","name":"Radio","friendlyName":"Stereo","serial":"shedradio","port":"10500","onTopic":"radio","onPayload":"1","offTopic":"radio","offPayload":"0","x":230,"y":280,"wires":[["91f7f464.370fb8"]]}]

Say, "Alexa, discover devices"

Panel Lights

[{"id":"f6a546d2.f29548","type":"template","z":"57c92b42.8228b4","name":"","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<svg\n   xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n   xmlns:cc=\"http://creativecommons.org/ns#\"\n   xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n   xmlns:svg=\"http://www.w3.org/2000/svg\"\n   xmlns=\"http://www.w3.org/2000/svg\"\n   xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n   version=\"1.1\"\n   width=\"349.88177\"\n   height=\"81.220741\"\n   id=\"svg11656\">\n  <defs\n     id=\"defs11658\">\n    <linearGradient\n       id=\"linearGradient12443\">\n      <stop\n         id=\"stop12445\"\n         style=\"stop-color:#ffeeee;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449\"\n         style=\"stop-color:#ffeeee;stop-opacity:0.69803923\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447\"\n         style=\"stop-color:#ffeeee;stop-opacity:0.32156864\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"64.566124\"\n       cy=\"68.451027\"\n       r=\"52.895233\"\n       fx=\"64.566124\"\n       fy=\"68.451027\"\n       id=\"radialGradient12390\"\n       xlink:href=\"#linearGradient12384\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.85627139,0.52833769,-0.52510744,0.85103595,45.22418,-23.91598)\" />\n    <linearGradient\n       id=\"linearGradient12384\">\n      <stop\n         id=\"stop12386\"\n         style=\"stop-color:#00ff00;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12388\"\n         style=\"stop-color:#00ff00;stop-opacity:0\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424\"\n       xlink:href=\"#linearGradient12443\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-3\"\n       xlink:href=\"#linearGradient12443-9\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-9\">\n      <stop\n         id=\"stop12445-4\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-8\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-8\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-1\"\n       xlink:href=\"#linearGradient12443-0\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-0\">\n      <stop\n         id=\"stop12445-9\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-1\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-2\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-6\"\n       xlink:href=\"#linearGradient12443-05\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-05\">\n      <stop\n         id=\"stop12445-1\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-6\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-0\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-8\"\n       xlink:href=\"#linearGradient12443-5\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-5\">\n      <stop\n         id=\"stop12445-3\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-5\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-5\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-9\"\n       xlink:href=\"#linearGradient12443-92\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-92\">\n      <stop\n         id=\"stop12445-31\"\n         style=\"stop-color:#eeffee;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-9\"\n         style=\"stop-color:#eeffee;stop-opacity:0.69803923\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-03\"\n         style=\"stop-color:#eeffee;stop-opacity:0.32156864\"\n         offset=\"1\" />\n    </linearGradient>\n  </defs>\n  <metadata\n     id=\"metadata11661\">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about=\"\">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     transform=\"translate(181.19614,-15.097454)\"\n     id=\"layer1\">\n    <rect\n       width=\"346.98798\"\n       height=\"78.330612\"\n       x=\"-179.40961\"\n       y=\"16.880301\"\n       id=\"rect13194-7-6\"\n       style=\"opacity:0.64125564;color:#000000;fill:#a8a8a8;fill-opacity:1;fill-rule:nonzero;stroke:#b3b3b3;stroke-width:0.21456084;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <rect\n       width=\"347.06204\"\n       height=\"78.479576\"\n       x=\"-180.08867\"\n       y=\"16.417341\"\n       id=\"rect13194-7\"\n       style=\"opacity:0.64125564;color:#000000;fill:#a8a8a8;fill-opacity:1;fill-rule:nonzero;stroke:#b3b3b3;stroke-width:0.21494237;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <rect\n       width=\"346.98798\"\n       height=\"78.330612\"\n       x=\"-179.65927\"\n       y=\"16.204735\"\n       id=\"rect13194\"\n       style=\"color:#000000;fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:#b3b3b3;stroke-width:0.21456084;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 157.79758,53.067217 c -0.0647,0.35461 -2.29944,19.221891 -2.37696,19.571527 -3.20701,14.464381 -17.30045,24.581698 -31.99301,22.748274 -15.04771,-1.877745 -22.21804,-15.846354 -22.28621,-30.604592 -0.006,-1.223131 -0.91075,-13.866471 -0.5339,-15.039318 l 27.78017,18.439259 z\"\n       id=\"path11874-2-8-6\"\n       style=\"opacity:0.30493272;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.3499999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 152.30255,71.121586 C 152.06314,71.388108 140.33369,86.20696 140.08612,86.462444 129.84399,97.031857 112.76464,98.147431 101.42915,88.809362 89.819653,79.245578 91.119713,63.599525 98.774963,51.045909 99.409406,50.005513 105.2592,38.802352 106.18741,38.007215 l 13.6084,30.355452 z\"\n       id=\"path11874-2-8\"\n       style=\"opacity:0.30493272;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.3499999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 120.45925,69.89653 a 52.520233,52.520233 0 1 1 -105.040465,0 52.520233,52.520233 0 1 1 105.040465,0 z\"\n       transform=\"matrix(0.51384192,0,0,0.51384192,94.016446,18.385719)\"\n       id=\"path11874\"\n       style=\"color:#000000;fill:#ff0000;fill-opacity:1;stroke:#1a1a1a;stroke-width:0.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 120.45925,69.89653 a 52.520233,52.520233 0 1 1 -105.040465,0 52.520233,52.520233 0 1 1 105.040465,0 z\"\n       transform=\"matrix(0.51384192,0,0,0.51384192,94.016446,18.385701)\"\n       id=\"path11874-2\"\n       style=\"color:#000000;fill:url(#radialGradient12424);fill-opacity:1;stroke:#333333;stroke-width:6.3499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 119.95345,69.89653 a 52.014435,52.014435 0 1 1 -104.028867,0 52.014435,52.014435 0 1 1 104.028867,0 z\"\n       transform=\"matrix(0.48949856,0,0,0.48949856,95.558638,19.960528)\"\n       id=\"path11874-2-4\"\n       style=\"color:#000000;fill:none;stroke:#1a1a1a;stroke-width:1.54940331;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <text\n       x=\"128.92526\"\n       y=\"58.263992\"\n       id=\"text12451\"\n       xml:space=\"preserve\"\n       style=\"font-size:9.24915409px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#1a1a1a;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial Bold\"><tspan\n         x=\"128.92526\"\n         y=\"58.263992\"\n         id=\"tspan12453\">FAULT</tspan></text>\n    <path\n       d=\"M 113.09866,96.710363 A 52.520233,52.520233 0 0 1 17.403105,84.196754\"\n       transform=\"matrix(-0.4956237,-0.13561222,0.13561222,-0.4956237,152.96688,98.010525)\"\n       id=\"path11874-2-3\"\n       style=\"color:#000000;fill:none;stroke:#333333;stroke-width:3.6500001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 94.199133,115.38039 A 52.520233,52.520233 0 0 1 28.181462,104.21433\"\n       transform=\"matrix(-0.4956237,-0.13561222,0.13561222,-0.4956237,152.96688,98.010525)\"\n       id=\"path11874-2-3-8\"\n       style=\"color:#000000;fill:none;stroke:#666666;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 120.45925,69.89653 a 52.520233,52.520233 0 1 1 -105.040465,0 52.520233,52.520233 0 1 1 105.040465,0 z\"\n       transform=\"matrix(0.54263262,0,0,0.54036679,92.046649,16.547366)\"\n       id=\"path11874-2-42\"\n       style=\"color:#000000;fill:#ff0000;fill-opacity:0.11229948;stroke:#333333;stroke-width:0.22692586;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 74.703391,121.97933 A 52.520233,52.520233 0 0 1 36.185332,111.73047\"\n       transform=\"matrix(-0.4956237,-0.13561222,0.13561222,-0.4956237,152.96688,98.010525)\"\n       id=\"path11874-2-3-8-5\"\n       style=\"color:#000000;fill:none;stroke:#cccccc;stroke-width:0.94999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 94.199133,115.38039 A 52.520233,52.520233 0 0 1 28.181462,104.21433\"\n       transform=\"matrix(0.49063853,0.15266742,-0.15266742,0.49063853,106.2105,9.7113841)\"\n       id=\"path11874-2-3-8-3\"\n       style=\"color:#000000;fill:none;stroke:#4d4d4d;stroke-width:1.45000005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 86.39744,53.067217 C 86.33274,53.421827 84.098,72.289108 84.020484,72.638744 80.813465,87.103125 66.720031,97.220442 52.027473,95.387018 36.979766,93.509273 29.809429,79.540664 29.741257,64.782426 29.735561,63.559295 28.83051,50.915955 29.207361,49.743108 l 27.780178,18.439259 z\"\n       id=\"path11874-2-8-6-2\"\n       style=\"opacity:0.30493272;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.3499999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 80.728528,71.121586 C 80.489898,71.388108 68.798543,86.20696 68.551772,86.462444 58.342926,97.031857 41.319056,98.147431 30.020387,88.809362 18.448603,79.245578 19.74444,63.599525 27.374822,51.045909 28.007206,50.005513 33.837988,38.802352 34.763187,38.007215 l 13.564204,30.355452 z\"\n       id=\"path11874-2-8-9\"\n       style=\"opacity:0.30493272;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.3499999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 120.45925,69.89653 a 52.520233,52.520233 0 1 1 -105.040465,0 52.520233,52.520233 0 1 1 105.040465,0 z\"\n       transform=\"matrix(0.51384192,0,0,0.51384192,22.616305,18.385719)\"\n       id=\"path11874-8\"\n       style=\"color:#000000;fill:#00ff00;fill-opacity:1;stroke:#1a1a1a;stroke-width:0.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 120.45925,69.89653 a 52.520233,52.520233 0 1 1 -105.040465,0 52.520233,52.520233 0 1 1 105.040465,0 z\"\n       transform=\"matrix(0.51384192,0,0,0.51384192,22.616305,18.385701)\"\n       id=\"path11874-2-32\"\n       style=\"color:#000000;fill:url(#radialGradient12424-9);fill-opacity:1;stroke:#333333;stroke-width:6.3499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 119.95345,69.89653 a 52.014435,52.014435 0 1 1 -104.028867,0 52.014435,52.014435 0 1 1 104.028867,0 z\"\n       transform=\"matrix(0.48949856,0,0,0.48949856,24.158497,19.960528)\"\n       id=\"path11874-2-4-1\"\n       style=\"color:#000000;fill:none;stroke:#1a1a1a;stroke-width:1.54940331;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <text\n       x=\"57.52512\"\n       y=\"58.263992\"\n       id=\"text12451-3\"\n       xml:space=\"preserve\"\n       style=\"font-size:9.24915409px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#1a1a1a;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial Bold\"><tspan\n         x=\"57.52512\"\n         y=\"58.263992\"\n         id=\"tspan12453-2\">INTERNET</tspan></text>\n    <path\n       d=\"M 113.09866,96.710363 A 52.520233,52.520233 0 0 1 17.403105,84.196754\"\n       transform=\"matrix(-0.4956237,-0.13561222,0.13561222,-0.4956237,81.566744,98.010525)\"\n       id=\"path11874-2-3-3\"\n       style=\"color:#000000;fill:none;stroke:#333333;stroke-width:3.6500001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 94.199133,115.38039 A 52.520233,52.520233 0 0 1 28.181462,104.21433\"\n       transform=\"matrix(-0.4956237,-0.13561222,0.13561222,-0.4956237,81.566744,98.010525)\"\n       id=\"path11874-2-3-8-2\"\n       style=\"color:#000000;fill:none;stroke:#666666;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 120.45925,69.89653 a 52.520233,52.520233 0 1 1 -105.040465,0 52.520233,52.520233 0 1 1 105.040465,0 z\"\n       transform=\"matrix(0.54263262,0,0,0.54036679,20.646508,16.547366)\"\n       id=\"path11874-2-42-2\"\n       style=\"color:#000000;fill:#00ff00;fill-opacity:0.11229948;stroke:#333333;stroke-width:0.22692586;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 74.703391,121.97933 A 52.520233,52.520233 0 0 1 36.185332,111.73047\"\n       transform=\"matrix(-0.4956237,-0.13561222,0.13561222,-0.4956237,81.566744,98.010525)\"\n       id=\"path11874-2-3-8-5-4\"\n       style=\"color:#000000;fill:none;stroke:#cccccc;stroke-width:0.94999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 94.199133,115.38039 A 52.520233,52.520233 0 0 1 28.181462,104.21433\"\n       transform=\"matrix(0.49063853,0.15266742,-0.15266742,0.49063853,34.810364,9.7113841)\"\n       id=\"path11874-2-3-8-3-4\"\n       style=\"color:#000000;fill:none;stroke:#4d4d4d;stroke-width:1.45000005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <text\n       x=\"-169.97375\"\n       y=\"44.617607\"\n       id=\"text13298\"\n       xml:space=\"preserve\"\n       style=\"font-size:20.43070602px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial\"><tspan\n         x=\"-169.97375\"\n         y=\"44.617607\"\n         id=\"tspan13300\">PANEL_TITLE</tspan></text>\n    <text\n       x=\"-170.48338\"\n       y=\"65.803436\"\n       id=\"text13298-9\"\n       xml:space=\"preserve\"\n       style=\"font-size:13.86375141px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial\"><tspan\n         x=\"-170.48338\"\n         y=\"65.803436\"\n         id=\"tspan13300-4\">PANEL_TEXT1</tspan></text>\n    <text\n       x=\"-170.48338\"\n       y=\"82.140503\"\n       id=\"text13298-9-6\"\n       xml:space=\"preserve\"\n       style=\"font-size:13.86375141px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial\"><tspan\n         x=\"-170.48338\"\n         y=\"82.140503\"\n         id=\"tspan13300-4-1\">PANEL_TEXT2</tspan></text>\n  </g>\n</svg>\n","output":"str","x":290,"y":1680,"wires":[["f97b7f72.a8fa6","10fab72b.511ef9","63edda4e.b6c234"]]},{"id":"b13437a8.b6b0f8","type":"inject","z":"57c92b42.8228b4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":140,"y":1680,"wires":[["f6a546d2.f29548","a7486834.e410b8","cfcc0f22.555ac","c5b98512.c0fb48"]]},{"id":"b7574df9.4ee69","type":"ui_template","z":"57c92b42.8228b4","group":"d40e5c3c.9b6a3","name":"","order":0,"width":"5","height":"2","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":600,"y":1680,"wires":[[]]},{"id":"f97b7f72.a8fa6","type":"change","z":"57c92b42.8228b4","name":"","rules":[{"t":"change","p":"template","pt":"msg","from":"PANEL_TITLE","fromt":"str","to":"VPN","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"PANEL_TEXT1","fromt":"str","to":"102.168.0.4","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"PANEL_TEXT2","fromt":"str","to":" ","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"INTERNET","fromt":"str","to":"","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"FAULT","fromt":"str","to":"","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"#eeffee","fromt":"str","to":"#225522","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"#00ff00","fromt":"str","to":"#003300","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":1680,"wires":[["b7574df9.4ee69"]]},{"id":"2ee13dd9.249262","type":"ui_template","z":"57c92b42.8228b4","group":"d40e5c3c.9b6a3","name":"","order":0,"width":"5","height":"2","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":600,"y":1740,"wires":[[]]},{"id":"cb06ff92.e3ca6","type":"ui_template","z":"57c92b42.8228b4","group":"d40e5c3c.9b6a3","name":"","order":0,"width":"5","height":"2","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":600,"y":1800,"wires":[[]]},{"id":"9fb9a493.5c3978","type":"ui_template","z":"57c92b42.8228b4","group":"d40e5c3c.9b6a3","name":"","order":0,"width":"5","height":"2","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":600,"y":1860,"wires":[[]]},{"id":"10fab72b.511ef9","type":"change","z":"57c92b42.8228b4","name":"","rules":[{"t":"change","p":"template","pt":"msg","from":"PANEL_TITLE","fromt":"str","to":"Boiler Pump 1","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"PANEL_TEXT1","fromt":"str","to":"102.168.0.4","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"PANEL_TEXT2","fromt":"str","to":" ","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":439,"y":1743,"wires":[["2ee13dd9.249262"]]},{"id":"63edda4e.b6c234","type":"change","z":"57c92b42.8228b4","name":"","rules":[{"t":"change","p":"template","pt":"msg","from":"PANEL_TITLE","fromt":"str","to":"VPN","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"PANEL_TEXT1","fromt":"str","to":"102.168.0.4","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"PANEL_TEXT2","fromt":"str","to":" ","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":1800,"wires":[["cb06ff92.e3ca6"]]},{"id":"a7486834.e410b8","type":"template","z":"57c92b42.8228b4","name":"","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n\n<svg\n   xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n   xmlns:cc=\"http://creativecommons.org/ns#\"\n   xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n   xmlns:svg=\"http://www.w3.org/2000/svg\"\n   xmlns=\"http://www.w3.org/2000/svg\"\n   xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n   version=\"1.1\"\n   width=\"349.88177\"\n   height=\"81.220741\"\n   id=\"svg11656\">\n  <defs\n     id=\"defs11658\">\n    <linearGradient\n       id=\"linearGradient12443\">\n      <stop\n         id=\"stop12445\"\n         style=\"stop-color:#ffeeee;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449\"\n         style=\"stop-color:#ffeeee;stop-opacity:0.69803923\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447\"\n         style=\"stop-color:#ffeeee;stop-opacity:0.32156864\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"64.566124\"\n       cy=\"68.451027\"\n       r=\"52.895233\"\n       fx=\"64.566124\"\n       fy=\"68.451027\"\n       id=\"radialGradient12390\"\n       xlink:href=\"#linearGradient12384\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.85627139,0.52833769,-0.52510744,0.85103595,45.22418,-23.91598)\" />\n    <linearGradient\n       id=\"linearGradient12384\">\n      <stop\n         id=\"stop12386\"\n         style=\"stop-color:#00ff00;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12388\"\n         style=\"stop-color:#00ff00;stop-opacity:0\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424\"\n       xlink:href=\"#linearGradient12443\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-3\"\n       xlink:href=\"#linearGradient12443-9\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-9\">\n      <stop\n         id=\"stop12445-4\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-8\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-8\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-1\"\n       xlink:href=\"#linearGradient12443-0\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-0\">\n      <stop\n         id=\"stop12445-9\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-1\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-2\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-6\"\n       xlink:href=\"#linearGradient12443-05\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-05\">\n      <stop\n         id=\"stop12445-1\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-6\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-0\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-8\"\n       xlink:href=\"#linearGradient12443-5\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-5\">\n      <stop\n         id=\"stop12445-3\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-5\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-5\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-9\"\n       xlink:href=\"#linearGradient12443-92\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-92\">\n      <stop\n         id=\"stop12445-31\"\n         style=\"stop-color:#eeffee;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-9\"\n         style=\"stop-color:#eeffee;stop-opacity:0.69803923\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-03\"\n         style=\"stop-color:#eeffee;stop-opacity:0.32156864\"\n         offset=\"1\" />\n    </linearGradient>\n  </defs>\n  <metadata\n     id=\"metadata11661\">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about=\"\">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     transform=\"translate(181.19614,-15.097454)\"\n     id=\"layer1\">\n    <rect\n       width=\"346.98798\"\n       height=\"78.330612\"\n       x=\"-179.40961\"\n       y=\"16.880301\"\n       id=\"rect13194-7-6\"\n       style=\"opacity:0.64125564;color:#000000;fill:#a8a8a8;fill-opacity:1;fill-rule:nonzero;stroke:#b3b3b3;stroke-width:0.21456084;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <rect\n       width=\"347.06204\"\n       height=\"78.479576\"\n       x=\"-180.08867\"\n       y=\"16.417341\"\n       id=\"rect13194-7\"\n       style=\"opacity:0.64125564;color:#000000;fill:#a8a8a8;fill-opacity:1;fill-rule:nonzero;stroke:#b3b3b3;stroke-width:0.21494237;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <rect\n       width=\"346.98798\"\n       height=\"78.330612\"\n       x=\"-179.65927\"\n       y=\"16.204735\"\n       id=\"rect13194\"\n       style=\"color:#000000;fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:#b3b3b3;stroke-width:0.21456084;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 157.79758,53.067217 c -0.0647,0.35461 -2.29944,19.221891 -2.37696,19.571527 -3.20701,14.464381 -17.30045,24.581698 -31.99301,22.748274 -15.04771,-1.877745 -22.21804,-15.846354 -22.28621,-30.604592 -0.006,-1.223131 -0.91075,-13.866471 -0.5339,-15.039318 l 27.78017,18.439259 z\"\n       id=\"path11874-2-8-6\"\n       style=\"opacity:0.30493272;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.3499999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 152.30255,71.121586 C 152.06314,71.388108 140.33369,86.20696 140.08612,86.462444 129.84399,97.031857 112.76464,98.147431 101.42915,88.809362 89.819653,79.245578 91.119713,63.599525 98.774963,51.045909 99.409406,50.005513 105.2592,38.802352 106.18741,38.007215 l 13.6084,30.355452 z\"\n       id=\"path11874-2-8\"\n       style=\"opacity:0.30493272;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.3499999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 120.45925,69.89653 a 52.520233,52.520233 0 1 1 -105.040465,0 52.520233,52.520233 0 1 1 105.040465,0 z\"\n       transform=\"matrix(0.51384192,0,0,0.51384192,94.016446,18.385719)\"\n       id=\"path11874\"\n       style=\"color:#000000;fill:#ff0000;fill-opacity:1;stroke:#1a1a1a;stroke-width:0.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 120.45925,69.89653 a 52.520233,52.520233 0 1 1 -105.040465,0 52.520233,52.520233 0 1 1 105.040465,0 z\"\n       transform=\"matrix(0.51384192,0,0,0.51384192,94.016446,18.385701)\"\n       id=\"path11874-2\"\n       style=\"color:#000000;fill:url(#radialGradient12424);fill-opacity:1;stroke:#333333;stroke-width:6.3499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 119.95345,69.89653 a 52.014435,52.014435 0 1 1 -104.028867,0 52.014435,52.014435 0 1 1 104.028867,0 z\"\n       transform=\"matrix(0.48949856,0,0,0.48949856,95.558638,19.960528)\"\n       id=\"path11874-2-4\"\n       style=\"color:#000000;fill:none;stroke:#1a1a1a;stroke-width:1.54940331;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <text\n       x=\"128.92526\"\n       y=\"58.263992\"\n       id=\"text12451\"\n       xml:space=\"preserve\"\n       style=\"font-size:9.24915409px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#1a1a1a;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial Bold\"><tspan\n         x=\"128.92526\"\n         y=\"58.263992\"\n         id=\"tspan12453\">FAULT</tspan></text>\n    <path\n       d=\"M 113.09866,96.710363 A 52.520233,52.520233 0 0 1 17.403105,84.196754\"\n       transform=\"matrix(-0.4956237,-0.13561222,0.13561222,-0.4956237,152.96688,98.010525)\"\n       id=\"path11874-2-3\"\n       style=\"color:#000000;fill:none;stroke:#333333;stroke-width:3.6500001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 94.199133,115.38039 A 52.520233,52.520233 0 0 1 28.181462,104.21433\"\n       transform=\"matrix(-0.4956237,-0.13561222,0.13561222,-0.4956237,152.96688,98.010525)\"\n       id=\"path11874-2-3-8\"\n       style=\"color:#000000;fill:none;stroke:#666666;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 120.45925,69.89653 a 52.520233,52.520233 0 1 1 -105.040465,0 52.520233,52.520233 0 1 1 105.040465,0 z\"\n       transform=\"matrix(0.54263262,0,0,0.54036679,92.046649,16.547366)\"\n       id=\"path11874-2-42\"\n       style=\"color:#000000;fill:#ff0000;fill-opacity:0.11229948;stroke:#333333;stroke-width:0.22692586;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 74.703391,121.97933 A 52.520233,52.520233 0 0 1 36.185332,111.73047\"\n       transform=\"matrix(-0.4956237,-0.13561222,0.13561222,-0.4956237,152.96688,98.010525)\"\n       id=\"path11874-2-3-8-5\"\n       style=\"color:#000000;fill:none;stroke:#cccccc;stroke-width:0.94999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"M 94.199133,115.38039 A 52.520233,52.520233 0 0 1 28.181462,104.21433\"\n       transform=\"matrix(0.49063853,0.15266742,-0.15266742,0.49063853,106.2105,9.7113841)\"\n       id=\"path11874-2-3-8-3\"\n       style=\"color:#000000;fill:none;stroke:#4d4d4d;stroke-width:1.45000005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <text\n       x=\"-169.97375\"\n       y=\"44.617607\"\n       id=\"text13298\"\n       xml:space=\"preserve\"\n       style=\"font-size:20.43070602px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial\"><tspan\n         x=\"-169.97375\"\n         y=\"44.617607\"\n         id=\"tspan13300\">PANEL_TITLE</tspan></text>\n    <text\n       x=\"-170.48338\"\n       y=\"65.803436\"\n       id=\"text13298-9\"\n       xml:space=\"preserve\"\n       style=\"font-size:13.86375141px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial\"><tspan\n         x=\"-170.48338\"\n         y=\"65.803436\"\n         id=\"tspan13300-4\">PANEL_TEXT1</tspan></text>\n    <text\n       x=\"-170.48338\"\n       y=\"82.140503\"\n       id=\"text13298-9-6\"\n       xml:space=\"preserve\"\n       style=\"font-size:13.86375141px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial\"><tspan\n         x=\"-170.48338\"\n         y=\"82.140503\"\n         id=\"tspan13300-4-1\">PANEL_TEXT2</tspan></text>\n  </g>\n</svg>\n","output":"str","x":290,"y":1860,"wires":[["ce30cfcd.78372"]]},{"id":"ce30cfcd.78372","type":"change","z":"57c92b42.8228b4","name":"","rules":[{"t":"change","p":"template","pt":"msg","from":"PANEL_TITLE","fromt":"str","to":"POWER 24VDC","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"PANEL_TEXT1","fromt":"str","to":"102.168.0.4","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"PANEL_TEXT2","fromt":"str","to":" ","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"FAULT","fromt":"str","to":"","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"#ffeeee","fromt":"str","to":"#000000","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"#ff0000","fromt":"str","to":"#220000","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":1860,"wires":[["9fb9a493.5c3978"]]},{"id":"cfcc0f22.555ac","type":"template","z":"57c92b42.8228b4","name":"portrait_white_single","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n\n<svg\n   xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n   xmlns:cc=\"http://creativecommons.org/ns#\"\n   xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n   xmlns:svg=\"http://www.w3.org/2000/svg\"\n   xmlns=\"http://www.w3.org/2000/svg\"\n   xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n   version=\"1.1\"\n   width=\"114.13507\"\n   height=\"172.28593\"\n   id=\"svg11656\">\n  <defs\n     id=\"defs11658\">\n    <linearGradient\n       id=\"linearGradient12443\">\n      <stop\n         id=\"stop12445\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"64.566124\"\n       cy=\"68.451027\"\n       r=\"52.895233\"\n       fx=\"64.566124\"\n       fy=\"68.451027\"\n       id=\"radialGradient12390\"\n       xlink:href=\"#linearGradient12384\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.85627139,0.52833769,-0.52510744,0.85103595,45.22418,-23.91598)\" />\n    <linearGradient\n       id=\"linearGradient12384\">\n      <stop\n         id=\"stop12386\"\n         style=\"stop-color:#00ff00;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12388\"\n         style=\"stop-color:#00ff00;stop-opacity:0\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424\"\n       xlink:href=\"#linearGradient12443\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-3\"\n       xlink:href=\"#linearGradient12443-9\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-9\">\n      <stop\n         id=\"stop12445-4\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-8\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-8\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-1\"\n       xlink:href=\"#linearGradient12443-0\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-0\">\n      <stop\n         id=\"stop12445-9\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-1\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-2\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-6\"\n       xlink:href=\"#linearGradient12443-05\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-05\">\n      <stop\n         id=\"stop12445-1\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-6\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-0\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-8\"\n       xlink:href=\"#linearGradient12443-5\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-5\">\n      <stop\n         id=\"stop12445-3\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-5\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-5\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient13423\"\n       xlink:href=\"#linearGradient12443\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02276055,-0.8876612,0.83259734,0.02135319,-7.3877263,127.67327)\" />\n  </defs>\n  <metadata\n     id=\"metadata11661\">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about=\"\">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     transform=\"matrix(0.74123948,0,0,2.8459876,14.388077,-416.91549)\"\n     id=\"g13464\">\n    <rect\n       width=\"149.85988\"\n       height=\"58.730415\"\n       x=\"-18.061743\"\n       y=\"147.94702\"\n       id=\"rect13194-5\"\n       style=\"opacity:0.5;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.12209609;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <rect\n       width=\"149.63264\"\n       height=\"59.190804\"\n       x=\"-16.479591\"\n       y=\"146.89397\"\n       id=\"rect13194\"\n       style=\"color:#000000;fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:#b3b3b3;stroke-width:0.12248074;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  </g>\n  <path\n     d=\"m 104.05205,57.685981 c -0.1048,0.574777 -3.72708,31.156193 -3.85274,31.722911 C 95.00115,112.85379 72.157526,129.25265 48.342794,126.2809 23.952412,123.23731 12.330226,100.59601 12.219732,76.67481 12.210573,74.69229 10.743528,54.199064 11.354354,52.298048 l 45.028066,29.88764 z\"\n     id=\"path11874-2-8-6\"\n     style=\"opacity:0.30493272;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.3499999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"M 96.3323,86.949784 C 95.93894,87.381774 76.666905,111.40121 76.26013,111.81532 59.431868,128.94698 31.369721,130.75517 12.744992,115.61938 -6.3299337,100.11772 -4.1938758,74.757495 8.3840458,54.409722 9.4264658,52.723361 19.037927,34.564492 20.563024,33.275678 L 42.92226,82.477933 z\"\n     id=\"path11874-2-8\"\n     style=\"opacity:0.30493272;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.3499999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"m 101.62763,60.630815 a 43.742587,43.742587 0 1 1 -87.485172,0 43.742587,43.742587 0 1 1 87.485172,0 z\"\n     id=\"path11874\"\n     style=\"color:#000000;fill:#00ff00;fill-opacity:1;stroke:#1a1a1a;stroke-width:0.62465334;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"m 101.62763,60.630775 a 43.742587,43.742587 0 1 1 -87.485172,0 43.742587,43.742587 0 1 1 87.485172,0 z\"\n     id=\"path11874-2\"\n     style=\"color:#000000;fill:url(#radialGradient13423);fill-opacity:1;stroke:#333333;stroke-width:5.28873158;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"m 98.973001,60.425428 a 41.268965,41.268965 0 1 1 -82.537928,0 41.268965,41.268965 0 1 1 82.537928,0 z\"\n     id=\"path11874-2-4\"\n     style=\"color:#000000;fill:none;stroke:#1a1a1a;stroke-width:1.22931778;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"M 27.252634,28.925828 A 43.742585,43.742585 0 0 1 101.37825,60.013355\"\n     id=\"path11874-2-3\"\n     style=\"color:#000000;fill:none;stroke:#333333;stroke-width:3.0399797;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"M 46.539268,18.081717 A 43.742585,43.742585 0 0 1 97.119609,41.563212\"\n     id=\"path11874-2-3-8\"\n     style=\"color:#000000;fill:none;stroke:#666666;stroke-width:1.87396002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"m 104.05619,60.65617 a 46.193494,46.000607 0 1 1 -92.386984,0 46.193494,46.000607 0 1 1 92.386984,0 z\"\n     id=\"path11874-2-42\"\n     style=\"color:#000000;fill:#00ff00;fill-opacity:0.11229948;stroke:#333333;stroke-width:0.19917257;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"M 63.651523,17.065869 A 43.742585,43.742585 0 0 1 92.341887,33.765854\"\n     id=\"path11874-2-3-8-5\"\n     style=\"color:#000000;fill:none;stroke:#cccccc;stroke-width:0.79122752;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"M 67.427171,103.42358 A 43.742584,43.742584 0 0 1 17.688951,78.207297\"\n     id=\"path11874-2-3-8-3\"\n     style=\"color:#000000;fill:none;stroke:#4d4d4d;stroke-width:1.20766318;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <text\n     x=\"57.874676\"\n     y=\"143.91451\"\n     id=\"text12451\"\n     xml:space=\"preserve\"\n     style=\"font-size:17.66742134px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#1a1a1a;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial Bold\"><tspan\n       x=\"57.874676\"\n       y=\"143.91451\"\n       id=\"tspan12453\">TEXT1</tspan></text>\n  <text\n     x=\"57.359467\"\n     y=\"159.15472\"\n     id=\"text12451-4\"\n     xml:space=\"preserve\"\n     style=\"font-size:12.31593895px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#1a1a1a;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial Bold\"><tspan\n       x=\"57.359467\"\n       y=\"159.15472\"\n       id=\"tspan12453-3\">TEXT2</tspan></text>\n</svg>\n","output":"str","x":240,"y":2020,"wires":[["2b282dda.5202a2"]]},{"id":"9b7fd55e.060dc8","type":"ui_template","z":"57c92b42.8228b4","group":"d40e5c3c.9b6a3","name":"","order":0,"width":"2","height":"4","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":620,"y":2020,"wires":[[]]},{"id":"2b282dda.5202a2","type":"change","z":"57c92b42.8228b4","name":"","rules":[{"t":"change","p":"template","pt":"msg","from":"TEXT1","fromt":"str","to":"I/O","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"TEXT2","fromt":"str","to":"102.168.0.4","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"#00ff00","fromt":"str","to":"#aaaa00","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":2020,"wires":[["9b7fd55e.060dc8"]]},{"id":"c5b98512.c0fb48","type":"template","z":"57c92b42.8228b4","name":"portrait_rivets","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n\n<svg\n   xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n   xmlns:cc=\"http://creativecommons.org/ns#\"\n   xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n   xmlns:svg=\"http://www.w3.org/2000/svg\"\n   xmlns=\"http://www.w3.org/2000/svg\"\n   xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n   version=\"1.1\"\n   width=\"129.58122\"\n   height=\"172.23787\"\n   id=\"svg11656\">\n  <defs\n     id=\"defs11658\">\n    <linearGradient\n       id=\"linearGradient13490\">\n      <stop\n         id=\"stop13492\"\n         style=\"stop-color:#070707;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop13498\"\n         style=\"stop-color:#131313;stop-opacity:0.82352942\"\n         offset=\"0.77514106\" />\n      <stop\n         id=\"stop13494\"\n         style=\"stop-color:#4d4d4d;stop-opacity:0\"\n         offset=\"1\" />\n    </linearGradient>\n    <linearGradient\n       id=\"linearGradient13482\">\n      <stop\n         id=\"stop13484\"\n         style=\"stop-color:#000000;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop13486\"\n         style=\"stop-color:#000000;stop-opacity:1\"\n         offset=\"1\" />\n    </linearGradient>\n    <linearGradient\n       id=\"linearGradient13472\">\n      <stop\n         id=\"stop13474\"\n         style=\"stop-color:#b3b3b3;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop13476\"\n         style=\"stop-color:#333333;stop-opacity:1\"\n         offset=\"1\" />\n    </linearGradient>\n    <linearGradient\n       id=\"linearGradient12443\">\n      <stop\n         id=\"stop12445\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"64.566124\"\n       cy=\"68.451027\"\n       r=\"52.895233\"\n       fx=\"64.566124\"\n       fy=\"68.451027\"\n       id=\"radialGradient12390\"\n       xlink:href=\"#linearGradient12384\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.85627139,0.52833769,-0.52510744,0.85103595,45.22418,-23.91598)\" />\n    <linearGradient\n       id=\"linearGradient12384\">\n      <stop\n         id=\"stop12386\"\n         style=\"stop-color:#00ff00;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12388\"\n         style=\"stop-color:#00ff00;stop-opacity:0\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424\"\n       xlink:href=\"#linearGradient12443\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-3\"\n       xlink:href=\"#linearGradient12443-9\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-9\">\n      <stop\n         id=\"stop12445-4\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-8\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-8\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-1\"\n       xlink:href=\"#linearGradient12443-0\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-0\">\n      <stop\n         id=\"stop12445-9\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-1\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-2\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-6\"\n       xlink:href=\"#linearGradient12443-05\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-05\">\n      <stop\n         id=\"stop12445-1\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-6\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-0\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient12424-8\"\n       xlink:href=\"#linearGradient12443-5\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02732782,-1.0657846,0.99967129,0.02563805,-10.431775,150.39216)\" />\n    <linearGradient\n       id=\"linearGradient12443-5\">\n      <stop\n         id=\"stop12445-3\"\n         style=\"stop-color:#ffffff;stop-opacity:0.80000001\"\n         offset=\"0\" />\n      <stop\n         id=\"stop12449-5\"\n         style=\"stop-color:#ffffff;stop-opacity:0.69999999\"\n         offset=\"0.40932989\" />\n      <stop\n         id=\"stop12447-5\"\n         style=\"stop-color:#ffffff;stop-opacity:0.322\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"70.596664\"\n       cy=\"76.948669\"\n       r=\"52.895233\"\n       fx=\"70.596664\"\n       fy=\"76.948669\"\n       id=\"radialGradient13423\"\n       xlink:href=\"#linearGradient12443\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(0.02276055,-0.8876612,0.83259734,0.02135319,-0.58822608,127.62521)\" />\n    <radialGradient\n       cx=\"4.2609258\"\n       cy=\"8.1247683\"\n       r=\"3.03545\"\n       fx=\"4.2609258\"\n       fy=\"8.1247683\"\n       id=\"radialGradient13478\"\n       xlink:href=\"#linearGradient13472\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(-1.5559521,1.070099,-0.70756136,-1.0288124,15.310853,10.531527)\" />\n    <radialGradient\n       cx=\"2.4223218\"\n       cy=\"10.018702\"\n       r=\"1.2890719\"\n       fx=\"2.4223218\"\n       fy=\"10.018702\"\n       id=\"radialGradient13496\"\n       xlink:href=\"#linearGradient13490\"\n       gradientUnits=\"userSpaceOnUse\" />\n    <radialGradient\n       cx=\"4.2609258\"\n       cy=\"8.1247683\"\n       r=\"3.03545\"\n       fx=\"4.2609258\"\n       fy=\"8.1247683\"\n       id=\"radialGradient13504\"\n       xlink:href=\"#linearGradient13472\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(-1.5559521,1.070099,-0.70756136,-1.0288124,15.310853,10.531527)\" />\n    <radialGradient\n       cx=\"2.4223218\"\n       cy=\"10.018702\"\n       r=\"1.2890719\"\n       fx=\"2.4223218\"\n       fy=\"10.018702\"\n       id=\"radialGradient13506\"\n       xlink:href=\"#linearGradient13490\"\n       gradientUnits=\"userSpaceOnUse\" />\n    <radialGradient\n       cx=\"4.2609258\"\n       cy=\"8.1247683\"\n       r=\"3.03545\"\n       fx=\"4.2609258\"\n       fy=\"8.1247683\"\n       id=\"radialGradient13504-4\"\n       xlink:href=\"#linearGradient13472-1\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(-1.5559521,1.070099,-0.70756136,-1.0288124,15.310853,10.531527)\" />\n    <linearGradient\n       id=\"linearGradient13472-1\">\n      <stop\n         id=\"stop13474-1\"\n         style=\"stop-color:#b3b3b3;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop13476-3\"\n         style=\"stop-color:#333333;stop-opacity:1\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"2.4223218\"\n       cy=\"10.018702\"\n       r=\"1.2890719\"\n       fx=\"2.4223218\"\n       fy=\"10.018702\"\n       id=\"radialGradient13506-1\"\n       xlink:href=\"#linearGradient13490-5\"\n       gradientUnits=\"userSpaceOnUse\" />\n    <linearGradient\n       id=\"linearGradient13490-5\">\n      <stop\n         id=\"stop13492-8\"\n         style=\"stop-color:#070707;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop13498-5\"\n         style=\"stop-color:#131313;stop-opacity:0.82352942\"\n         offset=\"0.77514106\" />\n      <stop\n         id=\"stop13494-5\"\n         style=\"stop-color:#4d4d4d;stop-opacity:0\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"2.4223218\"\n       cy=\"10.018702\"\n       r=\"1.2890719\"\n       fx=\"2.4223218\"\n       fy=\"10.018702\"\n       id=\"radialGradient13585\"\n       xlink:href=\"#linearGradient13490-5\"\n       gradientUnits=\"userSpaceOnUse\" />\n    <radialGradient\n       cx=\"4.2609258\"\n       cy=\"8.1247683\"\n       r=\"3.03545\"\n       fx=\"4.2609258\"\n       fy=\"8.1247683\"\n       id=\"radialGradient13504-4-8\"\n       xlink:href=\"#linearGradient13472-1-7\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(-1.5559521,1.070099,-0.70756136,-1.0288124,15.310853,10.531527)\" />\n    <linearGradient\n       id=\"linearGradient13472-1-7\">\n      <stop\n         id=\"stop13474-1-6\"\n         style=\"stop-color:#b3b3b3;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop13476-3-3\"\n         style=\"stop-color:#333333;stop-opacity:1\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"2.4223218\"\n       cy=\"10.018702\"\n       r=\"1.2890719\"\n       fx=\"2.4223218\"\n       fy=\"10.018702\"\n       id=\"radialGradient13585-7\"\n       xlink:href=\"#linearGradient13490-5-5\"\n       gradientUnits=\"userSpaceOnUse\" />\n    <linearGradient\n       id=\"linearGradient13490-5-5\">\n      <stop\n         id=\"stop13492-8-8\"\n         style=\"stop-color:#070707;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop13498-5-4\"\n         style=\"stop-color:#131313;stop-opacity:0.82352942\"\n         offset=\"0.77514106\" />\n      <stop\n         id=\"stop13494-5-7\"\n         style=\"stop-color:#4d4d4d;stop-opacity:0\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"4.2609258\"\n       cy=\"8.1247683\"\n       r=\"3.03545\"\n       fx=\"4.2609258\"\n       fy=\"8.1247683\"\n       id=\"radialGradient13504-2\"\n       xlink:href=\"#linearGradient13472-6\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(-1.5559521,1.070099,-0.70756136,-1.0288124,15.310853,10.531527)\" />\n    <linearGradient\n       id=\"linearGradient13472-6\">\n      <stop\n         id=\"stop13474-4\"\n         style=\"stop-color:#b3b3b3;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop13476-5\"\n         style=\"stop-color:#333333;stop-opacity:1\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"2.4223218\"\n       cy=\"10.018702\"\n       r=\"1.2890719\"\n       fx=\"2.4223218\"\n       fy=\"10.018702\"\n       id=\"radialGradient13506-2\"\n       xlink:href=\"#linearGradient13490-8\"\n       gradientUnits=\"userSpaceOnUse\" />\n    <linearGradient\n       id=\"linearGradient13490-8\">\n      <stop\n         id=\"stop13492-0\"\n         style=\"stop-color:#070707;stop-opacity:1\"\n         offset=\"0\" />\n      <stop\n         id=\"stop13498-1\"\n         style=\"stop-color:#131313;stop-opacity:0.82352942\"\n         offset=\"0.77514106\" />\n      <stop\n         id=\"stop13494-1\"\n         style=\"stop-color:#4d4d4d;stop-opacity:0\"\n         offset=\"1\" />\n    </linearGradient>\n    <radialGradient\n       cx=\"2.4223218\"\n       cy=\"10.018702\"\n       r=\"1.2890719\"\n       fx=\"2.4223218\"\n       fy=\"10.018702\"\n       id=\"radialGradient13652\"\n       xlink:href=\"#linearGradient13490-8\"\n       gradientUnits=\"userSpaceOnUse\" />\n    <radialGradient\n       cx=\"4.2609258\"\n       cy=\"8.1247683\"\n       r=\"3.03545\"\n       fx=\"4.2609258\"\n       fy=\"8.1247683\"\n       id=\"radialGradient13709\"\n       xlink:href=\"#linearGradient13472-6\"\n       gradientUnits=\"userSpaceOnUse\"\n       gradientTransform=\"matrix(-1.5559521,1.070099,-0.70756136,-1.0288124,15.310853,10.531527)\" />\n  </defs>\n  <metadata\n     id=\"metadata11661\">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about=\"\">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     transform=\"matrix(0.84308123,0,0,2.8459876,16.227516,-416.96355)\"\n     id=\"g13464\">\n    <rect\n       width=\"149.85988\"\n       height=\"58.730415\"\n       x=\"-18.061743\"\n       y=\"147.94702\"\n       id=\"rect13194-5\"\n       style=\"opacity:0.5;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.12209609;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <rect\n       width=\"149.63264\"\n       height=\"59.190804\"\n       x=\"-16.479591\"\n       y=\"146.89397\"\n       id=\"rect13194\"\n       style=\"color:#000000;fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:#b3b3b3;stroke-width:0.12248074;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  </g>\n  <path\n     d=\"m 110.85155,57.637925 c -0.1048,0.574777 -3.72708,31.156193 -3.85274,31.722911 C 101.80065,112.80573 78.957026,129.20459 55.142294,126.23284 30.751912,123.18925 19.129726,100.54795 19.019232,76.626754 19.010073,74.644234 17.543028,54.151008 18.153854,52.249992 l 45.028066,29.88764 z\"\n     id=\"path11874-2-8-6\"\n     style=\"opacity:0.30493272;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.3499999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"M 103.1318,86.901728 C 102.73844,87.333718 83.466405,111.35315 83.05963,111.76726 66.231368,128.89892 38.169221,130.70711 19.544492,115.57132 0.46956652,100.06966 2.6056244,74.709439 15.183546,54.361666 16.225966,52.675305 25.837427,34.516436 27.362524,33.227622 L 49.72176,82.429877 z\"\n     id=\"path11874-2-8\"\n     style=\"opacity:0.30493272;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.3499999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"m 108.42713,60.582759 a 43.742587,43.742587 0 1 1 -87.485172,0 43.742587,43.742587 0 1 1 87.485172,0 z\"\n     id=\"path11874\"\n     style=\"color:#000000;fill:#00ff00;fill-opacity:1;stroke:#1a1a1a;stroke-width:0.62465334;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"m 108.42713,60.582719 a 43.742587,43.742587 0 1 1 -87.485172,0 43.742587,43.742587 0 1 1 87.485172,0 z\"\n     id=\"path11874-2\"\n     style=\"color:#000000;fill:url(#radialGradient13423);fill-opacity:1;stroke:#333333;stroke-width:5.28873158;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"m 105.7725,60.377372 a 41.268965,41.268965 0 1 1 -82.537927,0 41.268965,41.268965 0 1 1 82.537927,0 z\"\n     id=\"path11874-2-4\"\n     style=\"color:#000000;fill:none;stroke:#1a1a1a;stroke-width:1.22931778;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"M 34.052134,28.877772 A 43.742585,43.742585 0 0 1 108.17775,59.965299\"\n     id=\"path11874-2-3\"\n     style=\"color:#000000;fill:none;stroke:#333333;stroke-width:3.0399797;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"M 53.338768,18.033661 A 43.742585,43.742585 0 0 1 103.91911,41.515156\"\n     id=\"path11874-2-3-8\"\n     style=\"color:#000000;fill:none;stroke:#666666;stroke-width:1.87396002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"m 110.85569,60.608114 a 46.193494,46.000607 0 1 1 -92.386984,0 46.193494,46.000607 0 1 1 92.386984,0 z\"\n     id=\"path11874-2-42\"\n     style=\"color:#000000;fill:#00ff00;fill-opacity:0.11229948;stroke:#333333;stroke-width:0.19917257;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"M 70.451023,17.017813 A 43.742585,43.742585 0 0 1 99.141387,33.717798\"\n     id=\"path11874-2-3-8-5\"\n     style=\"color:#000000;fill:none;stroke:#cccccc;stroke-width:0.79122752;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <path\n     d=\"M 74.226671,103.37552 A 43.742584,43.742584 0 0 1 24.488451,78.159241\"\n     id=\"path11874-2-3-8-3\"\n     style=\"color:#000000;fill:none;stroke:#4d4d4d;stroke-width:1.20766318;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  <text\n     x=\"64.674179\"\n     y=\"143.86646\"\n     id=\"text12451\"\n     xml:space=\"preserve\"\n     style=\"font-size:17.66742134px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#1a1a1a;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial Bold\"><tspan\n       x=\"64.674179\"\n       y=\"143.86646\"\n       id=\"tspan12453\">TEXT1</tspan></text>\n  <text\n     x=\"64.158966\"\n     y=\"159.10667\"\n     id=\"text12451-4\"\n     xml:space=\"preserve\"\n     style=\"font-size:12.31593895px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#1a1a1a;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial Bold\"><tspan\n       x=\"64.158966\"\n       y=\"159.10667\"\n       id=\"tspan12453-3\">TEXT2</tspan></text>\n  <g\n     transform=\"translate(120.65257,-2.6730564)\"\n     id=\"g13500\">\n    <path\n       d=\"m 4.9863,10.004536 a 2.94645,2.94645 0 1 1 -5.8929,0 2.94645,2.94645 0 1 1 5.8929,0 z\"\n       id=\"path13470\"\n       style=\"color:#000000;fill:url(#radialGradient13504);fill-opacity:1;stroke:none;stroke-width:0.1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 3.7113937,10.018702 a 1.2890719,1.2890719 0 1 1 -2.5781438,0 1.2890719,1.2890719 0 1 1 2.5781438,0 z\"\n       transform=\"translate(-0.38247188,-0.09915937)\"\n       id=\"path13480\"\n       style=\"color:#000000;fill:url(#radialGradient13506);fill-opacity:1;stroke:none;stroke-width:0.178;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  </g>\n  <g\n     transform=\"translate(5.7477235,-2.6730576)\"\n     id=\"g13500-4\">\n    <path\n       d=\"m 4.9863,10.004536 a 2.94645,2.94645 0 1 1 -5.8929,0 2.94645,2.94645 0 1 1 5.8929,0 z\"\n       id=\"path13470-4\"\n       style=\"color:#000000;fill:url(#radialGradient13504-4);fill-opacity:1;stroke:none;stroke-width:0.1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 3.7113937,10.018702 a 1.2890719,1.2890719 0 1 1 -2.5781438,0 1.2890719,1.2890719 0 1 1 2.5781438,0 z\"\n       transform=\"translate(-0.38247188,-0.09915937)\"\n       id=\"path13480-6\"\n       style=\"color:#000000;fill:url(#radialGradient13585);fill-opacity:1;stroke:none;stroke-width:0.178;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  </g>\n  <g\n     transform=\"translate(120.65257,152.89043)\"\n     id=\"g13500-41\">\n    <path\n       d=\"m 4.9863,10.004536 a 2.94645,2.94645 0 1 1 -5.8929,0 2.94645,2.94645 0 1 1 5.8929,0 z\"\n       id=\"path13470-5\"\n       style=\"color:#000000;fill:url(#radialGradient13709);fill-opacity:1;stroke:none;stroke-width:0.1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 3.7113937,10.018702 a 1.2890719,1.2890719 0 1 1 -2.5781438,0 1.2890719,1.2890719 0 1 1 2.5781438,0 z\"\n       transform=\"translate(-0.38247188,-0.09915937)\"\n       id=\"path13480-2\"\n       style=\"color:#000000;fill:url(#radialGradient13652);fill-opacity:1;stroke:none;stroke-width:0.178;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  </g>\n  <g\n     transform=\"translate(5.7477235,152.89043)\"\n     id=\"g13500-4-8\">\n    <path\n       d=\"m 4.9863,10.004536 a 2.94645,2.94645 0 1 1 -5.8929,0 2.94645,2.94645 0 1 1 5.8929,0 z\"\n       id=\"path13470-4-4\"\n       style=\"color:#000000;fill:url(#radialGradient13504-4-8);fill-opacity:1;stroke:none;stroke-width:0.1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n    <path\n       d=\"m 3.7113937,10.018702 a 1.2890719,1.2890719 0 1 1 -2.5781438,0 1.2890719,1.2890719 0 1 1 2.5781438,0 z\"\n       transform=\"translate(-0.38247188,-0.09915937)\"\n       id=\"path13480-6-2\"\n       style=\"color:#000000;fill:url(#radialGradient13585-7);fill-opacity:1;stroke:none;stroke-width:0.178;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate\" />\n  </g>\n</svg>\n","output":"str","x":220,"y":2080,"wires":[["8d922866.d2e4b8"]]},{"id":"c939ae20.77c75","type":"ui_template","z":"57c92b42.8228b4","group":"d40e5c3c.9b6a3","name":"","order":0,"width":"2","height":"4","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":620,"y":2080,"wires":[[]]},{"id":"8d922866.d2e4b8","type":"change","z":"57c92b42.8228b4","name":"","rules":[{"t":"change","p":"template","pt":"msg","from":"TEXT1","fromt":"str","to":"I/O","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"TEXT2","fromt":"str","to":"102.168.0.4","tot":"str"},{"t":"change","p":"template","pt":"msg","from":"#00ff00","fromt":"str","to":"#aaaa00","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":2080,"wires":[["c939ae20.77c75"]]},{"id":"d40e5c3c.9b6a3","type":"ui_group","z":"","name":"LEDPanel","tab":"24789d17.492c72","disp":false,"width":"5"},{"id":"24789d17.492c72","type":"ui_tab","z":"57c92b42.8228b4","name":"Radio","icon":"dashboard","order":1}]

M-Bus

[{"id":"cfa5fc68.ce13","type":"subflow","name":"MBus Log","info":"","in":[{"x":68.57143211364746,"y":381.42857360839844,"wires":[{"id":"7f2a1019.4e29f"}]}],"out":[{"x":975.7142734527588,"y":318.57141971588135,"wires":[{"id":"86c780b8.32ca5","port":0}]}]},{"id":"58b5ea3e.f03564","type":"file","z":"cfa5fc68.ce13","name":"","filename":"","appendNewline":false,"createDir":false,"overwriteFile":"true","x":565.4285888671875,"y":382.5,"wires":[]},{"id":"424f7c13.e9ecb4","type":"debug","z":"cfa5fc68.ce13","name":"","active":false,"console":"false","complete":"false","x":366.857213973999,"y":449.50001096725464,"wires":[]},{"id":"cf9577ad.5fa188","type":"xml","z":"cfa5fc68.ce13","name":"","attr":"","chr":"","x":340.89294242858887,"y":382.4999957084656,"wires":[["58b5ea3e.f03564","5d69871c.328338"]]},{"id":"7f2a1019.4e29f","type":"function","z":"cfa5fc68.ce13","name":"file","func":"\nreturn msg;","outputs":1,"noerr":0,"x":189.64294242858887,"y":382.4999966621399,"wires":[["424f7c13.e9ecb4","cf9577ad.5fa188"]]},{"id":"86c780b8.32ca5","type":"function","z":"cfa5fc68.ce13","name":"email report","func":"\nmsg.attachments = [{   // utf-8 string as an attachment \n            filename: msg.topic,\n            path: msg.filename,\n            content: msg.xwordHTML\n        }];\n\nmsg.payload=\"Node-RED M-Bus Record \"+msg.topic;\nmsg.topic=\"Node-RED M-Bus Record \"+msg.topic;\n\nreturn msg;","outputs":1,"noerr":0,"x":822.5000820159912,"y":320.00001192092896,"wires":[[]]},{"id":"5d69871c.328338","type":"delay","z":"cfa5fc68.ce13","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":492.5001392364502,"y":320.00001764297485,"wires":[["b6728f67.9115a"]]},{"id":"b6728f67.9115a","type":"trigger","z":"cfa5fc68.ce13","op1":"","op2":"","op1type":"pay","op2type":"nul","duration":"24","extend":false,"units":"hr","reset":"","name":"","x":648.2143154144287,"y":320.0000042915344,"wires":[["86c780b8.32ca5"]]},{"id":"23bfe17c.8b9dfe","type":"tab","label":"M-Bus"},{"id":"34fb4d4b.147502","type":"inject","z":"23bfe17c.8b9dfe","name":"","topic":"","payload":"Starting Scan.","payloadType":"str","repeat":"","crontab":"","once":false,"x":151.69049072265625,"y":250.46875476837158,"wires":[["5ae7ce60.59e5e","e5f1c830.0fe568"]]},{"id":"cfd2d247.abf58","type":"debug","z":"23bfe17c.8b9dfe","name":"stdout","active":true,"console":"false","complete":"payload","x":1352.1259803771973,"y":153.63689613342285,"wires":[]},{"id":"360791b4.79e8be","type":"debug","z":"23bfe17c.8b9dfe","name":"stderr","active":false,"console":"false","complete":"payload","x":768.6939468383789,"y":322.3442449569702,"wires":[]},{"id":"8fbe860d.925248","type":"debug","z":"23bfe17c.8b9dfe","name":"returncode","active":false,"console":"false","complete":"payload","x":784.5475769042969,"y":363.63692569732666,"wires":[]},{"id":"86d6792e.909c28","type":"exec","z":"23bfe17c.8b9dfe","command":"mbus-tcp-request-data","addpay":true,"append":"","useSpawn":true,"timer":"30","name":"","x":488.75000762939453,"y":468.12500762939453,"wires":[["6742b118.4a8e8"],["360791b4.79e8be"],["8fbe860d.925248","fe2205ca.6ddd98"]]},{"id":"e7d5377d.908728","type":"function","z":"23bfe17c.8b9dfe","name":"split","func":"if (msg.payload.indexOf('address')>0) {\n\n    var a0 = msg.payload.split('address ')[1].split(' ')[0];\n    \n    msg.payload = {};\n    msg.payload = a0;\n    //msg.topic = \"secondary\" + a0;\n        \n    \n    return msg;\n    \n} else {\n    \n    return null;\n}","outputs":1,"noerr":0,"x":867.142765045166,"y":238.5714349746704,"wires":[["d6d841bc.51e63"]]},{"id":"d6d841bc.51e63","type":"join","z":"23bfe17c.8b9dfe","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","timeout":"5","count":"","x":981.4286346435547,"y":238.57143306732178,"wires":[["6c4d5ecc.a62cc"]]},{"id":"6c4d5ecc.a62cc","type":"json","z":"23bfe17c.8b9dfe","name":"","x":1095.7143173217773,"y":239.99999141693115,"wires":[["cfd2d247.abf58","baa850e4.ee50d","9f71bbdb.273b38"]]},{"id":"958ec76d.9a1378","type":"file","z":"23bfe17c.8b9dfe","name":"SAVE LIST","filename":"","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1448.142822265625,"y":239.5714111328125,"wires":[]},{"id":"a61ce78d.891cd8","type":"function","z":"23bfe17c.8b9dfe","name":"splice","func":"\nvar m = msg.payload;\n\nif (!m[0]) { return null; }\n\nmsg.payload = \"192.168.0.17 10001 \" + msg.payload[0];\n\nmsg2={}; msg2.payload={};\n\nvar xxx = m.splice(0, 1);\n\nmsg2.payload = m; \n\nif (msg2.payload[0]) { msg2.topic = \"rest\"; }\n\nif (m[0]){\n    msg3={}; msg3.payload = \"Requesting data from \" + m[0];\n}\n\nreturn [msg,msg2,msg3];","outputs":"3","noerr":0,"x":703.285758972168,"y":771.1428842544556,"wires":[["86d6792e.909c28","27c5e803.ab6828"],["6771bfcb.79164"],["8a03306e.8b395"]]},{"id":"1af8281e.61b9b8","type":"file in","z":"23bfe17c.8b9dfe","name":"LIST","filename":"","format":"utf8","x":417.5714111328125,"y":769.71435546875,"wires":[["472a71ef.b75f6"]]},{"id":"472a71ef.b75f6","type":"json","z":"23bfe17c.8b9dfe","name":"","x":547.5713958740234,"y":769.7143287658691,"wires":[["a61ce78d.891cd8"]]},{"id":"e5f1c830.0fe568","type":"exec","z":"23bfe17c.8b9dfe","command":"mbus-tcp-scan-secondary 192.168.0.17 10001","addpay":false,"append":"","useSpawn":true,"timer":"600","name":"mbus-tcp-scan-secondary","x":504.28570556640625,"y":250.71428871154785,"wires":[["d7406a75.c23368","bbed37e1.30d978"],["360791b4.79e8be"],["8fbe860d.925248"]]},{"id":"e05c01e5.90f6b","type":"function","z":"23bfe17c.8b9dfe","name":"CMeX40","func":"\nmsg2={}; \nmsg2.payload = msg.payload.MBusData.DataRecord[0].Value[0];\n\nif(parseInt(msg2.payload)<0) { msg2.payload = \"Off\"; }\nelse { msg2.payload = \"On\"; }\nmsg2.topic = msg.payload.MBusData.DataRecord[0].Unit[0];\n\n\nmsg3={}; \nmsg3.payload = parseFloat(msg.payload.MBusData.DataRecord[1].Value[0]);\nmsg3.topic = msg.payload.MBusData.DataRecord[1].Unit[0];\n\n\nmsg4={}; \nmsg4.payload = msg.payload.MBusData.DataRecord[2].Value[0];\nif(parseInt(msg4.payload)>0) { msg4.payload = \"Open\"; }\nelse { msg4.payload = \"Closed\"; }\nmsg4.topic = msg.payload.MBusData.DataRecord[2].Unit[0];\n\n\nmsg5={}; \nmsg5.payload = parseFloat(msg.payload.MBusData.DataRecord[3].Value[0]);\nmsg5.topic = msg.payload.MBusData.DataRecord[3].Unit[0];\n\n\nmsg10={}; \nmsg10.payload = msg.payload.MBusData.SlaveInformation[0].Manufacturer[0]+' '+msg.payload.MBusData.SlaveInformation[0].Id[0]\nmsg10.topic = 'name';\n\n\n\nmsg.filename = global.get(\"boot.logs\")+\"nodered_mbusread_\"+msg.payload.MBusData.SlaveInformation[0].Manufacturer[0]+msg.payload.MBusData.SlaveInformation[0].Id[0]+\".xml\";\nmsg.topic = \"nodered_mbusread_\"+msg.payload.MBusData.SlaveInformation[0].Manufacturer[0]+msg.payload.MBusData.SlaveInformation[0].Id[0]+\".xml\";\n\n\nreturn [msg,msg2,msg3,msg4,msg5,msg10];","outputs":"6","noerr":0,"x":1161.607192993164,"y":523.0357131958008,"wires":[["b92cde7a.8907c"],["6a3d8910.831798"],["a49078b1.026d48"],["2c0e07d.2560ff8"],["8772cff0.b7829"],["8a03306e.8b395"]]},{"id":"6742b118.4a8e8","type":"switch","z":"23bfe17c.8b9dfe","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Version>40<","vt":"str"},{"t":"cont","v":"Manufacturer","vt":"str"},{"t":"else"}],"checkall":"false","outputs":3,"x":797.1429405212402,"y":535.7143287658691,"wires":[["86015e44.bae81"],["aa7bd6e9.b0ee38"],["f730b902.84c7f8"]]},{"id":"d7406a75.c23368","type":"debug","z":"23bfe17c.8b9dfe","name":"scan results","active":true,"console":"false","complete":"payload","x":773.2143058776855,"y":138.5714282989502,"wires":[]},{"id":"bbed37e1.30d978","type":"split","z":"23bfe17c.8b9dfe","name":"","splt":"\\n","x":752.8571128845215,"y":238.57143306732178,"wires":[["e7d5377d.908728"]]},{"id":"fe2205ca.6ddd98","type":"trigger","z":"23bfe17c.8b9dfe","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"5","extend":false,"units":"s","reset":"","name":"","x":392.71417236328125,"y":633.8571166992188,"wires":[["6771bfcb.79164"]]},{"id":"6771bfcb.79164","type":"function","z":"23bfe17c.8b9dfe","name":"store wait","func":"if (msg.topic=='rest'){\n    context.set('rest',msg.payload);\n    \n    node.status({fill:\"red\",shape:\"dot\",text:msg.payload});\n    \n    return null;\n    \n} else {\n\n    var rest = context.get('rest')||null;\n    \n        \n    msg.payload = rest;\n    \n    node.status({fill:\"yellow\",shape:\"dot\",text:\"ok\"});\n    \n    return msg;\n    \n}","outputs":1,"noerr":0,"x":579.9999542236328,"y":632.8572368621826,"wires":[["a61ce78d.891cd8"]]},{"id":"27c5e803.ab6828","type":"debug","z":"23bfe17c.8b9dfe","name":"request","active":false,"console":"false","complete":"payload","x":879.2856559753418,"y":760.0000114440918,"wires":[]},{"id":"baa850e4.ee50d","type":"trigger","z":"23bfe17c.8b9dfe","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"2","extend":false,"units":"s","reset":"","name":"","x":146.14285278320312,"y":768.7142944335938,"wires":[["4717288.e269fd8"]]},{"id":"5ae7ce60.59e5e","type":"debug","z":"23bfe17c.8b9dfe","name":"","active":true,"console":"false","complete":"false","x":345.0793762207031,"y":144.2857265472412,"wires":[]},{"id":"f730b902.84c7f8","type":"debug","z":"23bfe17c.8b9dfe","name":"mbus leftover","active":true,"console":"false","complete":"payload","x":871.4285888671875,"y":679.999945640564,"wires":[]},{"id":"aa7bd6e9.b0ee38","type":"xml","z":"23bfe17c.8b9dfe","name":"","attr":"","chr":"","x":993.3929595947266,"y":594.1071262359619,"wires":[["587b0218.7543dc"]]},{"id":"587b0218.7543dc","type":"function","z":"23bfe17c.8b9dfe","name":"Heat Meter","func":"\nmsg2={}; \nmsg2.payload = msg.payload.MBusData.DataRecord[0].Value[0];\nmsg2.topic = msg.payload.MBusData.DataRecord[0].Unit[0];\n\n\nmsg3={}; \nmsg3.payload = msg.payload.MBusData.DataRecord[1].Value[0];\nmsg3.topic = msg.payload.MBusData.DataRecord[1].Unit[0];\n\n\nmsg4={}; \nmsg4.payload = parseFloat(msg.payload.MBusData.DataRecord[2].Value[0])/10000;\nmsg4.topic = msg.payload.MBusData.DataRecord[2].Unit[0].replace(\"1e-4 \", \"\");\n\n\nmsg5={}; \nmsg5.payload = parseFloat(msg.payload.MBusData.DataRecord[3].Value[0])/1000;\nmsg5.topic = msg.payload.MBusData.DataRecord[3].Unit[0].replace(\"W\", \"kW\");\n\n\nmsg6={}; \nmsg6.payload = parseFloat(msg.payload.MBusData.DataRecord[4].Value[0])/10;\nmsg6.topic = msg.payload.MBusData.DataRecord[4].Unit[0].replace(\"1e-1 \", \"\");\n\n\nmsg7={}; \nmsg7.payload = parseFloat(msg.payload.MBusData.DataRecord[5].Value[0])/10;\nmsg7.topic = msg.payload.MBusData.DataRecord[5].Unit[0].replace(\"1e-1 \", \"\");\n\n\nmsg8={}; \nmsg8.payload = msg.payload.MBusData.DataRecord[6].Value[0];\nmsg8.topic = msg.payload.MBusData.DataRecord[6].Unit[0];\n\n\nmsg9={}; \nmsg9.payload = msg.payload.MBusData.DataRecord[7].Value[0];\nmsg9.topic = msg.payload.MBusData.DataRecord[7].Unit[0];\n\nmsg10={}; \nmsg10.payload = msg.payload.MBusData.SlaveInformation[0].Manufacturer[0]+' '+msg.payload.MBusData.SlaveInformation[0].Id[0]\nmsg10.topic = 'name';\n\nmsg.filename = global.get(\"boot.logs\")+\"nodered_mbusread_\"+msg.payload.MBusData.SlaveInformation[0].Manufacturer[0]+msg.payload.MBusData.SlaveInformation[0].Id[0]+\".xml\";\nmsg.topic = \"nodered_mbusread_\"+msg.payload.MBusData.SlaveInformation[0].Manufacturer[0]+msg.payload.MBusData.SlaveInformation[0].Id[0]+\".xml\";\n\n\nreturn [msg,msg2,msg3,msg4,msg5,msg6,msg7,msg8,msg9,msg10];","outputs":"10","noerr":0,"x":1170.7142524719238,"y":773.571418762207,"wires":[["5834fc3a.f3fa44"],["e16591e6.bcbf1","5e25eba2.a174c4"],["e16591e6.bcbf1"],["e16591e6.bcbf1","277de6f2.585cda","7ca6f2ab.bab8dc"],["e16591e6.bcbf1","8d7880ec.1884e","7ca07674.225018"],["e16591e6.bcbf1","2fe4b64f.cda45a"],["e16591e6.bcbf1","2fe4b64f.cda45a"],["e16591e6.bcbf1"],["e16591e6.bcbf1"],["8a03306e.8b395"]]},{"id":"e16591e6.bcbf1","type":"debug","z":"23bfe17c.8b9dfe","name":"","active":false,"console":"false","complete":"false","x":1557.6784591674805,"y":828.2142572402954,"wires":[]},{"id":"e11ba689.2d0608","type":"ui_button","z":"23bfe17c.8b9dfe","name":"","group":"56c99a2b.8e73e4","order":2,"width":0,"height":0,"passthru":false,"label":"Read M-Bus","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":148.10712432861328,"y":877.1071510314941,"wires":[["4717288.e269fd8"]]},{"id":"2fe4b64f.cda45a","type":"ui_chart","z":"23bfe17c.8b9dfe","name":"","group":"43cfc76d.89e718","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"50","removeOlderUnit":"3600","cutout":0,"colors":["#d21500","#4654fb","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":1452.7500610351562,"y":915.5000305175781,"wires":[[],[]]},{"id":"8d7880ec.1884e","type":"ui_gauge","z":"23bfe17c.8b9dfe","name":"","group":"628511e0.6a406","order":1,"width":0,"height":0,"gtype":"gage","title":"","label":"kW","format":"{{value}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"10","seg2":"25","x":1447.5000228881836,"y":878.7500076293945,"wires":[]},{"id":"7ca07674.225018","type":"ui_chart","z":"23bfe17c.8b9dfe","name":"","group":"628511e0.6a406","order":3,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"50","removeOlderUnit":"86400","cutout":0,"colors":["#16d101","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":1448.7500228881836,"y":960.0000095367432,"wires":[[],[]]},{"id":"44474626.a56fa8","type":"ui_button","z":"23bfe17c.8b9dfe","name":"","group":"56c99a2b.8e73e4","order":1,"width":0,"height":0,"passthru":false,"label":"Full Scan and Read M-Bus","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":169.2857208251953,"y":316.24999809265137,"wires":[["e5f1c830.0fe568","63f16b4a.1f6884"]]},{"id":"8a03306e.8b395","type":"ui_text","z":"23bfe17c.8b9dfe","group":"56c99a2b.8e73e4","order":0,"width":0,"height":0,"name":"","label":"","format":"{{msg.payload}}","layout":"row-center","x":1450.000015258789,"y":1006.2500095367432,"wires":[]},{"id":"3a3f44e3.d3a15c","type":"link in","z":"23bfe17c.8b9dfe","name":"scan","links":["63f16b4a.1f6884"],"x":1327.5000200271606,"y":1048.7500095367432,"wires":[["8a03306e.8b395"]]},{"id":"63f16b4a.1f6884","type":"link out","z":"23bfe17c.8b9dfe","name":"startscan","links":["3a3f44e3.d3a15c"],"x":376.7857303619385,"y":316.2500247955322,"wires":[]},{"id":"86015e44.bae81","type":"xml","z":"23bfe17c.8b9dfe","name":"","attr":"","chr":"","x":992.5000152587891,"y":522.5000076293945,"wires":[["e05c01e5.90f6b"]]},{"id":"6a3d8910.831798","type":"ui_text","z":"23bfe17c.8b9dfe","group":"369add5d.156742","order":0,"width":0,"height":0,"name":"","label":"Relay State","format":"{{msg.payload}}","layout":"row-spread","x":1440,"y":407.7777843475342,"wires":[]},{"id":"a49078b1.026d48","type":"ui_text","z":"23bfe17c.8b9dfe","group":"369add5d.156742","order":0,"width":0,"height":0,"name":"","label":"Relay Counter","format":"{{msg.payload}}","layout":"row-spread","x":1448.8889198303223,"y":445.55557441711426,"wires":[]},{"id":"2c0e07d.2560ff8","type":"ui_text","z":"23bfe17c.8b9dfe","group":"369add5d.156742","order":0,"width":0,"height":0,"name":"","label":"Input State","format":"{{msg.payload}}","layout":"row-spread","x":1441.1110458374023,"y":483.333345413208,"wires":[]},{"id":"8772cff0.b7829","type":"ui_text","z":"23bfe17c.8b9dfe","group":"369add5d.156742","order":0,"width":0,"height":0,"name":"","label":"Input Counter","format":"{{msg.payload}}","layout":"row-spread","x":1448.8888626098633,"y":521.1110782623291,"wires":[]},{"id":"5f0728ff.6acc68","type":"link out","z":"23bfe17c.8b9dfe","name":"","links":["a467afe3.1dda9"],"x":1634.2856426239014,"y":625.71435546875,"wires":[]},{"id":"b92cde7a.8907c","type":"subflow:cfa5fc68.ce13","z":"23bfe17c.8b9dfe","name":"","x":1497.1428833007812,"y":610.0000419616699,"wires":[["5f0728ff.6acc68"]]},{"id":"5834fc3a.f3fa44","type":"subflow:cfa5fc68.ce13","z":"23bfe17c.8b9dfe","x":1498.5713653564453,"y":651.4284992218018,"wires":[["5f0728ff.6acc68"]]},{"id":"7c7b91e2.e5cac8","type":"inject","z":"23bfe17c.8b9dfe","name":"","topic":"","payload":"","payloadType":"date","repeat":"3600","crontab":"","once":false,"x":107.99999237060547,"y":826.9999961853027,"wires":[["4717288.e269fd8"]]},{"id":"5e25eba2.a174c4","type":"ui_text","z":"23bfe17c.8b9dfe","group":"628511e0.6a406","order":0,"width":0,"height":0,"name":"","label":"Energy","format":"{{msg.payload}} kWh","layout":"row-spread","x":1452.944522940083,"y":721.6944562182018,"wires":[]},{"id":"449cc5d7.a4cf7c","type":"inject","z":"23bfe17c.8b9dfe","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":126.40740288628471,"y":428.5370212131076,"wires":[["3b60c14f.489f26"]]},{"id":"3b60c14f.489f26","type":"function","z":"23bfe17c.8b9dfe","name":"","func":"msg.enabled=false;\n\nreturn msg;","outputs":1,"noerr":0,"x":106.40737915039062,"y":389.1666259765625,"wires":[[]]},{"id":"9f71bbdb.273b38","type":"function","z":"23bfe17c.8b9dfe","name":"","func":"\nmsg.filename=global.get(\"boot.logs\")+\"nodered_mbusscan.json\";\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":1273,"y":240,"wires":[["958ec76d.9a1378"]]},{"id":"4717288.e269fd8","type":"function","z":"23bfe17c.8b9dfe","name":"","func":"msg.filename=global.get(\"boot.logs\")+\"nodered_mbusscan.json\";\nreturn msg;","outputs":1,"noerr":0,"x":298,"y":769,"wires":[["1af8281e.61b9b8"]]},{"id":"277de6f2.585cda","type":"ui_gauge","z":"23bfe17c.8b9dfe","name":"","group":"af31dbc7.4a6e38","order":0,"width":0,"height":0,"gtype":"gage","title":"Primary Flow","label":"m^3/h","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1641.5003051757812,"y":753.3334045410156,"wires":[]},{"id":"7ca6f2ab.bab8dc","type":"link out","z":"23bfe17c.8b9dfe","name":"fM","links":["7cebed2f.392d64"],"x":1576.5001831054688,"y":789.6667175292969,"wires":[]},{"id":"56c99a2b.8e73e4","type":"ui_group","z":"","name":"Default","tab":"1a51166b.97a66a","disp":false,"width":"6"},{"id":"43cfc76d.89e718","type":"ui_group","z":"","name":"Temperatures","tab":"1a51166b.97a66a","order":3,"disp":true,"width":"6"},{"id":"628511e0.6a406","type":"ui_group","z":"","name":"Power","tab":"1a51166b.97a66a","order":2,"disp":true,"width":"6"},{"id":"369add5d.156742","type":"ui_group","z":"","name":"Relay","tab":"1a51166b.97a66a","disp":true,"width":"6"},{"id":"af31dbc7.4a6e38","type":"ui_group","z":"","name":"Flow Rate","tab":"1a51166b.97a66a","disp":true,"width":"6"},{"id":"1a51166b.97a66a","type":"ui_tab","z":"","name":"M-Bus","icon":"dashboard","order":5}]

v2

[{"id":"3d0a40a7.66aa4","type":"subflow","name":"html table","info":"","in":[{"x":100,"y":180,"wires":[{"id":"790d9c49.fccc04"}]}],"out":[{"x":380,"y":180,"wires":[{"id":"790d9c49.fccc04","port":0}]}]},{"id":"790d9c49.fccc04","type":"function","z":"3d0a40a7.66aa4","name":"htmltable","func":"var htmlt = '<table width=\"100%\">';\n\nfor (var key in msg.payload) {\n    \n    \n    htmlt += '<tr><td>' + key.replace(/_/g, ' ') + '</td><td align=\"right\">' + msg.payload[key] + '</td></tr>';\n}\n\nhtmlt += '<table>';\n\nmsg.payload=htmlt;\n\nreturn msg;","outputs":1,"noerr":0,"x":240,"y":180,"wires":[[]]},{"id":"9c018527.c25f78","type":"subflow","name":"MBus Log","info":"","in":[{"x":68.57143211364746,"y":381.42857360839844,"wires":[{"id":"eac95adf.6c73c8"}]}],"out":[{"x":975.7142734527588,"y":318.57141971588135,"wires":[{"id":"61b37676.8dcd98","port":0}]}]},{"id":"e78af39d.78672","type":"file","z":"9c018527.c25f78","name":"","filename":"","appendNewline":false,"createDir":false,"overwriteFile":"true","x":565.4285888671875,"y":382.5,"wires":[]},{"id":"c3543c12.1a7fd","type":"debug","z":"9c018527.c25f78","name":"","active":false,"console":"false","complete":"false","x":366.857213973999,"y":449.50001096725464,"wires":[]},{"id":"a7ae7241.14754","type":"xml","z":"9c018527.c25f78","name":"","attr":"","chr":"","x":340.89294242858887,"y":382.4999957084656,"wires":[["e78af39d.78672","87e2410.24b83c"]]},{"id":"eac95adf.6c73c8","type":"function","z":"9c018527.c25f78","name":"file","func":"\nreturn msg;","outputs":1,"noerr":0,"x":189.64294242858887,"y":382.4999966621399,"wires":[["c3543c12.1a7fd","a7ae7241.14754"]]},{"id":"61b37676.8dcd98","type":"function","z":"9c018527.c25f78","name":"email report","func":"\nmsg.attachments = [{   // utf-8 string as an attachment \n            filename: msg.topic,\n            path: msg.filename,\n            content: msg.xwordHTML\n        }];\n\nmsg.payload=\"Node-RED M-Bus Record \"+msg.topic;\nmsg.topic=\"Node-RED M-Bus Record \"+msg.topic;\n\nreturn msg;","outputs":1,"noerr":0,"x":822.5000820159912,"y":320.00001192092896,"wires":[[]]},{"id":"87e2410.24b83c","type":"delay","z":"9c018527.c25f78","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":492.5001392364502,"y":320.00001764297485,"wires":[["6ac66f25.d779"]]},{"id":"6ac66f25.d779","type":"trigger","z":"9c018527.c25f78","op1":"","op2":"","op1type":"pay","op2type":"nul","duration":"24","extend":false,"units":"hr","reset":"","name":"","x":648.2143154144287,"y":320.0000042915344,"wires":[["61b37676.8dcd98"]]},{"id":"1ed271b9.65d03e","type":"tab","label":"M-Bus"},{"id":"6cd61bcc.662a84","type":"inject","z":"1ed271b9.65d03e","name":"","topic":"","payload":"Starting Scan.","payloadType":"str","repeat":"","crontab":"","once":false,"x":151.69049072265625,"y":250.46875476837158,"wires":[["17f1abf4.188774","6a8cc7de.b9bd28"]]},{"id":"307f249d.44082c","type":"debug","z":"1ed271b9.65d03e","name":"stdout","active":true,"console":"false","complete":"payload","x":1352.1259803771973,"y":153.63689613342285,"wires":[]},{"id":"bf1d0b7e.8af4f8","type":"debug","z":"1ed271b9.65d03e","name":"stderr","active":false,"console":"false","complete":"payload","x":768.6939468383789,"y":322.3442449569702,"wires":[]},{"id":"c0ced2eb.9bfe9","type":"debug","z":"1ed271b9.65d03e","name":"returncode","active":false,"console":"false","complete":"payload","x":784.5475769042969,"y":363.63692569732666,"wires":[]},{"id":"c4a8a223.9388e","type":"exec","z":"1ed271b9.65d03e","command":"mbus-serial-request-data","addpay":true,"append":"","useSpawn":"true","timer":"30","oldrc":false,"name":"","x":488.75000762939453,"y":468.12500762939453,"wires":[["a43d0e77.92fd38","6f0d0904.a897f8"],["bf1d0b7e.8af4f8"],["c0ced2eb.9bfe9","866bc306.eb6ec"]]},{"id":"884ae396.aad92","type":"function","z":"1ed271b9.65d03e","name":"split","func":"if (msg.payload.indexOf('address')>0) {\n\n    var a0 = msg.payload.split('address ')[1].split(' ')[0];\n    \n    msg.payload = {};\n    msg.payload = a0;\n    //msg.topic = \"secondary\" + a0;\n        \n    \n    return msg;\n    \n} else {\n    \n    return null;\n}","outputs":1,"noerr":0,"x":867.142765045166,"y":238.5714349746704,"wires":[["b64a33e2.76442"]]},{"id":"b64a33e2.76442","type":"join","z":"1ed271b9.65d03e","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","timeout":"5","count":"","x":981.4286346435547,"y":238.57143306732178,"wires":[["fb0c23fd.f8102"]]},{"id":"fb0c23fd.f8102","type":"json","z":"1ed271b9.65d03e","name":"","x":1095.7143173217773,"y":239.99999141693115,"wires":[["307f249d.44082c","c5310026.1b771","aec86e7a.c84a1"]]},{"id":"3197bc22.8d7214","type":"file","z":"1ed271b9.65d03e","name":"SAVE LIST","filename":"","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1448.142822265625,"y":239.5714111328125,"wires":[]},{"id":"3ab64590.10369a","type":"function","z":"1ed271b9.65d03e","name":"splice","func":"\nvar m = msg.payload;\nif (!msg.payload) { return null; }\nif (!m[0]) { return null; }\n\nmsg.payload = \"-b 2400 /dev/ttyUSB0 \" + msg.payload[0];\n\nmsg2={}; msg2.payload={};\n\nvar xxx = m.splice(0, 1);\n\nmsg2.payload = m; \n\nif (msg2.payload[0]) { msg2.topic = \"rest\"; }\n\nmsg3={};\nif (m[0]){\n     msg3.payload = \"Requesting data from \" + m[0];\n}\n\nreturn [msg,msg2,msg3];","outputs":"3","noerr":0,"x":703.285758972168,"y":771.1428842544556,"wires":[["c4a8a223.9388e","2ee8f904.903bc6"],["415473d4.ad781c"],[]]},{"id":"fd98baf8.4620a8","type":"file in","z":"1ed271b9.65d03e","name":"LIST","filename":"","format":"utf8","sendError":true,"x":417.5714111328125,"y":769.71435546875,"wires":[["e91260eb.2d3b8"]]},{"id":"e91260eb.2d3b8","type":"json","z":"1ed271b9.65d03e","name":"","x":547.5713958740234,"y":769.7143287658691,"wires":[["3ab64590.10369a","f94d4637.7a76a"]]},{"id":"6a8cc7de.b9bd28","type":"exec","z":"1ed271b9.65d03e","command":"mbus-serial-scan-secondary -b 2400 /dev/ttyUSB0","addpay":false,"append":"","useSpawn":"true","timer":"600","oldrc":false,"name":"mbus-tcp-scan-secondary","x":504.28570556640625,"y":250.71428871154785,"wires":[["a0a2eef8.e9758","a85f4cb9.39e69"],["bf1d0b7e.8af4f8"],["c0ced2eb.9bfe9"]]},{"id":"6f0d0904.a897f8","type":"switch","z":"1ed271b9.65d03e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<Version>40<","vt":"str"},{"t":"cont","v":"<DataRecord","vt":"str"},{"t":"else"}],"checkall":"false","outputs":3,"x":850,"y":540,"wires":[[],["e58e8d71.9463f"],["e636c35a.d44f6"]]},{"id":"a0a2eef8.e9758","type":"debug","z":"1ed271b9.65d03e","name":"scan results","active":true,"console":"false","complete":"payload","x":773.2143058776855,"y":138.5714282989502,"wires":[]},{"id":"a85f4cb9.39e69","type":"split","z":"1ed271b9.65d03e","name":"","splt":"\\n","x":752.8571128845215,"y":238.57143306732178,"wires":[["884ae396.aad92"]]},{"id":"866bc306.eb6ec","type":"trigger","z":"1ed271b9.65d03e","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"5","extend":false,"units":"s","reset":"","name":"","x":392.71417236328125,"y":633.8571166992188,"wires":[["415473d4.ad781c"]]},{"id":"415473d4.ad781c","type":"function","z":"1ed271b9.65d03e","name":"store wait","func":"if (msg.topic=='rest'){\n    context.set('rest',msg.payload);\n    \n    node.status({fill:\"red\",shape:\"dot\",text:msg.payload});\n    \n    return null;\n    \n} else {\n\n    var rest = context.get('rest')||null;\n    \n        \n    msg.payload = rest;\n    \n    node.status({fill:\"yellow\",shape:\"dot\",text:\"ok\"});\n    \n    return msg;\n    \n}","outputs":1,"noerr":0,"x":579.9999542236328,"y":632.8572368621826,"wires":[["3ab64590.10369a"]]},{"id":"2ee8f904.903bc6","type":"debug","z":"1ed271b9.65d03e","name":"request","active":true,"console":"false","complete":"payload","x":879.2856559753418,"y":760.0000114440918,"wires":[]},{"id":"c5310026.1b771","type":"trigger","z":"1ed271b9.65d03e","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"2","extend":false,"units":"s","reset":"","name":"","x":146.14285278320312,"y":768.7142944335938,"wires":[["e4848fc.74d687"]]},{"id":"17f1abf4.188774","type":"debug","z":"1ed271b9.65d03e","name":"","active":true,"console":"false","complete":"false","x":345.0793762207031,"y":144.2857265472412,"wires":[]},{"id":"e636c35a.d44f6","type":"debug","z":"1ed271b9.65d03e","name":"mbus leftover","active":true,"console":"false","complete":"payload","x":871.4285888671875,"y":679.999945640564,"wires":[]},{"id":"fb3ea6f1.2c1318","type":"debug","z":"1ed271b9.65d03e","name":"","active":false,"console":"false","complete":"false","x":1430,"y":460,"wires":[]},{"id":"a3002051.a7d89","type":"ui_button","z":"1ed271b9.65d03e","name":"","group":"d504f369.7bcbb","order":2,"width":"6","height":"1","passthru":false,"label":"Read M-Bus","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":148.10712432861328,"y":877.1071510314941,"wires":[["e4848fc.74d687"]]},{"id":"32050e0c.f88352","type":"ui_chart","z":"1ed271b9.65d03e","name":"","group":"cbe89590.f70bf8","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"50","removeOlderUnit":"3600","cutout":0,"colors":["#d21500","#4654fb","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":1610,"y":540,"wires":[[],[]]},{"id":"6590baeb.9480f4","type":"ui_button","z":"1ed271b9.65d03e","name":"","group":"d504f369.7bcbb","order":1,"width":"6","height":"1","passthru":false,"label":"Full Scan and Read M-Bus","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":169.2857208251953,"y":316.24999809265137,"wires":[["6a8cc7de.b9bd28","c30afce3.02783"]]},{"id":"c30afce3.02783","type":"link out","z":"1ed271b9.65d03e","name":"startscan","links":["d9d0ba18.76c998"],"x":376.7857303619385,"y":316.2500247955322,"wires":[]},{"id":"9a7ac163.07c82","type":"link out","z":"1ed271b9.65d03e","name":"","links":["a467afe3.1dda9"],"x":1535,"y":720,"wires":[]},{"id":"771508f0.84fd28","type":"subflow:9c018527.c25f78","z":"1ed271b9.65d03e","x":1420,"y":720,"wires":[["9a7ac163.07c82"]]},{"id":"8edc3cc3.3c328","type":"inject","z":"1ed271b9.65d03e","name":"","topic":"","payload":"","payloadType":"date","repeat":"30","crontab":"","once":false,"x":107.99999237060547,"y":826.9999961853027,"wires":[["e4848fc.74d687"]]},{"id":"8e4ad196.22a26","type":"inject","z":"1ed271b9.65d03e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":126.40740288628471,"y":428.5370212131076,"wires":[["78a7a887.143d08"]]},{"id":"78a7a887.143d08","type":"function","z":"1ed271b9.65d03e","name":"","func":"msg.enabled=false;\n\nreturn msg;","outputs":1,"noerr":0,"x":106.40737915039062,"y":389.1666259765625,"wires":[[]]},{"id":"aec86e7a.c84a1","type":"function","z":"1ed271b9.65d03e","name":"","func":"\nmsg.filename=global.get(\"boot.logs\")+\"nodered_mbusscan.json\";\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":1273,"y":240,"wires":[["3197bc22.8d7214"]]},{"id":"e4848fc.74d687","type":"function","z":"1ed271b9.65d03e","name":"","func":"msg.filename=global.get(\"boot.logs\")+\"nodered_mbusscan.json\";\nreturn msg;","outputs":1,"noerr":0,"x":298,"y":769,"wires":[["fd98baf8.4620a8"]]},{"id":"23dada4b.aec7c6","type":"ui_gauge","z":"1ed271b9.65d03e","name":"","group":"d78e4c7a.2e52d","order":0,"width":0,"height":0,"gtype":"gage","title":"Primary Flow","label":"m^3/h","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1490,"y":820,"wires":[]},{"id":"30ac9852.d2ecd8","type":"template","z":"1ed271b9.65d03e","name":"install m-bus","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"echo \"Installing M-Bus Libraries...\"\nsudo apt-get -y install git libtool autoconf automake\nsudo git clone git://github.com/rscada/libmbus.git\ncd libmbus\nsudo sh clean.sh\nsudo sh build.sh\nmake\nsudo make install\nsudo ln -s /usr/local/lib/libmbus.so.0 /usr/lib/libmbus.so.0\n","output":"str","x":113,"y":44,"wires":[[]]},{"id":"c99bffbd.1a13d","type":"catch","z":"1ed271b9.65d03e","name":"","scope":["fd98baf8.4620a8"],"x":420,"y":840,"wires":[[]]},{"id":"f94d4637.7a76a","type":"debug","z":"1ed271b9.65d03e","name":"","active":true,"console":"false","complete":"false","x":690,"y":860,"wires":[]},{"id":"a43d0e77.92fd38","type":"debug","z":"1ed271b9.65d03e","name":"","active":false,"console":"false","complete":"false","x":888.4999847412109,"y":475.40000915527344,"wires":[]},{"id":"e58e8d71.9463f","type":"split","z":"1ed271b9.65d03e","name":"","splt":"<Unit>","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1050,"y":540,"wires":[["ed2224c8.960ed8"]]},{"id":"ed2224c8.960ed8","type":"function","z":"1ed271b9.65d03e","name":"readmbval","func":"//<Unit>Flow temperature (deg C)</Unit>\n//        <Value>20.596680</Value>\n\n\n\nmsg.topic = msg.payload.split(\"</Unit>\")[0];\n\nmsg.payload = msg.payload.split(\"<Value>\")[1].split(\"</Value>\")[0];\n\n\nreturn msg;","outputs":1,"noerr":0,"x":1230,"y":540,"wires":[["fb3ea6f1.2c1318","51da53ee.b5cc0c","e22a2575.faf45","5a2370cc.1ff458"]]},{"id":"282f7b69.bd35d4","type":"catch","z":"1ed271b9.65d03e","name":"","scope":["ed2224c8.960ed8"],"x":1220,"y":580,"wires":[[]]},{"id":"51da53ee.b5cc0c","type":"switch","z":"1ed271b9.65d03e","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"(deg C)","vt":"str"}],"checkall":"true","outputs":1,"x":1470,"y":540,"wires":[["32050e0c.f88352"]]},{"id":"66ea1354.1f302c","type":"subflow:3d0a40a7.66aa4","z":"1ed271b9.65d03e","x":1520,"y":620,"wires":[["bb48fb43.a9dc08"]]},{"id":"e22a2575.faf45","type":"join","z":"1ed271b9.65d03e","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"1","count":"","x":1390,"y":620,"wires":[["66ea1354.1f302c"]]},{"id":"bb48fb43.a9dc08","type":"ui_template","z":"1ed271b9.65d03e","group":"d504f369.7bcbb","name":"","order":3,"width":"12","height":"8","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":1680.499984741211,"y":619.5999908447266,"wires":[[]]},{"id":"5a2370cc.1ff458","type":"function","z":"1ed271b9.65d03e","name":"","func":"\n\nmsg.payload = parseFloat(msg.payload);\n\nif (msg.topic.indexOf(\"eturn temperature\")>0) {\n    \n    msg.topic = \"hm_tF\";\n    \n    \n} else if (msg.topic.indexOf(\"low temperature\")>0) {\n    \n    msg.topic = \"hm_tR\";\n    \n} else if (msg.topic.indexOf(\"olume flow\")>0) {\n    \n    msg.topic = \"hm_f\";\n    msg.payload = msg.payload * 1000 / 60; \n    \n}  else if (msg.topic.indexOf(\"ower\")>0) {\n    \n    msg.topic = \"hm_kw\";\n    msg.payload = msg.payload / 1000; \n    \n}  else if (msg.topic.indexOf(\"nergy\")>0) {\n    \n    msg.topic = \"hm_kwh\";\n   \n}  else if (msg.topic.indexOf(\"olume\")>0) {\n    \n    if (msg.payload>0) {\n        msg.topic = \"hm_v\";\n        msg.payload = msg.payload / 10; \n    } else {\n        return null;\n    }\n    \n} else {\n    \n    return null;\n}\n\n\n msg.topic = \"southernh/beeXei8m/meter/dat/\" + msg.topic;\n\nreturn msg;","outputs":1,"noerr":0,"x":1370,"y":380,"wires":[["a83ac428.e5b9","48565259.e12fa4"]]},{"id":"48565259.e12fa4","type":"link out","z":"1ed271b9.65d03e","name":"","links":["4a684f33.663d2"],"x":1555,"y":380,"wires":[]},{"id":"a83ac428.e5b9","type":"debug","z":"1ed271b9.65d03e","name":"","active":false,"console":"false","complete":"false","x":1603.499984741211,"y":339.1999969482422,"wires":[]},{"id":"d504f369.7bcbb","type":"ui_group","z":"","name":"Data","tab":"1a51166b.97a66a","order":1,"disp":false,"width":"12"},{"id":"cbe89590.f70bf8","type":"ui_group","z":"","name":"Temperatures","tab":"1a51166b.97a66a","order":4,"disp":true,"width":"6"},{"id":"d78e4c7a.2e52d","type":"ui_group","z":"","name":"Flow Rate","tab":"1a51166b.97a66a","order":6,"disp":true,"width":"6"},{"id":"1a51166b.97a66a","type":"ui_tab","z":"","name":"M-Bus","icon":"dashboard","order":5}]

Brainbox ED549 ED588

[{"id":"34860522.632802","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"c3827047.c2e0d","type":"inject","z":"34860522.632802","name":"","topic":"","payload":"1","payloadType":"str","repeat":"5","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":80,"wires":[["30d141d3.6d0efe"]]},{"id":"1a15d39d.2eee74","type":"tcp request","z":"34860522.632802","server":"192.168.0.149","port":"9500","out":"time","splitc":"1000","name":"ED-549","x":360,"y":80,"wires":[["3645e14d.a1fb56"]]},{"id":"f48730cc.fdce18","type":"debug","z":"34860522.632802","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":350,"y":180,"wires":[]},{"id":"30d141d3.6d0efe","type":"function","z":"34860522.632802","name":"","func":"msg.payload = \"#01\\r\\n\";\nreturn msg;","outputs":1,"noerr":0,"x":230,"y":80,"wires":[["1a15d39d.2eee74"]]},{"id":"3645e14d.a1fb56","type":"function","z":"34860522.632802","name":"","func":"var dat = msg.payload.toString(\"utf8\");\n\n\ndat = dat.replace(/\\+/g, \",\");\ndat = dat.replace(/\\-/g, \",-\");\ndat = dat.substr(2);\n\ndats = dat.split(\",\");\n\nmsg.payload = {};\nvar ana=0;\nfor (var k in dats) { \n    \n    msg.payload[\"t\" + ana] = parseFloat(dats[k]);\n    ana++;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":80,"wires":[["cde5e8f.68ba198"]]},{"id":"cde5e8f.68ba198","type":"split","z":"34860522.632802","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":610,"y":80,"wires":[["4a6c2e9.45c95d"]]},{"id":"4a6c2e9.45c95d","type":"switch","z":"34860522.632802","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":730,"y":80,"wires":[["26a7a227.a8b5e6"]]},{"id":"26a7a227.a8b5e6","type":"function","z":"34860522.632802","name":"","func":"msg.topic = \"temp/dat/\" + msg.topic;\nreturn msg;","outputs":1,"noerr":0,"x":190,"y":180,"wires":[["f48730cc.fdce18"]]},{"id":"a6168fdd.63af78","type":"inject","z":"34860522.632802","name":"","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":340,"wires":[["d4fed489.b2743"]]},{"id":"d82a5afc.ffc29","type":"tcp request","z":"34860522.632802","server":"192.168.0.150","port":"9500","out":"time","splitc":"1000","name":"ED-588","x":420,"y":340,"wires":[["2cd0ca6a.89704e"]]},{"id":"2795b300.0a8ce6","type":"debug","z":"34860522.632802","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":750,"y":340,"wires":[]},{"id":"d4fed489.b2743","type":"function","z":"34860522.632802","name":"","func":"msg.payload = \"#020001\\r\\n\";\nreturn msg;","outputs":1,"noerr":0,"x":230,"y":340,"wires":[["d82a5afc.ffc29"]]},{"id":"2cd0ca6a.89704e","type":"function","z":"34860522.632802","name":"","func":"var dat = msg.payload.toString(\"utf8\");\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":550,"y":340,"wires":[["2795b300.0a8ce6"]]},{"id":"5048f057.4618e","type":"inject","z":"34860522.632802","name":"","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":400,"wires":[["279868df.318928"]]},{"id":"279868df.318928","type":"function","z":"34860522.632802","name":"","func":"msg.payload = \"#020002\\r\\n\";\nreturn msg;","outputs":1,"noerr":0,"x":230,"y":400,"wires":[["d82a5afc.ffc29"]]},{"id":"f1c308b6.09abe8","type":"inject","z":"34860522.632802","name":"","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":280,"wires":[["9ec17e71.7c4ec"]]},{"id":"9ec17e71.7c4ec","type":"function","z":"34860522.632802","name":"","func":"msg.payload = \"#020000\\r\\n\";\nreturn msg;","outputs":1,"noerr":0,"x":230,"y":280,"wires":[["d82a5afc.ffc29"]]}]

Sequence Controller

[{"id":"f8001b91.0836a","type":"inject","z":"2da9ffe6.393838","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":184,"y":321,"wires":[["2cb17ff3.2088d"]]},{"id":"2cb17ff3.2088d","type":"function","z":"2da9ffe6.393838","name":"SETUP","func":"\nmsg.deviceCount = 4;\nmsg.standbyCount = 3;\nmsg.enabled = true;\n\n\nreturn msg;","outputs":1,"noerr":0,"x":349,"y":321,"wires":[["1c8e99dd.4cc19e"]]},{"id":"1c8e99dd.4cc19e","type":"function","z":"2da9ffe6.393838","name":"Sequencer","func":"//msg.standbyCount = 1;\n\nif (!msg.deviceCount) { msg.deviceCount = context.get(\"deviceCount\") || 3; }\ncontext.set(\"deviceCount\",msg.deviceCount);\n\nif (!msg.standbyCount) { msg.standbyCount = context.get(\"standbyCount\") || msg.deviceCount - 1; }\ncontext.set(\"standbyCount\",msg.standbyCount);\n\nif (!msg.setpoint) { msg.setpoint = context.get(\"setpoint\") ||70;}\ncontext.set(\"setpoint\",msg.setpoint);\n\nif (!msg.enabled) { msg.enabled = context.get(\"enabled\") || true;}\ncontext.set(\"enabled\",msg.enabled);\n\n\n\n//if (!msg.dutyList) { msg.dutyList=[0,1,2]; }\n//if (!msg.jockeyList) { msg.jockeyList=[]; }\n\nmsg.rotation = context.get(\"rotation\") || 0;\n\nif (msg.topic==\"rotate\") { \n    msg.rotation = (msg.rotation + msg.payload) % msg.deviceCount; \n    context.set(\"rotation\",  msg.rotation);\n}\n\nmsg.onCount = msg.deviceCount - msg.standbyCount;\n\nvar outputs={\"msg0\":{\"payload\":false,\"topic\":\"msg0\"},\"msg1\":{\"payload\":false,\"topic\":\"msg1\"},\"msg2\":{\"payload\":false,\"topic\":\"msg2\"},\"msg3\":{\"payload\":false,\"topic\":\"msg3\"},\"msg4\":{\"payload\":false,\"topic\":\"msg4\"},\"msg5\":{\"payload\":false,\"topic\":\"msg5\"},\"msg6\":{\"payload\":false,\"topic\":\"msg6\"}};\n\n\nfor (var j = 0; j < msg.onCount; j++) {\n    outputs[\"msg\"+((j + msg.rotation) % msg.deviceCount)].payload = true;\n\n} \n\n\n\nmsg.payload=msg;\n\nreturn [outputs.msg0,outputs.msg1,outputs.msg2,outputs.msg3,outputs.msg4,outputs.msg5,msg];","outputs":7,"noerr":0,"x":543,"y":396,"wires":[["b1007748.23eba"],["b1007748.23eba"],["b1007748.23eba"],["b1007748.23eba"],["b1007748.23eba"],["b1007748.23eba"],["a2b889fb.53f35"]]},{"id":"e0b18887.85585","type":"debug","z":"2da9ffe6.393838","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1118,"y":393,"wires":[]},{"id":"e668627e.f9006","type":"inject","z":"2da9ffe6.393838","name":"","topic":"rotate","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":179,"y":394,"wires":[["1c8e99dd.4cc19e"]]},{"id":"a2b889fb.53f35","type":"debug","z":"2da9ffe6.393838","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":751,"y":495,"wires":[]},{"id":"b1007748.23eba","type":"switch","z":"2da9ffe6.393838","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":730,"y":400,"wires":[["e0b18887.85585"],["e7bd1b3a.853fc8"]]},{"id":"e7bd1b3a.853fc8","type":"delay","z":"2da9ffe6.393838","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":910,"y":430,"wires":[["e0b18887.85585"]]}]