-
Notifications
You must be signed in to change notification settings - Fork 0
/
ocs.json
1 lines (1 loc) · 104 KB
/
ocs.json
1
[{"id":"26dd1538.7f65ca","type":"tab","label":"Dak","disabled":false,"info":""},{"id":"e027f61.c222088","type":"tab","label":"Weerstation","disabled":false,"info":""},{"id":"aa2ca52d.dec508","type":"tab","label":"CDU","disabled":false,"info":""},{"id":"55c1b3dc.91214c","type":"tab","label":"ALPACA","disabled":false,"info":""},{"id":"7fa6be5b.eea368","type":"tab","label":"Watchdogs Measurements","disabled":false,"info":""},{"id":"dd962aa5.a268f8","type":"ui_tab","name":"OCS","icon":"dashboard","order":1,"disabled":false,"hidden":false},{"id":"3159effc.4f815","type":"ui_group","name":"Dak Control","tab":"dd962aa5.a268f8","order":1,"disp":true,"width":"8","collapse":true},{"id":"9bfe6be.024bd98","type":"ui_base","theme":{"name":"theme-dark","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#097479","value":"#097479","edited":false},"page-titlebar-backgroundColor":{"value":"#097479","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#333333","edited":false},"group-textColor":{"value":"#0eb8c0","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#097479","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"OCS","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"de1b0575.f3c05","type":"ui_group","name":"Weather (AAG)","tab":"dd962aa5.a268f8","order":3,"disp":true,"width":"8","collapse":true},{"id":"3c16fae.5c12606","type":"mqtt-broker","name":"SterrenwachtDak","broker":"192.168.1.9","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"29e06154.fe753e","type":"ui_group","name":"AlwaysOn","tab":"dd962aa5.a268f8","order":5,"disp":true,"width":"8","collapse":true},{"id":"c982fbb8.1deb38","type":"ui_group","name":"hidden_group","tab":"7c447e96.4b96a","order":1,"disp":false,"width":"6","collapse":false},{"id":"7c447e96.4b96a","type":"ui_tab","name":"Zooland Sys","icon":"home","order":2,"disabled":false,"hidden":false},{"id":"cf41b0a7.a0c09","type":"ui_group","name":"Measurements","tab":"dd962aa5.a268f8","order":4,"disp":true,"width":"8","collapse":true},{"id":"8e238b13.7c40b8","type":"ui_group","name":"ALPACA","tab":"dd962aa5.a268f8","order":2,"disp":true,"width":"8","collapse":true},{"id":"4b83471.d3f3db8","type":"ui_group","name":"Telescope","tab":"","order":4,"disp":true,"width":5,"collapse":true},{"id":"5a49a4a5.adfac4","type":"mqtt-broker","name":"Sterrenwacht-Schoener","broker":"xx.xx.xx.xx","port":"18888","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"fcf89eb6.4eae58","type":"ui_group","name":"RoR old","tab":"dd962aa5.a268f8","order":6,"disp":true,"width":"8","collapse":true},{"id":"a42a7e60.ec706","type":"ui_spacer","name":"spacer","group":"3159effc.4f815","order":17,"width":3,"height":1},{"id":"56c6c301.f8cc0c","type":"ui_spacer","name":"spacer","group":"de1b0575.f3c05","order":7,"width":2,"height":1},{"id":"6186338b.243044","type":"ui_spacer","name":"spacer","group":"de1b0575.f3c05","order":10,"width":2,"height":1},{"id":"8c928938.d047a8","type":"ui_spacer","name":"spacer","group":"de1b0575.f3c05","order":11,"width":2,"height":1},{"id":"6ed4aea8.9d0e4","type":"ui_spacer","name":"spacer","group":"cf41b0a7.a0c09","order":11,"width":1,"height":1},{"id":"84e464eb.ed406","type":"ui_spacer","name":"spacer","group":"fcf89eb6.4eae58","order":4,"width":2,"height":1},{"id":"5078a5b2.87d774","type":"mqtt in","z":"26dd1538.7f65ca","name":"","topic":"/sterrenwacht/dak/open","qos":"1","datatype":"auto","broker":"3c16fae.5c12606","x":200,"y":260,"wires":[["cfaa3c77.aab9","cd156d0e.981638"]]},{"id":"cfaa3c77.aab9","type":"rpi-gpio out","z":"26dd1538.7f65ca","name":"","pin":"13","set":true,"level":"0","freq":"","out":"out","x":640,"y":260,"wires":[]},{"id":"4c52df7a.2b19a8","type":"rpi-gpio out","z":"26dd1538.7f65ca","name":"","pin":"11","set":true,"level":"0","freq":"","out":"out","x":640,"y":320,"wires":[]},{"id":"3b2dc3da.cc276c","type":"mqtt in","z":"26dd1538.7f65ca","name":"/sterrenwacht/dak/dicht","topic":"/sterrenwacht/dak/dicht","qos":"1","datatype":"auto","broker":"3c16fae.5c12606","x":200,"y":320,"wires":[["4c52df7a.2b19a8","2e702bab.a8ebd4"]]},{"id":"1dbe7d3d.c1e91b","type":"trigger","z":"26dd1538.7f65ca","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"17","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":370,"y":200,"wires":[["cfaa3c77.aab9","cd156d0e.981638"]]},{"id":"ed078967.276b08","type":"trigger","z":"26dd1538.7f65ca","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"17","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":370,"y":380,"wires":[["4c52df7a.2b19a8","2e702bab.a8ebd4"]]},{"id":"3079ae0f.c969ea","type":"mqtt in","z":"26dd1538.7f65ca","name":"","topic":"/sterrenwacht/dak/power","qos":"1","datatype":"utf8","broker":"3c16fae.5c12606","x":210,"y":120,"wires":[["dcca1373.3cf07","2fd9dc72.2bd00c"]]},{"id":"dcca1373.3cf07","type":"rpi-gpio out","z":"26dd1538.7f65ca","name":"","pin":"15","set":true,"level":"0","freq":"","out":"out","x":560,"y":120,"wires":[]},{"id":"cd156d0e.981638","type":"change","z":"26dd1538.7f65ca","name":"change 1 to opening","rules":[{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"opening","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"num","to":"open","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":200,"wires":[["6b5a9fbf.587208"]]},{"id":"2e702bab.a8ebd4","type":"change","z":"26dd1538.7f65ca","name":"change 1 to closing","rules":[{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"str","to":"closing","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"str","to":"close","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":380,"wires":[["6b5a9fbf.587208"]]},{"id":"6b5a9fbf.587208","type":"function","z":"26dd1538.7f65ca","name":"","func":"switch (msg.payload) {\n\ncase \"opening\" : \n msg.color = \"Red\";\n msg.payload = \"opening\";\n break;\n \ncase \"open\" : \n msg.color = \"Green\";\n msg.payload = \"open\";\n break;\n \ncase \"closing\" : \n msg.color = \"Red\";\n msg.payload = \"sluit\";\n break;\n \ncase \"close\" : \n msg.color = \"Green\";\n msg.payload = \"gesloten\";\n break; \n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":280,"wires":[["d5f5e05b.85628","c554fe5d.8ecf78"]]},{"id":"2fd9dc72.2bd00c","type":"function","z":"26dd1538.7f65ca","name":"Color function","func":"switch (msg.payload) {\n\ncase 1 : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase 0 : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":580,"y":60,"wires":[["6f1358d5.2cf57","fb2b27d0.4028b8"]]},{"id":"c554fe5d.8ecf78","type":"mqtt out","z":"26dd1538.7f65ca","name":"/sterrenwacht/dak/status","topic":"/sterrenwacht/dak/status","qos":"","retain":"","broker":"3c16fae.5c12606","x":1110,"y":300,"wires":[]},{"id":"fb2b27d0.4028b8","type":"mqtt out","z":"26dd1538.7f65ca","name":"","topic":"/sterrenwacht/dak/power/status","qos":"1","retain":"","broker":"3c16fae.5c12606","x":830,"y":80,"wires":[]},{"id":"81c05a7a.84a76","type":"ui_button","z":"26dd1538.7f65ca","name":"DakOpen","group":"fcf89eb6.4eae58","order":5,"width":3,"height":1,"passthru":false,"label":"Open","tooltip":"","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":160,"y":200,"wires":[["1dbe7d3d.c1e91b"]]},{"id":"4735813c.9c49f","type":"ui_button","z":"26dd1538.7f65ca","name":"DackDicht","group":"fcf89eb6.4eae58","order":3,"width":3,"height":1,"passthru":false,"label":"Dicht","tooltip":"","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"num","topic":"","x":170,"y":380,"wires":[["ed078967.276b08"]]},{"id":"7070b54f.951d2c","type":"ui_switch","z":"26dd1538.7f65ca","name":"POWER DAK","label":"POWER DAK","tooltip":"","group":"fcf89eb6.4eae58","order":1,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":170,"y":60,"wires":[["dcca1373.3cf07","2fd9dc72.2bd00c"]]},{"id":"6f1358d5.2cf57","type":"ui_text","z":"26dd1538.7f65ca","group":"fcf89eb6.4eae58","order":2,"width":3,"height":1,"name":"Dak Power Status","label":"STATUS :","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":790,"y":40,"wires":[]},{"id":"d5f5e05b.85628","type":"ui_text","z":"26dd1538.7f65ca","group":"fcf89eb6.4eae58","order":6,"width":8,"height":1,"name":"","label":"Dak status:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":1070,"y":260,"wires":[]},{"id":"c965611b.92842","type":"trigger","z":"26dd1538.7f65ca","name":"Supress transients","op1":"Nothing","op2":"","op1type":"str","op2type":"payl","duration":"60","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":450,"y":440,"wires":[["ed078967.276b08"]]},{"id":"2ebadc26.ae0774","type":"change","z":"26dd1538.7f65ca","name":"Input watchdogs","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":480,"wires":[["c965611b.92842","c7f89381.f20d58"]]},{"id":"f45d0c5b.7cfdc","type":"ping","z":"26dd1538.7f65ca","mode":"timed","name":"PC Check","host":"192.168.1.11","timer":"30","inputs":0,"x":160,"y":660,"wires":[["a6296697.41781","4e05cb28.20ce8c","47734588.31a434"]]},{"id":"a6296697.41781","type":"ui_text","z":"26dd1538.7f65ca","group":"cf41b0a7.a0c09","order":6,"width":4,"height":1,"name":"","label":"WIN10 PC:","format":"<font color=orange > {{msg.payload}} </font>","layout":"row-left","x":370,"y":720,"wires":[]},{"id":"4e05cb28.20ce8c","type":"mqtt out","z":"26dd1538.7f65ca","name":"/sterrenwacht/monitoring/network/PC","topic":"/sterrenwacht/monitoring/network/PC","qos":"","retain":"","broker":"3c16fae.5c12606","x":450,"y":760,"wires":[]},{"id":"99998ff3.864308","type":"inject","z":"e027f61.c222088","name":"5 secs","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"5","topic":"","payload":"","payloadType":"str","x":140,"y":60,"wires":[["26921688.769fe2"]]},{"id":"26921688.769fe2","type":"http request","z":"e027f61.c222088","name":"Solo last data","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.180/cgi-bin/cgiLastData","tls":"","persist":false,"proxy":"","authType":"basic","x":140,"y":180,"wires":[["67e3d5a9.f81f6c","7c2e0ed9.1895d"]]},{"id":"67e3d5a9.f81f6c","type":"split","z":"e027f61.c222088","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":130,"y":300,"wires":[["d45fde8.578312","6325d33b.2316a4","39cf7d6d.4a0f5a","fc5ff003.437328","f79d47c3.dac96","da6d111a.4f2a88","fdc49667.91c9a","ee007097.e66be","a5c0317e.47c888"]]},{"id":"d45fde8.578312","type":"switch","z":"e027f61.c222088","name":"Sky temp","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"clouds=","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":180,"wires":[["c4747eda.ca9848","363b7de2.aed13a"]]},{"id":"da940b5e.a788a","type":"ui_gauge","z":"e027f61.c222088","name":"Sky temperature","group":"de1b0575.f3c05","order":8,"width":3,"height":2,"gtype":"gage","title":"Sky temp","label":"�C","format":"{{value|number:1}}","min":"-60","max":"40","colors":["#00b500","#e6e600","#ca3838"],"seg1":"-20","seg2":"8","x":780,"y":220,"wires":[],"inputLabels":["msg.payload"]},{"id":"c4747eda.ca9848","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nvar t = parseInt( msg.payload, 10 );\nmsg.topic = \"sky\";\nif ( t > -32 )\n msg.topic = \"unsafe\";\nelse\n msg.topic = \"safe\";\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":240,"wires":[["da940b5e.a788a","c2cb799c.7ea218","9fbecfea.7c101"]]},{"id":"61c61a5d.489e6c","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":580,"wires":[["372b2236.0d95b6","b63b4ced.7e508","c4e24fd3.527fb"]]},{"id":"6325d33b.2316a4","type":"switch","z":"e027f61.c222088","name":"Wind speed","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"wind","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":580,"wires":[["61c61a5d.489e6c"]]},{"id":"39cf7d6d.4a0f5a","type":"switch","z":"e027f61.c222088","name":"Ambient","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"temp=","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":360,"wires":[["412652ea.c5524c"]]},{"id":"412652ea.c5524c","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nmsg.topic = \"ambient\";\nmsg.payload = Math.round((msg.payload)*100)/100;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":360,"wires":[["41d26123.36c38","7fc09943.70e9e"]]},{"id":"fc5ff003.437328","type":"switch","z":"e027f61.c222088","name":"Dew point","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"dewp=","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":480,"wires":[["be05f336.f3c7e8"]]},{"id":"be05f336.f3c7e8","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nmsg.topic = \"dewp\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":480,"wires":[["4cc0b74a.d2fb7"]]},{"id":"e68475d9.8948a8","type":"ui_gauge","z":"e027f61.c222088","name":"Wind gust","group":"de1b0575.f3c05","order":9,"width":3,"height":2,"gtype":"gage","title":"Wind gust","label":"�C","format":"{{value|number:1}}","min":"0","max":"100","colors":["#0f01b4","#d28f13","#ca3838"],"seg1":"20","seg2":"40","x":760,"y":800,"wires":[],"inputLabels":["msg.payload"]},{"id":"f79d47c3.dac96","type":"switch","z":"e027f61.c222088","name":"Wind gust","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"gust","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":800,"wires":[["151463f3.90c22c"]]},{"id":"151463f3.90c22c","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":800,"wires":[["e68475d9.8948a8","624ab316.f80a9c"]]},{"id":"fdc49667.91c9a","type":"switch","z":"e027f61.c222088","name":"Humidity","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"hum","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":900,"wires":[["1b4da13c.6fdb57"]]},{"id":"ee007097.e66be","type":"switch","z":"e027f61.c222088","name":"Light","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"light","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1080,"wires":[["9025b4db.9d9828","9b645434.81e6c"]]},{"id":"da6d111a.4f2a88","type":"switch","z":"e027f61.c222088","name":"Safe","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"safe","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1520,"wires":[["4e352636.f0635"]]},{"id":"a5c0317e.47c888","type":"switch","z":"e027f61.c222088","name":"Rain","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"rain","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1280,"wires":[["b67d04ef.06313","5148ea31.761ecc"]]},{"id":"4e352636.f0635","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nif ( parseInt( msg.payload) == 0)\n msg.payload = \"Unsafe\";\n else\n msg.payload = \"Safe\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":550,"y":1520,"wires":[["b5692809.41d82","da615254.cb866"]]},{"id":"1b4da13c.6fdb57","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":900,"wires":[["e5c2824d.60e24"]]},{"id":"9025b4db.9d9828","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":1040,"wires":[["2abfce86.bf414a"]]},{"id":"b67d04ef.06313","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":550,"y":1280,"wires":[["1cef3d42.850063"]]},{"id":"b5692809.41d82","type":"ui_text","z":"e027f61.c222088","group":"de1b0575.f3c05","order":2,"width":2,"height":1,"name":"weather status: ","label":"","format":"<font size=\"+1\">{{msg.payload}}</font>","layout":"row-left","x":780,"y":1520,"wires":[]},{"id":"b83cb3a4.5bf268","type":"ui_text","z":"e027f61.c222088","group":"de1b0575.f3c05","order":1,"width":2,"height":1,"name":"Clouds","label":"","format":"<font size=\"+1\">{{msg.payload}}</font>","layout":"row-left","x":760,"y":60,"wires":[]},{"id":"363b7de2.aed13a","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nif ( parseInt( msg.payload) < -28)\n msg.payload = \"Clear\";\n else\n msg.payload = \"Cloudy\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":140,"wires":[["b83cb3a4.5bf268","a27c358c.a1d5b8"]]},{"id":"5148ea31.761ecc","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nif ( parseInt( msg.payload) < 4200)\n msg.payload = \"Raining\";\n else\n msg.payload = \"Dry\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":550,"y":1400,"wires":[["833cd038.43ea98","85139509.5068f","c2dbe986.6f94a"]]},{"id":"9b645434.81e6c","type":"function","z":"e027f61.c222088","name":"Get the value","func":"msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nif ( parseInt( msg.payload) < 4000)\n msg.payload = \"Light\";\n else\n msg.payload = \"Dark\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":1160,"wires":[["7ef0522f.1100e4","d9189fff.d040d8","25743ec3.acb6d2"]]},{"id":"372b2236.0d95b6","type":"ui_text","z":"e027f61.c222088","group":"de1b0575.f3c05","order":6,"width":3,"height":1,"name":"Wind Speed","label":"<font size=\"+1\">WindSpeed:</font>","format":"<font size=\"+1\">{{msg.payload}}</font>","layout":"row-left","x":770,"y":680,"wires":[]},{"id":"b63b4ced.7e508","type":"mqtt out","z":"e027f61.c222088","name":"","topic":"/solo/windspeed","qos":"1","retain":"","broker":"3c16fae.5c12606","x":790,"y":620,"wires":[]},{"id":"e5c2824d.60e24","type":"mqtt out","z":"e027f61.c222088","name":"/solo/humidity","topic":"/solo/humidity","qos":"","retain":"","broker":"3c16fae.5c12606","x":780,"y":900,"wires":[]},{"id":"85139509.5068f","type":"mqtt out","z":"e027f61.c222088","name":"","topic":"/solo/raining","qos":"","retain":"","broker":"3c16fae.5c12606","x":770,"y":1380,"wires":[]},{"id":"98b72c0a.07ca4","type":"mqtt out","z":"e027f61.c222088","name":"/solo/weatherstatus","topic":"/solo/weatherstatus","qos":"","retain":"","broker":"5a49a4a5.adfac4","x":1000,"y":1560,"wires":[]},{"id":"a27c358c.a1d5b8","type":"mqtt out","z":"e027f61.c222088","name":"/solo/clouds","topic":"/solo/clouds","qos":"1","retain":"","broker":"3c16fae.5c12606","x":770,"y":100,"wires":[]},{"id":"cbf0531e.dc1968","type":"mqtt out","z":"e027f61.c222088","name":"","topic":"/solo/brigthness","qos":"","retain":"","broker":"5a49a4a5.adfac4","x":960,"y":1160,"wires":[]},{"id":"2abfce86.bf414a","type":"mqtt out","z":"e027f61.c222088","name":"","topic":"/solo/brigthness/value","qos":"","retain":"","broker":"3c16fae.5c12606","x":800,"y":1000,"wires":[]},{"id":"4cc0b74a.d2fb7","type":"mqtt out","z":"e027f61.c222088","name":"","topic":"/solo/dewpoint","qos":"1","retain":"","broker":"3c16fae.5c12606","x":780,"y":440,"wires":[]},{"id":"7ef0522f.1100e4","type":"ui_text","z":"e027f61.c222088","group":"de1b0575.f3c05","order":3,"width":2,"height":1,"name":"Brightness","label":"","format":"<font size=\"+1\">{{msg.payload}}</font>","layout":"row-left","x":770,"y":1120,"wires":[]},{"id":"1cef3d42.850063","type":"mqtt out","z":"e027f61.c222088","name":"","topic":"/solo/raining/value","qos":"1","retain":"","broker":"3c16fae.5c12606","x":790,"y":1280,"wires":[]},{"id":"833cd038.43ea98","type":"ui_text","z":"e027f61.c222088","group":"de1b0575.f3c05","order":4,"width":2,"height":1,"name":"Raining","label":"","format":"<font size=\"+1\">{{msg.payload}}</font>","layout":"row-left","x":760,"y":1340,"wires":[]},{"id":"875b068b.2063e8","type":"ui_button","z":"26dd1538.7f65ca","name":"WakeUp PC","group":"3159effc.4f815","order":1,"width":3,"height":1,"passthru":false,"label":"WakeUp PC","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"num","topic":"","x":170,"y":820,"wires":[["26740ea9.e6d232","a542768c.05526"]]},{"id":"26740ea9.e6d232","type":"mqtt out","z":"26dd1538.7f65ca","name":"/sterrenwacht/telescoop/pc/wakeup","topic":"/sterrenwacht/telescoop/pc/wakeup","qos":"1","retain":"","broker":"3c16fae.5c12606","x":450,"y":860,"wires":[]},{"id":"18aaf6b6.78c449","type":"change","z":"aa2ca52d.dec508","name":"Extract 1 of 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":200,"wires":[["72cddc10.8e9264"]]},{"id":"72cddc10.8e9264","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":200,"wires":[["a407717e.b93538"],["269a6079.352d78"]]},{"id":"a407717e.b93538","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"AAN","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":180,"wires":[["1a784f1c.fc6a79"]]},{"id":"269a6079.352d78","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"UIT","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":220,"wires":[["1a784f1c.fc6a79"]]},{"id":"428a9149.4c0518","type":"function","z":"aa2ca52d.dec508","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase \"AAN\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"UIT\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1440,"y":160,"wires":[["693874af.d6baac"]]},{"id":"588ca6d8.4af39","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"AAN","vt":"str"},{"t":"eq","v":"UIT","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1410,"y":220,"wires":[["4479d14.d1be83"],["6e019ea4.9f928"]]},{"id":"af398932.2dd11","type":"inject","z":"aa2ca52d.dec508","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":210,"y":200,"wires":[["28cec731.56ea78"]]},{"id":"28cec731.56ea78","type":"snmp","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"public","version":"2c","oids":"1.3.6.1.4.1.1718.3.2.3.1.5.1.1.1 \n","timeout":"","name":"Get Status APC Port 01","x":410,"y":200,"wires":[["18aaf6b6.78c449"]]},{"id":"4479d14.d1be83","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.1\",\n \"type\": \"Integer\",\n \"value\": 1}]","timeout":5,"name":"APC 01 AAN","x":1630,"y":200,"wires":[]},{"id":"6e019ea4.9f928","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.1\",\n \"type\": \"Integer\",\n \"value\": 2}]","timeout":5,"name":"APC 01 UIT","x":1630,"y":240,"wires":[]},{"id":"dad1ea9d.142ca","type":"change","z":"aa2ca52d.dec508","name":"Extract 1 of 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":280,"wires":[["e004e50e.48a8d"]]},{"id":"e004e50e.48a8d","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":280,"wires":[["73703209.8c3434"],["91bf7a2.57e0108"]]},{"id":"73703209.8c3434","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"AAN","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":260,"wires":[["59d078df.d4be4"]]},{"id":"91bf7a2.57e0108","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"UIT","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":300,"wires":[["59d078df.d4be4"]]},{"id":"9acdca80.0e72f","type":"function","z":"aa2ca52d.dec508","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase \"AAN\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"UIT\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1440,"y":280,"wires":[["1e9675ba.210d42"]]},{"id":"7f4e353f.3a6cbc","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"AAN","vt":"str"},{"t":"eq","v":"UIT","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1410,"y":340,"wires":[["7b5b0009.388dc8"],["6c329bf8.cf7fec"]]},{"id":"a2918f37.fc0bb","type":"inject","z":"aa2ca52d.dec508","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":210,"y":280,"wires":[["c3157c89.0a46d"]]},{"id":"c3157c89.0a46d","type":"snmp","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"public","version":"2c","oids":"1.3.6.1.4.1.1718.3.2.3.1.5.1.1.2\n","timeout":"","name":"Get Status APC Port 02","x":410,"y":280,"wires":[["dad1ea9d.142ca"]]},{"id":"7b5b0009.388dc8","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.2\",\n \"type\": \"Integer\",\n \"value\": 1}]","timeout":5,"name":"APC 02 AAN","x":1630,"y":320,"wires":[]},{"id":"6c329bf8.cf7fec","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.2\",\n \"type\": \"Integer\",\n \"value\": 2}]","timeout":5,"name":"APC 02 UIT","x":1630,"y":360,"wires":[]},{"id":"68ba334.ea9114c","type":"change","z":"aa2ca52d.dec508","name":"Extract 1 of 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":400,"wires":[["95c1ccb9.4b4088"]]},{"id":"95c1ccb9.4b4088","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":400,"wires":[["ec1d0dea.5a6538"],["b4efae39.95c7d8"]]},{"id":"ec1d0dea.5a6538","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"AAN","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":380,"wires":[["b4149b57.696318"]]},{"id":"b4efae39.95c7d8","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"UIT","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":420,"wires":[["b4149b57.696318"]]},{"id":"dd5aa210.8d8b6","type":"function","z":"aa2ca52d.dec508","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase \"AAN\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"UIT\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1440,"y":400,"wires":[["8cc38335.5c6bb8"]]},{"id":"434bbc88.014bfc","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"AAN","vt":"str"},{"t":"eq","v":"UIT","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1410,"y":460,"wires":[["73eb2779.be8c98"],["32bec586.0f9b3a"]]},{"id":"4cb6d70b.6b7518","type":"inject","z":"aa2ca52d.dec508","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":200,"y":400,"wires":[["453a580b.c05a9"]]},{"id":"453a580b.c05a9","type":"snmp","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"public","version":"2c","oids":"1.3.6.1.4.1.1718.3.2.3.1.5.1.1.3\n","timeout":"","name":"Get Status APC Port 03","x":400,"y":400,"wires":[["68ba334.ea9114c"]]},{"id":"73eb2779.be8c98","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.3\",\n \"type\": \"Integer\",\n \"value\": 1}]","timeout":5,"name":"APC 03 AAN","x":1630,"y":440,"wires":[]},{"id":"32bec586.0f9b3a","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.3\",\n \"type\": \"Integer\",\n \"value\": 2}]","timeout":5,"name":"APC 03 UIT","x":1630,"y":480,"wires":[]},{"id":"610820e8.2cb858","type":"change","z":"aa2ca52d.dec508","name":"Extract 1 of 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":520,"wires":[["6aaa7fe0.0f6d5"]]},{"id":"6aaa7fe0.0f6d5","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":780,"y":520,"wires":[["c148c7f0.d47a2"],["e54973c5.86bac8"]]},{"id":"c148c7f0.d47a2","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"AAN","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":500,"wires":[["85c1e2ad.be9218"]]},{"id":"e54973c5.86bac8","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"UIT","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":540,"wires":[["85c1e2ad.be9218"]]},{"id":"2ba97ecd.d33f52","type":"function","z":"aa2ca52d.dec508","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase \"AAN\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"UIT\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1440,"y":520,"wires":[["cb72ee0e.24629"]]},{"id":"273849c5.0e3d66","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"AAN","vt":"str"},{"t":"eq","v":"UIT","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1410,"y":580,"wires":[["9a0241c1.38c95"],["47117a72.f96434"]]},{"id":"682735c4.27407c","type":"inject","z":"aa2ca52d.dec508","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":200,"y":520,"wires":[["22730d65.a5e262"]]},{"id":"22730d65.a5e262","type":"snmp","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"public","version":"2c","oids":"1.3.6.1.4.1.1718.3.2.3.1.5.1.1.4\n","timeout":"","name":"Get Status APC Port 04","x":400,"y":520,"wires":[["610820e8.2cb858"]]},{"id":"9a0241c1.38c95","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.4\",\n \"type\": \"Integer\",\n \"value\": 1}]","timeout":5,"name":"APC 04 AAN","x":1620,"y":560,"wires":[]},{"id":"47117a72.f96434","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.4\",\n \"type\": \"Integer\",\n \"value\": 2}]","timeout":5,"name":"APC 04 UIT","x":1620,"y":600,"wires":[]},{"id":"4c98f9a6.82d458","type":"change","z":"aa2ca52d.dec508","name":"Extract 1 of 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":640,"wires":[["edf52451.4a964"]]},{"id":"edf52451.4a964","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":780,"y":640,"wires":[["f06c05ef.77533"],["b6feeaa1.a893c8"]]},{"id":"f06c05ef.77533","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"AAN","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":620,"wires":[["1b659c6e.c7b784"]]},{"id":"b6feeaa1.a893c8","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"UIT","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":660,"wires":[["1b659c6e.c7b784"]]},{"id":"bd22866f.e59de","type":"function","z":"aa2ca52d.dec508","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase \"AAN\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"UIT\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1440,"y":640,"wires":[["dbe5da47.d4fde8"]]},{"id":"37cb97cf.230118","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"AAN","vt":"str"},{"t":"eq","v":"UIT","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1410,"y":700,"wires":[["49ee3e58.dd4dc8"],["ae144420.d877d"]]},{"id":"d01fb0e9.dbc438","type":"inject","z":"aa2ca52d.dec508","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":200,"y":640,"wires":[["aebcdc2c.d28b2"]]},{"id":"aebcdc2c.d28b2","type":"snmp","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"public","version":"2c","oids":"1.3.6.1.4.1.1718.3.2.3.1.5.1.1.5 \n","timeout":"","name":"Get Status APC Port 05","x":400,"y":640,"wires":[["4c98f9a6.82d458"]]},{"id":"49ee3e58.dd4dc8","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.5\",\n \"type\": \"Integer\",\n \"value\": 1}]","timeout":5,"name":"APC 05 AAN","x":1620,"y":680,"wires":[]},{"id":"ae144420.d877d","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.5\",\n \"type\": \"Integer\",\n \"value\": 2}]","timeout":5,"name":"APC 05 UIT","x":1620,"y":720,"wires":[]},{"id":"7933ef16.61258","type":"change","z":"aa2ca52d.dec508","name":"Extract 1 of 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":760,"wires":[["b7c785c0.28133"]]},{"id":"b7c785c0.28133","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":780,"y":760,"wires":[["a7702f58.0c17f8"],["cf5075b6.3536a"]]},{"id":"a7702f58.0c17f8","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"AAN","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":740,"wires":[["caae09f6.1bb8b8"]]},{"id":"cf5075b6.3536a","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"UIT","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":780,"wires":[["caae09f6.1bb8b8"]]},{"id":"9b5f9379.a2c2e8","type":"function","z":"aa2ca52d.dec508","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase \"AAN\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"UIT\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1440,"y":760,"wires":[["fa6b118c.31d67"]]},{"id":"e71ef6a3.6579a8","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"AAN","vt":"str"},{"t":"eq","v":"UIT","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1410,"y":820,"wires":[["c09332db.6334b"],["9458088e.6ec45"]]},{"id":"97e0c75f.7965e8","type":"inject","z":"aa2ca52d.dec508","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":200,"y":760,"wires":[["6f02a55.f88355c"]]},{"id":"6f02a55.f88355c","type":"snmp","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"public","version":"2c","oids":"1.3.6.1.4.1.1718.3.2.3.1.5.1.1.6\n","timeout":"","name":"Get Status APC Port 06","x":400,"y":760,"wires":[[]]},{"id":"c09332db.6334b","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.6\",\n \"type\": \"Integer\",\n \"value\": 1}]","timeout":5,"name":"APC 06 AAN","x":1620,"y":800,"wires":[]},{"id":"9458088e.6ec45","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.6\",\n \"type\": \"Integer\",\n \"value\": 2}]","timeout":5,"name":"APC 06 UIT","x":1620,"y":840,"wires":[]},{"id":"3f990041.f0c31","type":"change","z":"aa2ca52d.dec508","name":"Extract 1 of 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":880,"wires":[["e446503e.24c758"]]},{"id":"e446503e.24c758","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":780,"y":880,"wires":[["c6806715.e7635"],["4dd73082.e1c698"]]},{"id":"c6806715.e7635","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"AAN","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":860,"wires":[["66adc671.b15cd8"]]},{"id":"4dd73082.e1c698","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"UIT","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":900,"wires":[["66adc671.b15cd8"]]},{"id":"11d7656b.9c6493","type":"function","z":"aa2ca52d.dec508","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase \"AAN\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"UIT\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1440,"y":880,"wires":[["e9646fb0.0a934"]]},{"id":"84765169.6fd07","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"AAN","vt":"str"},{"t":"eq","v":"UIT","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1410,"y":940,"wires":[["4a22990c.5d318"],["38375c4b.6c9d9c"]]},{"id":"c64fbbf4.c282d","type":"inject","z":"aa2ca52d.dec508","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":200,"y":880,"wires":[["cdad854.3d61578"]]},{"id":"cdad854.3d61578","type":"snmp","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"public","version":"2c","oids":"1.3.6.1.4.1.1718.3.2.3.1.5.1.1.7\n","timeout":"","name":"Get Status APC Port 07","x":400,"y":880,"wires":[["3f990041.f0c31"]]},{"id":"4a22990c.5d318","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.7\",\n \"type\": \"Integer\",\n \"value\": 1}]","timeout":5,"name":"APC 07 AAN","x":1620,"y":920,"wires":[]},{"id":"38375c4b.6c9d9c","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.7\",\n \"type\": \"Integer\",\n \"value\": 2}]","timeout":5,"name":"APC 07 UIT","x":1620,"y":960,"wires":[]},{"id":"74d7cff9.80e5b8","type":"change","z":"aa2ca52d.dec508","name":"Extract 1 of 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":1000,"wires":[["f07f22c2.3e293"]]},{"id":"f07f22c2.3e293","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":780,"y":1000,"wires":[["8155fe22.703f8"],["2eadf03c.20671"]]},{"id":"8155fe22.703f8","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"AAN","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":980,"wires":[["97f9782a.e90648"]]},{"id":"2eadf03c.20671","type":"change","z":"aa2ca52d.dec508","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"UIT","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":1020,"wires":[["97f9782a.e90648"]]},{"id":"bf7ec3f8.6861c","type":"function","z":"aa2ca52d.dec508","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase \"AAN\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"UIT\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1430,"y":1000,"wires":[["36ab0b6d.ec4694"]]},{"id":"f0a70499.b914e","type":"switch","z":"aa2ca52d.dec508","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"AAN","vt":"str"},{"t":"eq","v":"UIT","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1410,"y":1060,"wires":[["d1e9d42a.42ca28"],["48adb0a7.9c38c8"]]},{"id":"2f0b7055.22e6d","type":"inject","z":"aa2ca52d.dec508","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":200,"y":1000,"wires":[["1022ed10.fa1733"]]},{"id":"1022ed10.fa1733","type":"snmp","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"public","version":"2c","oids":"1.3.6.1.4.1.1718.3.2.3.1.5.1.1.8\n","timeout":"","name":"Get Status APC Port 08","x":400,"y":1000,"wires":[["74d7cff9.80e5b8"]]},{"id":"d1e9d42a.42ca28","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.8\",\n \"type\": \"Integer\",\n \"value\": 1}]","timeout":5,"name":"APC 08 AAN","x":1620,"y":1040,"wires":[]},{"id":"48adb0a7.9c38c8","type":"snmp set","z":"aa2ca52d.dec508","host":"192.168.1.12","community":"lalala","version":"2c","varbinds":"[{\"oid\": \"1.3.6.1.4.1.1718.3.2.3.1.11.1.1.8\",\n \"type\": \"Integer\",\n \"value\": 2}]","timeout":5,"name":"APC 08 UIT","x":1620,"y":1080,"wires":[]},{"id":"1a784f1c.fc6a79","type":"ui_switch","z":"aa2ca52d.dec508","name":"Port 01: LEEG","label":"Port 01: LEEG","tooltip":"","group":"29e06154.fe753e","order":9,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"AAN","onvalueType":"str","onicon":"","oncolor":"","offvalue":"UIT","offvalueType":"str","officon":"","offcolor":"","x":1160,"y":200,"wires":[["428a9149.4c0518","588ca6d8.4af39"]]},{"id":"59d078df.d4be4","type":"ui_switch","z":"aa2ca52d.dec508","name":"Port 02: LAMP","label":"LAMP","tooltip":"","group":"3159effc.4f815","order":12,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"AAN","onvalueType":"str","onicon":"","oncolor":"","offvalue":"UIT","offvalueType":"str","officon":"","offcolor":"","x":1160,"y":280,"wires":[["9acdca80.0e72f","7f4e353f.3a6cbc"]]},{"id":"b4149b57.696318","type":"ui_switch","z":"aa2ca52d.dec508","name":"Port 03: Webcam ","label":"WEBCAM","tooltip":"","group":"29e06154.fe753e","order":1,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"AAN","onvalueType":"str","onicon":"","oncolor":"","offvalue":"UIT","offvalueType":"str","officon":"","offcolor":"","x":1160,"y":400,"wires":[["dd5aa210.8d8b6","434bbc88.014bfc"]]},{"id":"85c1e2ad.be9218","type":"ui_switch","z":"aa2ca52d.dec508","name":"Port 04: AAG / ALLSKY","label":"AAG / ALLSKY","tooltip":"","group":"29e06154.fe753e","order":3,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"AAN","onvalueType":"str","onicon":"","oncolor":"","offvalue":"UIT","offvalueType":"str","officon":"","offcolor":"","x":1180,"y":520,"wires":[["2ba97ecd.d33f52","273849c5.0e3d66"]]},{"id":"1b659c6e.c7b784","type":"ui_switch","z":"aa2ca52d.dec508","name":"Port 05: Win10","label":"WIN10 PC","tooltip":"","group":"29e06154.fe753e","order":7,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"AAN","onvalueType":"str","onicon":"","oncolor":"","offvalue":"UIT","offvalueType":"str","officon":"","offcolor":"","x":1150,"y":640,"wires":[["bd22866f.e59de","37cb97cf.230118"]]},{"id":"caae09f6.1bb8b8","type":"ui_switch","z":"aa2ca52d.dec508","name":"Port 06: Mount","label":"MOUNT","tooltip":"","group":"3159effc.4f815","order":4,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"AAN","onvalueType":"str","onicon":"","oncolor":"","offvalue":"UIT","offvalueType":"str","officon":"","offcolor":"","x":1150,"y":760,"wires":[["9b5f9379.a2c2e8","e71ef6a3.6579a8"]]},{"id":"66adc671.b15cd8","type":"ui_switch","z":"aa2ca52d.dec508","name":"Port 07: PI3B ZUIL","label":"PI3B ZUIL","tooltip":"","group":"29e06154.fe753e","order":5,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"AAN","onvalueType":"str","onicon":"","oncolor":"","offvalue":"UIT","offvalueType":"str","officon":"","offcolor":"","x":1160,"y":880,"wires":[["11d7656b.9c6493","84765169.6fd07"]]},{"id":"97f9782a.e90648","type":"ui_switch","z":"aa2ca52d.dec508","name":"Port 08: Flat Screen","label":"FLATSCREEN","tooltip":"","group":"3159effc.4f815","order":14,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"AAN","onvalueType":"str","onicon":"","oncolor":"","offvalue":"UIT","offvalueType":"str","officon":"","offcolor":"","x":1170,"y":1000,"wires":[["bf7ec3f8.6861c","f0a70499.b914e"]]},{"id":"693874af.d6baac","type":"ui_text","z":"aa2ca52d.dec508","group":"29e06154.fe753e","order":10,"width":3,"height":1,"name":"Port 01: LEEG","label":"CDU-01:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":1640,"y":160,"wires":[]},{"id":"1e9675ba.210d42","type":"ui_text","z":"aa2ca52d.dec508","group":"3159effc.4f815","order":13,"width":3,"height":1,"name":"Port 02 Lamp","label":"CDU-02:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":1640,"y":280,"wires":[]},{"id":"8cc38335.5c6bb8","type":"ui_text","z":"aa2ca52d.dec508","group":"29e06154.fe753e","order":2,"width":3,"height":1,"name":"Port 03: Webcam ","label":"CDU-03:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":1650,"y":400,"wires":[]},{"id":"cb72ee0e.24629","type":"ui_text","z":"aa2ca52d.dec508","group":"29e06154.fe753e","order":4,"width":3,"height":1,"name":"Port 04 ALLSKY /AAG SOLO","label":"CDU-04:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":1670,"y":520,"wires":[]},{"id":"dbe5da47.d4fde8","type":"ui_text","z":"aa2ca52d.dec508","group":"29e06154.fe753e","order":8,"width":3,"height":1,"name":"Port 05: Win10","label":"CDU-05:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":1630,"y":640,"wires":[]},{"id":"fa6b118c.31d67","type":"ui_text","z":"aa2ca52d.dec508","group":"3159effc.4f815","order":5,"width":3,"height":1,"name":"Port 06: Mount","label":"CDU-06:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":1630,"y":760,"wires":[]},{"id":"e9646fb0.0a934","type":"ui_text","z":"aa2ca52d.dec508","group":"29e06154.fe753e","order":6,"width":3,"height":1,"name":"Port 07: PI ZUIL","label":"CDU-07:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":1630,"y":880,"wires":[]},{"id":"36ab0b6d.ec4694","type":"ui_text","z":"aa2ca52d.dec508","group":"3159effc.4f815","order":15,"width":3,"height":1,"name":"Port 08: Flat Screen","label":"CDU-08:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":1650,"y":1000,"wires":[]},{"id":"17bcc17c.335a97","type":"ui_switch","z":"26dd1538.7f65ca","name":"CANON40D","label":"CANON40D","tooltip":"","group":"3159effc.4f815","order":6,"width":5,"height":1,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":510,"y":1220,"wires":[["13661710.654639"]]},{"id":"13661710.654639","type":"mqtt out","z":"26dd1538.7f65ca","name":"/sterrenwacht/telescoop/canon40d","topic":"/sterrenwacht/telescoop/canon40d","qos":"1","retain":"","broker":"3c16fae.5c12606","x":760,"y":1220,"wires":[]},{"id":"b19b7f10.8d63b8","type":"function","z":"26dd1538.7f65ca","name":"Color Function","func":"switch (msg.payload) {\n\ncase \"Aan\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"Uit\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":520,"y":1160,"wires":[["1cea2534.7c3483"]]},{"id":"1cea2534.7c3483","type":"ui_text","z":"26dd1538.7f65ca","group":"3159effc.4f815","order":7,"width":3,"height":1,"name":"","label":"STATUS:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":680,"y":1160,"wires":[]},{"id":"2f7757b4.b8c338","type":"mqtt in","z":"26dd1538.7f65ca","name":"","topic":"/sterrenwacht/telescoop/canon40d","qos":"1","datatype":"json","broker":"3c16fae.5c12606","x":240,"y":1220,"wires":[["17bcc17c.335a97"]]},{"id":"2c968b92.e4ac04","type":"ui_switch","z":"26dd1538.7f65ca","name":"ONFOCUS","label":"ONFOCUS","tooltip":"","group":"3159effc.4f815","order":8,"width":5,"height":1,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":510,"y":1340,"wires":[["37c7cfb1.c49048"]]},{"id":"31b62a20.c558de","type":"function","z":"26dd1538.7f65ca","name":"Color Function","func":"switch (msg.payload) {\n\ncase \"Aan\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"Uit\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":520,"y":1280,"wires":[["5f2bd706.171c38"]]},{"id":"37c7cfb1.c49048","type":"mqtt out","z":"26dd1538.7f65ca","name":"/sterrenwacht/telescoop/OnFocus","topic":"/sterrenwacht/telescoop/OnFocus","qos":"1","retain":"","broker":"3c16fae.5c12606","x":760,"y":1340,"wires":[]},{"id":"5f2bd706.171c38","type":"ui_text","z":"26dd1538.7f65ca","group":"3159effc.4f815","order":9,"width":3,"height":1,"name":"","label":"STATUS:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":680,"y":1280,"wires":[]},{"id":"ac5122c0.07add8","type":"mqtt in","z":"26dd1538.7f65ca","name":"/sterrenwacht/telescoop/OnFocus/Status","topic":"/sterrenwacht/telescoop/OnFocus/Status","qos":"1","datatype":"utf8","broker":"3c16fae.5c12606","x":260,"y":1280,"wires":[["31b62a20.c558de"]]},{"id":"e6b71187.bbbf78","type":"mqtt in","z":"26dd1538.7f65ca","name":"","topic":"/sterrenwacht/telescoop/canon40d/Status","qos":"1","datatype":"auto","broker":"3c16fae.5c12606","x":260,"y":1160,"wires":[["b19b7f10.8d63b8"]]},{"id":"910dc524.d5795","type":"mqtt in","z":"26dd1538.7f65ca","name":"/sterrenwacht/telescoop/OnFocus","topic":"/sterrenwacht/telescoop/OnFocus","qos":"0","datatype":"json","broker":"3c16fae.5c12606","x":240,"y":1340,"wires":[["2c968b92.e4ac04"]]},{"id":"41d26123.36c38","type":"ui_text","z":"e027f61.c222088","group":"de1b0575.f3c05","order":5,"width":3,"height":1,"name":"Temperature","label":"<font size=\"+1\"> temp:</font>","format":"<font size=\"+1\">{{msg.payload}}</font>","layout":"row-left","x":770,"y":340,"wires":[]},{"id":"a542768c.05526","type":"trigger","z":"26dd1538.7f65ca","name":"","op1":"WakingUp","op2":"Running","op1type":"str","op2type":"str","duration":"360","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":370,"y":820,"wires":[["c0b63901.48942"]]},{"id":"c84bbba2.92f7b8","type":"ui_text","z":"26dd1538.7f65ca","group":"3159effc.4f815","order":2,"width":3,"height":1,"name":"","label":"start:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":1050,"y":680,"wires":[]},{"id":"249f5fcc.df823","type":"mqtt in","z":"26dd1538.7f65ca","name":"","topic":"/sterrenwacht/telescoop/12v/Status","qos":"2","datatype":"auto","broker":"3c16fae.5c12606","x":240,"y":1400,"wires":[["c20c91ee.819d98"]]},{"id":"6fcd3f6b.570518","type":"mqtt in","z":"26dd1538.7f65ca","name":"","topic":"/sterrenwacht/telescoop/12v","qos":"2","datatype":"auto","broker":"3c16fae.5c12606","x":220,"y":1460,"wires":[["97284cc6.0076a"]]},{"id":"97284cc6.0076a","type":"ui_switch","z":"26dd1538.7f65ca","name":"Power 12V","label":"Power 12V","tooltip":"","group":"3159effc.4f815","order":10,"width":5,"height":1,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":510,"y":1460,"wires":[["4c587a81.2586bc"]]},{"id":"4c587a81.2586bc","type":"mqtt out","z":"26dd1538.7f65ca","name":"","topic":"/sterrenwacht/telescoop/12v","qos":"","retain":"","broker":"3c16fae.5c12606","x":740,"y":1460,"wires":[]},{"id":"c20c91ee.819d98","type":"function","z":"26dd1538.7f65ca","name":"Color Function","func":"switch (msg.payload) {\n\ncase \"Aan\" : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase \"Uit\" : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":520,"y":1400,"wires":[["5ee4261f.7f2ff8"]]},{"id":"5ee4261f.7f2ff8","type":"ui_text","z":"26dd1538.7f65ca","group":"3159effc.4f815","order":11,"width":3,"height":1,"name":"STATUS:","label":"STATUS:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":680,"y":1400,"wires":[]},{"id":"55e65f01.992158","type":"snmp","z":"26dd1538.7f65ca","host":"192.168.1.12","community":"public","version":"2c","oids":"1.3.6.1.4.1.1718.3.1.6.0","timeout":5,"name":"power unit 1.3.6.1.4.1.1718.3.1.6.0","x":420,"y":1520,"wires":[["fb98c8df.1a8aa8","aaae4426.efadf"]]},{"id":"9b7076e7.f6363","type":"inject","z":"26dd1538.7f65ca","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":false,"onceDelay":"5","topic":"","payload":"","payloadType":"date","x":190,"y":1520,"wires":[["55e65f01.992158"]]},{"id":"fb98c8df.1a8aa8","type":"ui_text","z":"26dd1538.7f65ca","group":"cf41b0a7.a0c09","order":1,"width":4,"height":1,"name":"Power Usage:","label":"Power Usage:","format":"<font color=orange > {{msg.payload[0].value}} </font>","layout":"row-left","x":720,"y":1520,"wires":[]},{"id":"cee31051.858bf8","type":"function","z":"26dd1538.7f65ca","name":"color function","func":"switch (msg.payload) {\n\ncase 1 : \n msg.color = \"Green\";\n msg.payload = \"PC is on\";\n break;\n\n \ncase 0 :\n msg.color = \"Red\";\n msg.payload = \"PC is off\";\n break;\n \ncase 2 : \n msg.color = \"Orange\";\n msg.payload = \"Wait Starting PC\";\n break;\n \n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":680,"wires":[["c84bbba2.92f7b8"]]},{"id":"47734588.31a434","type":"switch","z":"26dd1538.7f65ca","name":"","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"istype","v":"number","vt":"number"},{"t":"true"}],"checkall":"true","repair":false,"outputs":3,"x":350,"y":660,"wires":[["48408cb0.abaf7c"],["4b32b950.d44258"],[]]},{"id":"48408cb0.abaf7c","type":"change","z":"26dd1538.7f65ca","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":640,"wires":[["cee31051.858bf8"]]},{"id":"4b32b950.d44258","type":"change","z":"26dd1538.7f65ca","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":680,"wires":[["cee31051.858bf8"]]},{"id":"65b4ac30.5993a4","type":"ui_text","z":"26dd1538.7f65ca","group":"cf41b0a7.a0c09","order":9,"width":4,"height":1,"name":"","label":"","format":"{{msg.moonPhase}}","layout":"row-left","x":590,"y":1600,"wires":[]},{"id":"c1fe598f.c335","type":"inject","z":"26dd1538.7f65ca","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"7200","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":1620,"wires":[["de7a0374.869938"]]},{"id":"de7a0374.869938","type":"astrodata dayvalues","z":"26dd1538.7f65ca","name":"","lon":"6.43500","lat":"52.84222","height":0,"lang":"en","offset":0,"x":380,"y":1620,"wires":[["65b4ac30.5993a4","3ae5bc34.d7014c"]]},{"id":"e4ce2fc.43a12d","type":"ui_text","z":"26dd1538.7f65ca","group":"cf41b0a7.a0c09","order":10,"width":3,"height":1,"name":"","label":"Phase","format":"{{msg.moonPhaseNumber | number: 2}}","layout":"row-left","x":690,"y":1660,"wires":[]},{"id":"8c1a07e.ed3eb78","type":"ui_template","z":"26dd1538.7f65ca","group":"c982fbb8.1deb38","name":"Clock Toolbar","order":1,"width":0,"height":0,"format":"<script id=\"titleScript\" type=\"text/javascript\">\n\n$(function() {\n if($('.md-toolbar-tools').length != 0){\n loadClock();\n }else setTimeout(loadClock, 500)\n});\n\nfunction loadClock(){\n $('#clock').remove();\n var toolbar = $('.md-toolbar-tools');\n \n var div = $('<div/>');\n var p = $('<p/ id=\"clock\">');\n \n div.append(p);\n div[0].style.margin = '5px 5px 5px auto';\n toolbar.append(div);\n\n function displayTitle(lh) {\n p.text(lh); \n }\n \n function upTime() {\n var d = new Date();\n p.text(d.toLocaleString());\n }\n\n if(document.clockInterval){ \n clearInterval(document.clockInterval);\n document.clockInterval = null;\n }\n \n document.clockInterval = setInterval(upTime,1000);\n}\n\n</script>","storeOutMessages":false,"fwdInMessages":false,"resendOnRefresh":false,"templateScope":"global","x":1000,"y":1520,"wires":[[]]},{"id":"3096177c.ea0ea8","type":"ui_text","z":"55c1b3dc.91214c","group":"8e238b13.7c40b8","order":5,"width":0,"height":0,"name":"Dome-Shutter-txt","label":"<font size=\"+1\">RoR Shutter :</font>","format":"{{msg.payload}}","layout":"row-spread","x":1190,"y":240,"wires":[]},{"id":"a2190f84.12cbf","type":"inject","z":"55c1b3dc.91214c","name":"Dome-Shutterstatus","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"0","topic":"","payload":"api/v1/dome/0/shutterstatus","payloadType":"str","x":140,"y":240,"wires":[["cf2bce93.449e8"]]},{"id":"cf2bce93.449e8","type":"http request","z":"55c1b3dc.91214c","name":"GET REST-Dome-Shutter, http://192.168.1.11:11111/{{{payload}}}","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.9:6800/{{{payload}}}","tls":"","persist":false,"proxy":"","authType":"","x":520,"y":240,"wires":[["cd8ef741.aa72f8"]]},{"id":"cd8ef741.aa72f8","type":"function","z":"55c1b3dc.91214c","name":"","func":"rc = msg.statusCode;\nif ( (rc == \"EHOSTUNREACH\") || (rc == \"ETIMEDOUT\") ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"yellow\\\">N/A</font>\";\n } else if ( rc == 400 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"yellow\\\">N/C</font>\";\n} else if ( rc == 200 ) {\n p=JSON.parse(msg.payload)\n if ( p.Value == 0 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"white\\\">Open</font>\";\n } else if ( p.Value == 1 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"lime\\\">Closed</font>\";\n } else if ( p.Value == 2 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"orange\\\">Opening</font>\";\n } else if ( p.Value == 3 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"orange\\\">Closing</font>\";\n } else if ( p.Value == 4 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"red\\\">ERROR</font>\";\n }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":240,"wires":[["6dddcf05.0dc41"]]},{"id":"6dddcf05.0dc41","type":"rbe","z":"55c1b3dc.91214c","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":1010,"y":240,"wires":[["3096177c.ea0ea8"]]},{"id":"eca3b1c1.d4af6","type":"ui_text","z":"55c1b3dc.91214c","group":"8e238b13.7c40b8","order":9,"width":0,"height":0,"name":"Telescope-Tracking.txt","label":"<font size=\"+1\">Telescope Tracking :</font>","format":"{{msg.payload}}","layout":"row-spread","x":1080,"y":540,"wires":[]},{"id":"87d16c91.ef369","type":"comment","z":"55c1b3dc.91214c","name":"Telescope","info":"","x":140,"y":320,"wires":[]},{"id":"5b4dade.86af454","type":"ui_text","z":"55c1b3dc.91214c","group":"8e238b13.7c40b8","order":7,"width":0,"height":0,"name":"Telescope-Pier.txt","label":"<font size=\"+1\">Telescope PierSide :</font>","format":"{{msg.payload}}","layout":"row-spread","x":1070,"y":460,"wires":[]},{"id":"747845ec.c6ecdc","type":"inject","z":"55c1b3dc.91214c","name":"Telescope-SideOfPier","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"0","topic":"sideofpier","payload":"api/v1/telescope/0/sideofpier","payloadType":"str","x":140,"y":460,"wires":[["d65a9d4f.561a6"]]},{"id":"d65a9d4f.561a6","type":"http request","z":"55c1b3dc.91214c","name":"REST-Telescope-Pier","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.11:11111/{{{payload}}}","tls":"","persist":false,"proxy":"","authType":"","x":380,"y":460,"wires":[["46dc73ca.b7181c"]]},{"id":"46dc73ca.b7181c","type":"function","z":"55c1b3dc.91214c","name":"","func":"rc = msg.statusCode;\nif ( (rc == \"EHOSTUNREACH\") || (rc == \"ETIMEDOUT\") ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"yellow\\\">N/A</font>\";\n} else if ( rc == 400 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"yellow\\\">N/C</font>\";\n} else if ( rc == 200 ) {\n p=JSON.parse(msg.payload)\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"orange\\\">Unknown</font>\";\n if ( p.Value == 0 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"lime\\\">East</font>\";\n } else if ( p.Value == 1 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"lime\\\">West</font>\";\n }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":620,"y":460,"wires":[["5eaaeccb.f0ac34"]]},{"id":"254a5d6c.74ad12","type":"ui_text","z":"55c1b3dc.91214c","group":"8e238b13.7c40b8","order":6,"width":0,"height":0,"name":"Telescope-AtPark.txt","label":"<font size=\"+1\">Telescope Parked :</font>","format":"{{msg.payload}}","layout":"row-spread","x":1080,"y":400,"wires":[]},{"id":"a4c244f7.06b468","type":"inject","z":"55c1b3dc.91214c","name":"Telescope-AtPark","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"0","topic":"","payload":"api/v1/telescope/0/atpark","payloadType":"str","x":150,"y":400,"wires":[["8bbe44b9.8eabd8"]]},{"id":"8bbe44b9.8eabd8","type":"http request","z":"55c1b3dc.91214c","name":"REST-Telescope-park","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.11:11111/{{{payload}}}","tls":"","persist":false,"proxy":"","authType":"","x":380,"y":400,"wires":[["97de4e3d.05ce"]]},{"id":"97de4e3d.05ce","type":"function","z":"55c1b3dc.91214c","name":"","func":"rc = msg.statusCode;\nif ( (rc == \"EHOSTUNREACH\") || (rc == \"ETIMEDOUT\") ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"yellow\\\">N/A</font>\";\n} else if ( rc == 400 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"yellow\\\">N/C</font>\";\n} else if ( rc == 200 ) {\n p=JSON.parse(msg.payload)\n msg.payload=\"<font size=\\\"+2\\\" color=red>Yes</font>\";\n if ( p.Value == false ) {\n msg.payload=\"<font size=\\\"+2\\\" color=red>No</font>\";\n }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":620,"y":400,"wires":[["d8f2e7c1.6a2fa8"]]},{"id":"decb3adc.3a2c98","type":"ui_text","z":"55c1b3dc.91214c","group":"8e238b13.7c40b8","order":8,"width":0,"height":0,"name":"Telescope-Slewing.txt","label":"<font size=\"+1\">Telescope Moving :</font>","format":"{{msg.payload}}","layout":"row-spread","x":1080,"y":500,"wires":[]},{"id":"deb9fe9.65317","type":"inject","z":"55c1b3dc.91214c","name":"Telescope-Slewing","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":"0","topic":"api/v1/telescope/0/slewing","payload":"api/v1/telescope/0/slewing","payloadType":"str","x":150,"y":500,"wires":[["20eea3e8.7befdc"]]},{"id":"20eea3e8.7befdc","type":"http request","z":"55c1b3dc.91214c","name":"REST-Telescope-slew","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.11:11111/{{{payload}}}","tls":"","persist":false,"proxy":"","authType":"","x":380,"y":500,"wires":[["1e0dbe66.f31c02"]]},{"id":"1e0dbe66.f31c02","type":"function","z":"55c1b3dc.91214c","name":"","func":"rc = msg.statusCode;\nif ( (rc == \"EHOSTUNREACH\") || (rc == \"ETIMEDOUT\") ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"yellow\\\">N/A</font>\";\n} else if ( rc == 400 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"yellow\\\">N/C</font>\";\n} else if ( rc == 200 ) {\n p=JSON.parse(msg.payload)\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"lime\\\">No</font>\";\n if ( p.Value == true ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"orange\\\">Yes</font>\";\n }\n}\nreturn msg;","outputs":1,"noerr":0,"x":620,"y":500,"wires":[["2c9ad16.607962e"]]},{"id":"8364737b.8b7ea","type":"inject","z":"55c1b3dc.91214c","name":"Telescope-Tracking","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"api/v1/telescope/0/tracking","payloadType":"str","x":140,"y":540,"wires":[["f9500ac8.79c278"]]},{"id":"f9500ac8.79c278","type":"http request","z":"55c1b3dc.91214c","name":"REST-Telescope-Tracking","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.11:11111/{{{payload}}}","tls":"","persist":false,"proxy":"","authType":"","x":390,"y":540,"wires":[["1abb18c2.03fd87","e8250ec8.0808d"]]},{"id":"1abb18c2.03fd87","type":"function","z":"55c1b3dc.91214c","name":"","func":"rc = msg.statusCode;\nif ( (rc == \"EHOSTUNREACH\") || (rc == \"ETIMEDOUT\") ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"yellow\\\">N/A</font>\";\n } else if ( rc == 400 ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"yellow\\\">N/C</font>\";\n} else if ( rc == 200 ) {\n p=JSON.parse(msg.payload)\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"orange\\\">No</font>\";\n if ( p.Value == true ) {\n msg.payload=\"<font size=\\\"+2\\\" color=\\\"lime\\\">Yes</font>\";\n }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":620,"y":540,"wires":[["39c4f7cc.120e68"]]},{"id":"42a6d543.788f6c","type":"catch","z":"55c1b3dc.91214c","name":"HostDown","scope":["d65a9d4f.561a6","8bbe44b9.8eabd8","22e9863.ffba67a","20eea3e8.7befdc","f9500ac8.79c278"],"uncaught":false,"x":320,"y":320,"wires":[["e50f9d17.12517"]]},{"id":"e50f9d17.12517","type":"debug","z":"55c1b3dc.91214c","name":"","active":true,"tosidebar":false,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":490,"y":320,"wires":[]},{"id":"39c4f7cc.120e68","type":"rbe","z":"55c1b3dc.91214c","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":830,"y":540,"wires":[["eca3b1c1.d4af6"]]},{"id":"2c9ad16.607962e","type":"rbe","z":"55c1b3dc.91214c","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":830,"y":500,"wires":[["decb3adc.3a2c98"]]},{"id":"5eaaeccb.f0ac34","type":"rbe","z":"55c1b3dc.91214c","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":830,"y":460,"wires":[["5b4dade.86af454"]]},{"id":"d8f2e7c1.6a2fa8","type":"rbe","z":"55c1b3dc.91214c","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":830,"y":400,"wires":[["254a5d6c.74ad12"]]},{"id":"aaae4426.efadf","type":"function","z":"26dd1538.7f65ca","name":"","func":"var x= msg.payload[0].value\nmsg.payload =x.toString()\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":780,"y":1560,"wires":[["292623d1.1a6adc"]]},{"id":"90f5eb8.f61d018","type":"comment","z":"7fa6be5b.eea368","name":"","info":"* When power of depend on UPS\n* When no internet \n* When raining, solo <= 4300\nWhen windy\nWhen cloudy for x minutes\n\n\n\n\n\n\n\nclose roof then \n park telescope switch of equipment.\n","x":160,"y":80,"wires":[]},{"id":"19e735e5.72fb2a","type":"link out","z":"7fa6be5b.eea368","name":"Watchdog-close-roof","links":["7bb68b00.56ea2c","fb89db86.454028"],"x":1215,"y":300,"wires":[]},{"id":"27ddda0e.ad3bc6","type":"ping","z":"7fa6be5b.eea368","mode":"timed","name":"internet 8.8.8.8","host":"8.8.8.8","timer":"60","inputs":0,"x":180,"y":240,"wires":[["8d157863.d0261","15fe46d7.4a2cd9","fab1a91f.8d82f"]]},{"id":"8d157863.d0261","type":"ui_text","z":"7fa6be5b.eea368","group":"cf41b0a7.a0c09","order":2,"width":4,"height":1,"name":"","label":"INTERNET:","format":"<font color=orange > {{msg.payload}} </font>","layout":"row-left","x":410,"y":200,"wires":[]},{"id":"7bb68b00.56ea2c","type":"link in","z":"26dd1538.7f65ca","name":"Activate-CloseRoof","links":["19e735e5.72fb2a"],"x":115,"y":480,"wires":[["2ebadc26.ae0774"]]},{"id":"f87a0302.77beb8","type":"ping","z":"7fa6be5b.eea368","mode":"timed","name":"power check","host":"192.168.1.12","timer":"60","inputs":0,"x":170,"y":300,"wires":[["821d86fc.eb76f8","ca35924.8b0b67"]]},{"id":"821d86fc.eb76f8","type":"switch","z":"7fa6be5b.eea368","name":"Is num ?","property":"payload","propertyType":"msg","rules":[{"t":"istype","v":"number","vt":"number"}],"checkall":"true","repair":false,"outputs":1,"x":400,"y":320,"wires":[["c164ba31.4e092"]]},{"id":"ca35924.8b0b67","type":"ui_text","z":"7fa6be5b.eea368","group":"cf41b0a7.a0c09","order":3,"width":4,"height":1,"name":"","label":"CDU:","format":"<font color=orange > {{msg.payload}} </font>","layout":"row-left","x":390,"y":280,"wires":[]},{"id":"c2dbe986.6f94a","type":"link out","z":"e027f61.c222088","name":"weerstation-rainvalue-out","links":["11df1131.153267"],"x":715,"y":1440,"wires":[]},{"id":"11df1131.153267","type":"link in","z":"7fa6be5b.eea368","name":"Weerstation-rainvalue-in","links":["c2dbe986.6f94a"],"x":35,"y":480,"wires":[["547fe29f.906274"]]},{"id":"547fe29f.906274","type":"switch","z":"7fa6be5b.eea368","name":"<= 4100 is raining close roof (1 Raining 2 Dry)","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Raining","vt":"str"},{"t":"eq","v":"Dry","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":260,"y":480,"wires":[["3fac146d.460474"],[]]},{"id":"4396fabe.daefac","type":"file","z":"26dd1538.7f65ca","name":"","filename":"/home/pi/ocsclose.log","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1160,"y":480,"wires":[[]]},{"id":"ac5f2ac6.7fc808","type":"function","z":"26dd1538.7f65ca","name":"Add the date & time and topic to the payload","func":"//Add the date & time to the payload\n\nvar str = msg.mydate + ',' + msg.mytime + ',Close-Roof ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":850,"y":480,"wires":[["4396fabe.daefac"]]},{"id":"c7f89381.f20d58","type":"simpletime","z":"26dd1538.7f65ca","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":550,"y":480,"wires":[["ac5f2ac6.7fc808"]]},{"id":"25743ec3.acb6d2","type":"link out","z":"e027f61.c222088","name":"Weerstation-lightvalue-out","links":["50ab142.87030ec"],"x":715,"y":1200,"wires":[]},{"id":"50ab142.87030ec","type":"link in","z":"7fa6be5b.eea368","name":"Weerstation-lightvalue-in","links":["25743ec3.acb6d2"],"x":155,"y":640,"wires":[["350bc84c.10e89"]]},{"id":"350bc84c.10e89","type":"switch","z":"7fa6be5b.eea368","name":"1 Light, 2 Dark","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"Light","vt":"str"},{"t":"eq","v":"Dark","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":300,"y":640,"wires":[["811e57b8.5df1e"],[]]},{"id":"2f965f2a.9a302","type":"comment","z":"55c1b3dc.91214c","name":"actions to do","info":"als niet connected filter error en display N/C\n\n\nPUT action","x":150,"y":360,"wires":[]},{"id":"cef8ecaf.4e7a","type":"function","z":"7fa6be5b.eea368","name":"Add the date & time and topic to the payload","func":"//Add the date & time to the payload\n\nvar str = msg.mydate + ',' + msg.mytime + ',lightsD = ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1130,"y":660,"wires":[["52d9b3d.51aac4c"]]},{"id":"d8bf7c01.95af18","type":"simpletime","z":"7fa6be5b.eea368","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":830,"y":660,"wires":[["cef8ecaf.4e7a"]]},{"id":"9b70a548.0efe78","type":"file","z":"7fa6be5b.eea368","name":"","filename":"/home/pi/ocsrain.log","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1620,"y":440,"wires":[[]]},{"id":"b5b2a841.fbcf2","type":"function","z":"7fa6be5b.eea368","name":"Add the date & time and topic to the payload","func":"//Add the date & time to the payload\n\nvar str = msg.mydate + ',' + msg.mytime + ',rainYsup = ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1130,"y":440,"wires":[["9b70a548.0efe78","f46fe97f.2ab7a"]]},{"id":"7daa3dd0.e8aa3c","type":"simpletime","z":"7fa6be5b.eea368","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":830,"y":440,"wires":[["b5b2a841.fbcf2"]]},{"id":"52d9b3d.51aac4c","type":"file","z":"7fa6be5b.eea368","name":"","filename":"/home/pi/ocslight.log","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1620,"y":640,"wires":[[]]},{"id":"1cc185de.f8b9e2","type":"function","z":"7fa6be5b.eea368","name":"Add the date & time and topic to the payload","func":"//Add the date & time to the payload\n\nvar str = msg.mydate + ',' + msg.mytime + ',Wordt licht = ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1130,"y":620,"wires":[["52d9b3d.51aac4c","f46fe97f.2ab7a"]]},{"id":"b51bd75f.fd2c08","type":"simpletime","z":"7fa6be5b.eea368","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":830,"y":620,"wires":[["1cc185de.f8b9e2"]]},{"id":"cfcc4fae.9ca","type":"inject","z":"7fa6be5b.eea368","name":"Inject","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"2","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":210,"y":1020,"wires":[["10c8a0dc.01aaa7"]]},{"id":"10c8a0dc.01aaa7","type":"switch","z":"7fa6be5b.eea368","name":"Context based routing","property":"state","propertyType":"flow","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":460,"y":1020,"wires":[["6a866b67.f7aa84"],["de92fd38.80d4d8"],["c7f8548d.3c0c18"]]},{"id":"6a866b67.f7aa84","type":"debug","z":"7fa6be5b.eea368","name":"Output 1","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":680,"y":960,"wires":[]},{"id":"de92fd38.80d4d8","type":"debug","z":"7fa6be5b.eea368","name":"Output 2","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":680,"y":1020,"wires":[]},{"id":"c7f8548d.3c0c18","type":"debug","z":"7fa6be5b.eea368","name":"Output 3","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":680,"y":1080,"wires":[]},{"id":"3dbe2c99.d4acdc","type":"inject","z":"7fa6be5b.eea368","name":"Set state 0 - turn off","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":250,"y":1170,"wires":[["83e27218.7a1c48"]]},{"id":"b2c94137.e13188","type":"inject","z":"7fa6be5b.eea368","name":"Set state 1 - send to output 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":280,"y":1215,"wires":[["83e27218.7a1c48"]]},{"id":"c075a096.ac88f8","type":"inject","z":"7fa6be5b.eea368","name":"Set state 2 - send to output 2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","x":280,"y":1260,"wires":[["83e27218.7a1c48"]]},{"id":"6ed31a8b.37e664","type":"inject","z":"7fa6be5b.eea368","name":"Set state 3 - send to output 3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":280,"y":1305,"wires":[["83e27218.7a1c48"]]},{"id":"83e27218.7a1c48","type":"change","z":"7fa6be5b.eea368","name":"Set flow.state","rules":[{"t":"set","p":"state","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":1260,"wires":[[]]},{"id":"1f727414.55e184","type":"ui_switch","z":"7fa6be5b.eea368","name":"","label":"Watchdog off/on :","tooltip":"","group":"3159effc.4f815","order":16,"width":5,"height":1,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":230,"y":1080,"wires":[["83e27218.7a1c48","c201ef.ef62961"]]},{"id":"c201ef.ef62961","type":"debug","z":"7fa6be5b.eea368","name":"onoff","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":1160,"wires":[]},{"id":"b604171c.8646e8","type":"switch","z":"7fa6be5b.eea368","name":"Context based routing","property":"state","propertyType":"flow","rules":[{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1060,"y":300,"wires":[["19e735e5.72fb2a"]]},{"id":"d3d202e6.6ad9d8","type":"http request","z":"55c1b3dc.91214c","name":"PUT-REST-Telescope-park","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.11:11111/api/v1/telescope/0/park","tls":"","persist":false,"proxy":"","authType":"","x":440,"y":600,"wires":[[]]},{"id":"4aa5d844.82e868","type":"ui_button","z":"55c1b3dc.91214c","name":"Park Telescope ","group":"8e238b13.7c40b8","order":10,"width":4,"height":1,"passthru":false,"label":"<font size=\"+1\">Park</font>","tooltip":"","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":180,"y":600,"wires":[["d3d202e6.6ad9d8"]]},{"id":"53d2589.7639228","type":"comment","z":"7fa6be5b.eea368","name":"EXample how to switch flow","info":"the flow makes only use of the turn on turn off state. But the others are still there as example","x":270,"y":960,"wires":[]},{"id":"c2cb799c.7ea218","type":"link out","z":"e027f61.c222088","name":"Weerstation-skytempvalue-out","links":["56920fbe.181b8"],"x":895,"y":240,"wires":[]},{"id":"a70e14fe.08c9a","type":"comment","z":"7fa6be5b.eea368","name":"30 seconden input weerstation","info":"","x":250,"y":440,"wires":[]},{"id":"13e93ce8.15c21b","type":"comment","z":"7fa6be5b.eea368","name":"60 seconden ping","info":"","x":190,"y":160,"wires":[]},{"id":"30e9ee62.f81dd2","type":"http request","z":"55c1b3dc.91214c","name":"put poweron","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.9:6800/api/v1/dome/0/poweron","tls":"","persist":false,"proxy":"","authType":"","x":470,"y":60,"wires":[[]]},{"id":"494b73a9.205c44","type":"ui_button","z":"55c1b3dc.91214c","name":"Ropen","group":"8e238b13.7c40b8","order":3,"width":4,"height":1,"passthru":false,"label":"<font size=\"+1\">Roof 0pen</font>","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":170,"y":180,"wires":[["2f11568d.21a302"]]},{"id":"2f11568d.21a302","type":"http request","z":"55c1b3dc.91214c","name":"","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.9:6800/api/v1/dome/0/openshutter","tls":"","persist":false,"proxy":"","authType":"","x":330,"y":180,"wires":[[]]},{"id":"582142a3.de27b4","type":"http request","z":"55c1b3dc.91214c","name":"put poweroff","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.9:6800/api/v1/dome/0/poweroff","tls":"","persist":false,"proxy":"","authType":"","x":610,"y":120,"wires":[[]]},{"id":"38580415.ca19dc","type":"ui_button","z":"55c1b3dc.91214c","name":"Rclose","group":"8e238b13.7c40b8","order":4,"width":4,"height":1,"passthru":false,"label":"<font size=\"+1\">Roof Close</font>","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":550,"y":180,"wires":[["caca5c71.1e464"]]},{"id":"caca5c71.1e464","type":"http request","z":"55c1b3dc.91214c","name":"","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.9:6800/api/v1/dome/0/closeshutter","tls":"","persist":false,"proxy":"","authType":"","x":710,"y":180,"wires":[[]]},{"id":"5c358de5.3cbf84","type":"ui_switch","z":"55c1b3dc.91214c","name":"","label":"Roof power off / on","tooltip":"","group":"8e238b13.7c40b8","order":1,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":150,"y":100,"wires":[["4e11a3fb.4d78c4","8a44c5c2.b51148"]]},{"id":"4e11a3fb.4d78c4","type":"switch","z":"55c1b3dc.91214c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":310,"y":100,"wires":[["30e9ee62.f81dd2"],["11b68e35.d8dcc2"]]},{"id":"11b68e35.d8dcc2","type":"change","z":"55c1b3dc.91214c","name":"o to 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":120,"wires":[["582142a3.de27b4"]]},{"id":"2b68f9b7.7457d6","type":"comment","z":"55c1b3dc.91214c","name":"Dome","info":"","x":150,"y":40,"wires":[]},{"id":"3ae5bc34.d7014c","type":"function","z":"26dd1538.7f65ca","name":"","func":"msg.moonPhaseNumber=100*msg.moonPhaseNumber\nreturn msg;\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":1660,"wires":[["e4ce2fc.43a12d"]]},{"id":"15fe46d7.4a2cd9","type":"switch","z":"7fa6be5b.eea368","name":"Is num ?","property":"payload","propertyType":"msg","rules":[{"t":"istype","v":"number","vt":"number"}],"checkall":"true","repair":false,"outputs":1,"x":400,"y":240,"wires":[["53106e23.359ce8"]]},{"id":"53106e23.359ce8","type":"stoptimer","z":"7fa6be5b.eea368","duration":"30","units":"Minute","payloadtype":"num","payloadval":"1","name":"","x":600,"y":240,"wires":[[],["b604171c.8646e8","61f87f10.6bd458"]]},{"id":"f46fe97f.2ab7a","type":"file","z":"7fa6be5b.eea368","name":"","filename":"/home/pi/ocsclose.log","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1620,"y":300,"wires":[[]]},{"id":"17cc9196.40d896","type":"function","z":"7fa6be5b.eea368","name":"Add the date & time and topic to the payload","func":"//Add the date & time to the payload\n\nvar str = msg.mydate + ',' + msg.mytime + ',internet = timer expired' + msg.payload;\nmsg.payload = str;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1130,"y":220,"wires":[["f46fe97f.2ab7a"]]},{"id":"61f87f10.6bd458","type":"simpletime","z":"7fa6be5b.eea368","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":850,"y":220,"wires":[["17cc9196.40d896"]]},{"id":"56c400a.5daeb","type":"function","z":"7fa6be5b.eea368","name":"Add the date & time and topic to the payload","func":"//Add the date & time to the payload\n\nvar str = msg.mydate + ',' + msg.mytime + ',rainNsup = ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1130,"y":500,"wires":[["9b70a548.0efe78"]]},{"id":"9cdb2ee8.1e2258","type":"simpletime","z":"7fa6be5b.eea368","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":830,"y":500,"wires":[["56c400a.5daeb"]]},{"id":"8a44c5c2.b51148","type":"function","z":"55c1b3dc.91214c","name":"Color function","func":"switch (msg.payload) {\n\ncase 1 : \n msg.color = \"Green\";\n msg.payload = \"Aan\";\n break;\n \ncase 0 : \n msg.color = \"Red\";\n msg.payload = \"Uit\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":20,"wires":[["336a8046.93942"]]},{"id":"336a8046.93942","type":"ui_text","z":"55c1b3dc.91214c","group":"8e238b13.7c40b8","order":2,"width":3,"height":1,"name":"Dak Power Status","label":"STATUS :","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":750,"y":20,"wires":[]},{"id":"6d00b080.b36c28","type":"comment","z":"7fa6be5b.eea368","name":"","info":"https://www.reddit.com/r/nodered/comments/gwk9ba/run_an_internet_connection_test_do_x_if_down_for/\n\n\nUse a ping node followed by a switch node configured to test msg.payload is of type number. Then feed that into stop timer.\n\nIf the ping target is successful, the switch outputs the number which will reset stop timer. If it's unsuccessful, the switch outputs nothing which allows stop timer to expire from which you can initiate some action.\n\nYou can feed as many ping targets as you like into stop timer, if any are successful, it keeps resetting the timer. If all fail, it will time out.\n\nExample with one ping target:\n\n[{\"id\":\"915b1787.631b78\",\"type\":\"ping\",\"z\":\"caf5abd4.ad10f8\",\"name\":\"Ping Google DNS\",\"host\":\"8.8.8.8\",\"timer\":\"300\",\"inputs\":0,\"x\":100,\"y\":600,\"wires\":[[\"309e157d.8b7eda\",\"537e5e36.30da7\",\"a5f8e476.e2fb08\"]]},{\"id\":\"537e5e36.30da7\",\"type\":\"switch\",\"z\":\"caf5abd4.ad10f8\",\"name\":\"Is num ?\",\"property\":\"payload\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"istype\",\"v\":\"number\",\"vt\":\"number\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":1,\"x\":280,\"y\":600,\"wires\":[[\"9b02ebac.f4a2f8\"]]},{\"id\":\"9b02ebac.f4a2f8\",\"type\":\"stoptimer\",\"z\":\"caf5abd4.ad10f8\",\"duration\":\"30\",\"units\":\"Minute\",\"payloadtype\":\"str\",\"payloadval\":\"Internet reset\",\"name\":\"\",\"x\":460,\"y\":600,\"wires\":[[\"a62090cc.e1654\",\"c98b95d4.a11008\"],[\"d7e4ac3c.5fb57\",\"377351bb.b2ee3e\"]]}]","x":580,"y":200,"wires":[]},{"id":"c164ba31.4e092","type":"stoptimer","z":"7fa6be5b.eea368","duration":"2","units":"Minute","payloadtype":"num","payloadval":"1","name":"","x":600,"y":320,"wires":[[],[]]},{"id":"9fbecfea.7c101","type":"mqtt out","z":"e027f61.c222088","name":"/solo/skytemp - schoener","topic":"/solo/skytemp","qos":"","retain":"","broker":"5a49a4a5.adfac4","x":810,"y":280,"wires":[]},{"id":"c4e24fd3.527fb","type":"mqtt out","z":"e027f61.c222088","name":"/solo/windspeed schoener","topic":"/solo/windspeed","qos":"","retain":"","broker":"5a49a4a5.adfac4","x":820,"y":560,"wires":[]},{"id":"7fc09943.70e9e","type":"mqtt out","z":"e027f61.c222088","name":"/solo/temperature schoener","topic":"/solo/temperature","qos":"","retain":"","broker":"5a49a4a5.adfac4","x":820,"y":380,"wires":[]},{"id":"292623d1.1a6adc","type":"mqtt out","z":"26dd1538.7f65ca","name":"/sterrenwacht/monitoring/cdu/power schoener","topic":"/sterrenwacht/monitoring/cdu/power","qos":"","retain":"","broker":"5a49a4a5.adfac4","x":1140,"y":1560,"wires":[]},{"id":"624ab316.f80a9c","type":"mqtt out","z":"e027f61.c222088","name":"/solo/windgust schoener","topic":"/solo/windgust","qos":"","retain":"","broker":"5a49a4a5.adfac4","x":810,"y":840,"wires":[]},{"id":"da615254.cb866","type":"change","z":"e027f61.c222088","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"Safe","fromt":"str","to":"-40","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"Unsafe","fromt":"str","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":1560,"wires":[["98b72c0a.07ca4"]]},{"id":"d9189fff.d040d8","type":"change","z":"e027f61.c222088","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"Light","fromt":"str","to":"43","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"Dark","fromt":"str","to":"-43","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":1160,"wires":[["cbf0531e.dc1968"]]},{"id":"9cb6e98.8559698","type":"ping","z":"7fa6be5b.eea368","mode":"timed","name":"PI Telescope","host":"192.168.1.10","timer":"30","inputs":0,"x":210,"y":880,"wires":[["f7cca00b.977ce8"]]},{"id":"f7cca00b.977ce8","type":"ui_text","z":"7fa6be5b.eea368","group":"cf41b0a7.a0c09","order":8,"width":4,"height":1,"name":"PI-Zuil:","label":"PI-Zuil:","format":"<font color=orange > {{msg.payload}} </font>","layout":"row-left","x":420,"y":880,"wires":[]},{"id":"c3201c68.4f208","type":"ping","z":"7fa6be5b.eea368","mode":"timed","name":"ALLSKY","host":"192.168.2.10","timer":"30","inputs":0,"x":200,"y":720,"wires":[["c2c5a7d3.58ca4"]]},{"id":"c2c5a7d3.58ca4","type":"ui_text","z":"7fa6be5b.eea368","group":"cf41b0a7.a0c09","order":4,"width":4,"height":1,"name":"ALLSKY:","label":"ALLSKY:","format":"<font color=orange > {{msg.payload}} </font>","layout":"row-left","x":420,"y":720,"wires":[]},{"id":"ce5bb06e.47e41","type":"ping","z":"7fa6be5b.eea368","mode":"timed","name":"AAG SOLO","host":"192.168.2.180","timer":"30","inputs":0,"x":210,"y":840,"wires":[["65a1470d.3f19e8"]]},{"id":"65a1470d.3f19e8","type":"ui_text","z":"7fa6be5b.eea368","group":"cf41b0a7.a0c09","order":7,"width":4,"height":1,"name":"AAG SOLO:","label":"AAG SOLO:","format":"<font color=orange > {{msg.payload}} </font>","layout":"row-left","x":430,"y":840,"wires":[]},{"id":"4e9103af.30261c","type":"ping","z":"7fa6be5b.eea368","mode":"timed","name":"","host":"192.168.2.199","timer":"60","inputs":0,"x":210,"y":780,"wires":[["613154e8.85b2ec","4df0dc67.db5974"]]},{"id":"613154e8.85b2ec","type":"ui_text","z":"7fa6be5b.eea368","group":"cf41b0a7.a0c09","order":5,"width":4,"height":1,"name":"router:","label":"router:","format":"<font color=orange > {{msg.payload}} </font>","layout":"row-left","x":410,"y":760,"wires":[]},{"id":"b93053ba.cc65e8","type":"file","z":"7fa6be5b.eea368","name":"","filename":"/home/pi/ocs.log","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1010,"y":800,"wires":[[]]},{"id":"ec63e842.2cebf","type":"function","z":"7fa6be5b.eea368","name":"Add the date & time and topic to the payload","func":"//Add the date & time to the payload\n\nvar str = msg.mydate + ',' + msg.mytime + ',AP = ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":800,"wires":[["b93053ba.cc65e8"]]},{"id":"4df0dc67.db5974","type":"simpletime","z":"7fa6be5b.eea368","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":430,"y":800,"wires":[["ec63e842.2cebf"]]},{"id":"c0b63901.48942","type":"ui_text","z":"26dd1538.7f65ca","group":"3159effc.4f815","order":3,"width":2,"height":1,"name":"","label":"","format":"{{msg.payload}}","layout":"row-spread","x":620,"y":820,"wires":[]},{"id":"811e57b8.5df1e","type":"trigger","z":"7fa6be5b.eea368","name":"Supress transients","op1":"1","op2":"Het wordt nu donker","op1type":"num","op2type":"str","duration":"135","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":610,"y":620,"wires":[["b51bd75f.fd2c08","b604171c.8646e8"],[]]},{"id":"ca20d3ab.7395b","type":"trigger","z":"7fa6be5b.eea368","name":"Supress transients","op1":"Supress Dark","op2":"Becomes Light (deze 1 senden)","op1type":"str","op2type":"str","duration":"135","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":610,"y":660,"wires":[["d8bf7c01.95af18"]]},{"id":"ac1492ce.bc52e8","type":"comment","z":"7fa6be5b.eea368","name":"","info":"If Light Close Roof and Park Telelescope","x":200,"y":600,"wires":[]},{"id":"e883a541.d1ec4","type":"inject","z":"7fa6be5b.eea368","name":"Set state 0 - turn on","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":250,"y":1120,"wires":[["83e27218.7a1c48"]]},{"id":"96c90523.dbccb","type":"file","z":"7fa6be5b.eea368","name":"","filename":"/home/pi/internet.log","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1620,"y":160,"wires":[[]]},{"id":"f65f6e39.d303b","type":"function","z":"7fa6be5b.eea368","name":"Add the date & time and topic to the payload","func":"//Add the date & time to the payload\n\nvar str = msg.mydate + ',' + msg.mytime + ',internet = ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1130,"y":160,"wires":[["96c90523.dbccb"]]},{"id":"eaf026b1.035698","type":"simpletime","z":"7fa6be5b.eea368","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":850,"y":160,"wires":[["f65f6e39.d303b"]]},{"id":"fab1a91f.8d82f","type":"switch","z":"7fa6be5b.eea368","name":"","property":"payload","propertyType":"msg","rules":[{"t":"false"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":160,"wires":[["eaf026b1.035698"]]},{"id":"c195d802.310bf","type":"comment","z":"aa2ca52d.dec508","name":"","info":"los gekoppel ivm met te snellen schakel pulse waar door de telescoop in stress gaat","x":530,"y":720,"wires":[]},{"id":"7c2e0ed9.1895d","type":"debug","z":"e027f61.c222088","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":380,"y":120,"wires":[]},{"id":"3fac146d.460474","type":"trigger","z":"7fa6be5b.eea368","name":"Supress transients","op1":"1","op2":"Supress Transite Rain extent delay completed","op1type":"num","op2type":"str","duration":"135","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":610,"y":440,"wires":[["7daa3dd0.e8aa3c","b604171c.8646e8"],[]]},{"id":"14227e5a.664792","type":"trigger","z":"7fa6be5b.eea368","name":"Supress transients","op1":"Supress transients \"its dry no action\"","op2":"Suppressed dry finished","op1type":"str","op2type":"str","duration":"135","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":610,"y":500,"wires":[["9cdb2ee8.1e2258"]]},{"id":"afa0c80b.d5b6a8","type":"function","z":"7fa6be5b.eea368","name":"Add the date & time and topic to the payload","func":"//Add the date & time to the payload\n\nvar str = msg.mydate + ',' + msg.mytime + ',rainY = ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":770,"y":1480,"wires":[[]]},{"id":"db8ffd69.093598","type":"simpletime","z":"7fa6be5b.eea368","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":230,"y":1480,"wires":[["afa0c80b.d5b6a8"]]},{"id":"2f38b346.ce934c","type":"function","z":"7fa6be5b.eea368","name":"Add the date & time and topic to the payload","func":"//Add the date & time to the payload\n\nvar str = msg.mydate + ',' + msg.mytime + ',rainN = ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":770,"y":1540,"wires":[[]]},{"id":"c2181573.0e9e8","type":"simpletime","z":"7fa6be5b.eea368","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":230,"y":1540,"wires":[["2f38b346.ce934c"]]},{"id":"e8250ec8.0808d","type":"debug","z":"55c1b3dc.91214c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":740,"y":620,"wires":[]},{"id":"41621168.9078f8","type":"comment","z":"55c1b3dc.91214c","name":"","info":"\"Error: connect EHOSTUNREACH 192.168.1.11:11111 : http://192.168.1.11:11111/api/v1/telescope/0/tracking\"","x":700,"y":580,"wires":[]},{"id":"54a887ec.0f59a","type":"ui_button","z":"55c1b3dc.91214c","name":"UnPark Telescope","group":"8e238b13.7c40b8","order":11,"width":4,"height":1,"passthru":false,"label":"<font size=\"+1\">UnPark</font>","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":190,"y":660,"wires":[["a91b65fa.a077a8"]]},{"id":"a91b65fa.a077a8","type":"http request","z":"55c1b3dc.91214c","name":"PUT-REST-Telescope-UnPark","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.11:11111/api/v1/telescope/0/unpark","tls":"","persist":false,"proxy":"","authType":"","x":450,"y":660,"wires":[[]]},{"id":"e012f7c8.b7d","type":"http request","z":"55c1b3dc.91214c","name":"PUT-REST-Telescope-Tracking-On","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.11:11111/api/v1/telescope/0/tracking -d \"Tracking=true&ClientID=&ClientTransactionID=\"","tls":"","persist":false,"proxy":"","authType":"","x":460,"y":720,"wires":[[]]},{"id":"f5a3c532.defcf","type":"http request","z":"55c1b3dc.91214c","name":"PUT-REST-Telescope-Tracking-Off","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.11:11111/api/v1/telescope/0/tracking=false","tls":"","persist":false,"proxy":"","authType":"","x":460,"y":780,"wires":[[]]},{"id":"8f2b600a.afa79","type":"ui_button","z":"55c1b3dc.91214c","name":"Tracking-On","group":"8e238b13.7c40b8","order":12,"width":4,"height":1,"passthru":false,"label":"<font size=\"+1\">Tracking-On</font>","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":170,"y":720,"wires":[["e012f7c8.b7d"]]},{"id":"87d7f837.edcee","type":"ui_button","z":"55c1b3dc.91214c","name":"Tracking-Off","group":"8e238b13.7c40b8","order":13,"width":4,"height":1,"passthru":false,"label":"<font size=\"+1\">Tracking-Off</font>","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":170,"y":780,"wires":[["f5a3c532.defcf"]]},{"id":"4162b8d3.6fadb8","type":"ui_button","z":"55c1b3dc.91214c","name":"Goto ZeroPosition","group":"8e238b13.7c40b8","order":14,"width":0,"height":0,"passthru":false,"label":"<font size=\"+1\">Goto ZeroPosition</font>","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":190,"y":840,"wires":[["8932f8e.c5c8888"]]},{"id":"8932f8e.c5c8888","type":"http request","z":"55c1b3dc.91214c","name":"","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.11:11111/api/v1/telescope/0/slewtocoordinates -d \"RightAscension=0&Declination=90\"","tls":"","persist":false,"proxy":"","authType":"","x":390,"y":840,"wires":[[]]}]