UnborN, By this the flow and yes I have trigger how long it takes to open or close the roof
Molesworth x matters because that is the closing pulse. He mate did you see neowise comet. yes, I am lucky. I live with Schiphol airport in the garden. so now can place my telescope on the darkest place of the Netherlands that cool
Colin thanks for sharing the sample code. I was thinking about the join bust still try to figure out. I think i struggling also with the knowledge of the topic. can you look in the flow see what wrong
thanks in advanced
Chris
[{"id":"215a3733.57e8","type":"tab","label":"DeSterrenwacht","disabled":false,"info":""},{"id":"32e3ec6b.89a654","type":"rpi-gpio out","z":"215a3733.57e8","name":"GPIO(12) - Dak Open Pulse","pin":"12","set":true,"level":"0","freq":"","out":"out","x":1020,"y":200,"wires":[]},{"id":"47f3a08.949c4e","type":"trigger","z":"215a3733.57e8","op1":"1","op2":"0","op1type":"num","op2type":"num","duration":"10","extend":false,"units":"s","reset":"","bytopic":"topic","name":"Open Pulse (1 time then send 0)","x":730,"y":200,"wires":[["32e3ec6b.89a654"]]},{"id":"a292dc8f.ae2c38","type":"rpi-gpio in","z":"215a3733.57e8","name":"LesveDome Relay (Close) (13)","pin":"13","intype":"down","debounce":"25","read":true,"x":140,"y":380,"wires":[["97526d86.ab7b5"]]},{"id":"a0b0b2b8.abe5b8","type":"rpi-gpio in","z":"215a3733.57e8","name":"Limit Switch - Dak is Dicht (24)","pin":"24","intype":"up","debounce":"25","read":true,"x":150,"y":800,"wires":[["c870dd33.c6d758"]]},{"id":"b59df9f7.f90da","type":"rpi-gpio in","z":"215a3733.57e8","name":"Limit Switch - Dak is Open (26)","pin":"26","intype":"up","debounce":"25","read":true,"x":150,"y":860,"wires":[["7c2dc368.312894"]]},{"id":"b7e3a04d.6f76a8","type":"rpi-gpio in","z":"215a3733.57e8","name":"LesveDome Relay (22)","pin":"22","intype":"down","debounce":"25","read":true,"x":120,"y":260,"wires":[["9425dc48.21bba"]]},{"id":"90b3a5a9.0f1f38","type":"rpi-gpio in","z":"215a3733.57e8","name":"Limit Switch - Telescope Parked?","pin":"32","intype":"up","debounce":"25","read":true,"x":150,"y":920,"wires":[["12fbc9b5.ffee6e"]]},{"id":"634de6cd.603f4","type":"ui_text","z":"215a3733.57e8","group":"4c032911.729c6","order":9,"width":2,"height":1,"name":"Dak Status Limit Switch:","label":"Status:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":710,"y":820,"wires":[],"inputLabels":["2"]},{"id":"c870dd33.c6d758","type":"function","z":"215a3733.57e8","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase 0 : \n msg.color = \"Green\";\n msg.payload = \"Dicht\";\n break;\n \ncase 2 : \n msg.color = \"Red\";\n msg.payload = \"Open\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":800,"wires":[["634de6cd.603f4"]]},{"id":"18cc5be.0af1a24","type":"ui_switch","z":"215a3733.57e8","name":"","label":"12V","tooltip":"","group":"4c032911.729c6","order":15,"width":4,"height":1,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":70,"y":1080,"wires":[["29ad7a51.2a269e","315ab6f3.d66c82"]]},{"id":"9e4c6b6a.8c222","type":"ui_switch","z":"215a3733.57e8","name":"","label":"Mount","tooltip":"","group":"4c032911.729c6","order":18,"width":4,"height":1,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":70,"y":1200,"wires":[["3fc6b020.f3f408","9ee84ee5.ca93e"]]},{"id":"83a964d1.0b957","type":"ui_switch","z":"215a3733.57e8","name":"Power PC (220V)","label":"Power PC (220V)","tooltip":"","group":"4c032911.729c6","order":21,"width":4,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":110,"y":1320,"wires":[["6e53b922.8eb64","ef192b37.8aa2e"]]},{"id":"27df4a0a.571f86","type":"ui_switch","z":"215a3733.57e8","name":"","label":"OnFocus","tooltip":"","group":"4c032911.729c6","order":24,"width":4,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":80,"y":1420,"wires":[["3dadb3c0.eac874","bc5311d5.87c3b"]]},{"id":"4ba80116.02e3e","type":"ui_switch","z":"215a3733.57e8","name":"Flat Screen","label":"Flat Screen","tooltip":"","group":"4c032911.729c6","order":30,"width":4,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":90,"y":1540,"wires":[["3a65209c.d37f6","ba5e4716.036008"]]},{"id":"29ad7a51.2a269e","type":"function","z":"215a3733.57e8","name":"Color Mapping","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,"x":320,"y":1080,"wires":[["1a11b79a.587048"]]},{"id":"3fc6b020.f3f408","type":"function","z":"215a3733.57e8","name":"Color Mapping","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,"x":320,"y":1200,"wires":[["494b5a32.8b9cfc"]]},{"id":"6e53b922.8eb64","type":"function","z":"215a3733.57e8","name":"Color Mapping","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,"x":320,"y":1320,"wires":[["390a6e63.5329ea"]]},{"id":"3dadb3c0.eac874","type":"function","z":"215a3733.57e8","name":"Color Mapping","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,"x":320,"y":1420,"wires":[["56bb4f35.aa4c08"]]},{"id":"3a65209c.d37f6","type":"function","z":"215a3733.57e8","name":"Color Mapping","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,"x":320,"y":1540,"wires":[["6b35652d.109384"]]},{"id":"1a11b79a.587048","type":"ui_text","z":"215a3733.57e8","group":"4c032911.729c6","order":16,"width":2,"height":1,"name":"12V Status","label":"Status:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":570,"y":1080,"wires":[]},{"id":"494b5a32.8b9cfc","type":"ui_text","z":"215a3733.57e8","group":"4c032911.729c6","order":19,"width":2,"height":1,"name":"Mount Status","label":"Status:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":580,"y":1200,"wires":[]},{"id":"390a6e63.5329ea","type":"ui_text","z":"215a3733.57e8","group":"4c032911.729c6","order":22,"width":2,"height":1,"name":"Power PC (220V)","label":"Status:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":590,"y":1320,"wires":[]},{"id":"56bb4f35.aa4c08","type":"ui_text","z":"215a3733.57e8","group":"4c032911.729c6","order":25,"width":2,"height":1,"name":"OnFocus","label":"Status:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":560,"y":1420,"wires":[]},{"id":"6b35652d.109384","type":"ui_text","z":"215a3733.57e8","group":"4c032911.729c6","order":31,"width":2,"height":1,"name":"Flat","label":"Status:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":550,"y":1540,"wires":[]},{"id":"315ab6f3.d66c82","type":"rpi-gpio out","z":"215a3733.57e8","name":"PIN 10","pin":"19","set":true,"level":"0","freq":"","out":"out","x":530,"y":1000,"wires":[]},{"id":"9ee84ee5.ca93e","type":"rpi-gpio out","z":"215a3733.57e8","name":"PIN 11","pin":"21","set":true,"level":"0","freq":"","out":"out","x":550,"y":1160,"wires":[]},{"id":"ef192b37.8aa2e","type":"rpi-gpio out","z":"215a3733.57e8","name":"PIN 19","pin":"37","set":true,"level":"0","freq":"","out":"out","x":550,"y":1280,"wires":[]},{"id":"bc5311d5.87c3b","type":"rpi-gpio out","z":"215a3733.57e8","name":"","pin":"11","set":true,"level":"0","freq":"","out":"out","x":560,"y":1380,"wires":[]},{"id":"ba5e4716.036008","type":"rpi-gpio out","z":"215a3733.57e8","name":"","pin":"15","set":true,"level":"0","freq":"","out":"out","x":560,"y":1480,"wires":[]},{"id":"22b4b9c9.5f1d36","type":"ui_switch","z":"215a3733.57e8","name":"Canon 40d","label":"Canon 40d","tooltip":"","group":"4c032911.729c6","order":27,"width":4,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":90,"y":1620,"wires":[["9ff84f53.88b03","f92c77e7.779df8"]]},{"id":"df1a9e09.24222","type":"ui_switch","z":"215a3733.57e8","name":"Power Dak","label":"Power Dak","tooltip":"","group":"4c032911.729c6","order":1,"width":4,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":90,"y":1720,"wires":[["bed82094.0ad898","ff016a48.efb328"]]},{"id":"9ff84f53.88b03","type":"rpi-gpio out","z":"215a3733.57e8","name":"","pin":"33","set":true,"level":"0","freq":"","out":"out","x":560,"y":1580,"wires":[]},{"id":"bed82094.0ad898","type":"rpi-gpio out","z":"215a3733.57e8","name":"","pin":"35","set":true,"level":"0","freq":"","out":"out","x":560,"y":1660,"wires":[]},{"id":"f92c77e7.779df8","type":"function","z":"215a3733.57e8","name":"Color Mapping","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,"x":320,"y":1620,"wires":[["12573220.9338b6"]]},{"id":"ff016a48.efb328","type":"function","z":"215a3733.57e8","name":"Color Mappings","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,"x":340,"y":1720,"wires":[["37097c2d.45e5bc"]]},{"id":"12573220.9338b6","type":"ui_text","z":"215a3733.57e8","group":"4c032911.729c6","order":28,"width":2,"height":1,"name":"40d","label":"Status:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":550,"y":1620,"wires":[]},{"id":"37097c2d.45e5bc","type":"ui_text","z":"215a3733.57e8","group":"4c032911.729c6","order":2,"width":2,"height":1,"name":"","label":"Status:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":560,"y":1720,"wires":[]},{"id":"12fbc9b5.ffee6e","type":"function","z":"215a3733.57e8","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase 0 : \n msg.color = \"Green\";\n msg.payload = \"Parked\";\n break;\n \ncase 1 : \n msg.color = \"Red\";\n msg.payload = \"Not Parked\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":920,"wires":[["a5c22ef4.b2e1c8"]]},{"id":"a5c22ef4.b2e1c8","type":"ui_text","z":"215a3733.57e8","group":"4c032911.729c6","order":11,"width":4,"height":1,"name":"`Telescope Park","label":"Telescope:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":680,"y":920,"wires":[]},{"id":"7c2dc368.312894","type":"function","z":"215a3733.57e8","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase 0 : \n msg.color = \"Red\";\n msg.payload = \"Open\";\n break;\n \ncase 2 : \n msg.color = \"Green\";\n msg.payload = \"Open\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":860,"wires":[["634de6cd.603f4"]]},{"id":"fb39ba69.591768","type":"wake on lan","z":"215a3733.57e8","mac":"90-B1-1C-A4-1E-BC","host":"","udpport":9,"name":"WakeUp Obs","x":310,"y":1880,"wires":[]},{"id":"def5286.17fa458","type":"ui_button","z":"215a3733.57e8","name":"","group":"4c032911.729c6","order":4,"width":2,"height":1,"passthru":false,"label":"WakeUp PC","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":90,"y":1880,"wires":[["fb39ba69.591768","9eb92ebf.83b5c8"]]},{"id":"8e6ad9f9.da356","type":"ui_button","z":"215a3733.57e8","name":"","group":"4c032911.729c6","order":6,"width":2,"height":1,"passthru":false,"label":"Opening Roof","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":120,"y":200,"wires":[["47f3a08.949c4e"]]},{"id":"5b9d83ab.0b72d4","type":"ui_button","z":"215a3733.57e8","name":"","group":"4c032911.729c6","order":7,"width":2,"height":1,"passthru":false,"label":"Closing Roof","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":130,"y":420,"wires":[["94ffacc9.0e1448"]]},{"id":"fa37b129.456d5","type":"rpi-gpio out","z":"215a3733.57e8","name":"GPIO(38) - Dak Dicht Pulse","pin":"38","set":true,"level":"0","freq":"","out":"out","x":1040,"y":420,"wires":[]},{"id":"94ffacc9.0e1448","type":"trigger","z":"215a3733.57e8","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"10","extend":false,"units":"s","reset":"","bytopic":"topic","name":"Clossing Pulse (1 time then send 0)","x":720,"y":420,"wires":[["fa37b129.456d5"]]},{"id":"9eb92ebf.83b5c8","type":"trigger","z":"215a3733.57e8","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"250","extend":false,"units":"ms","reset":"","bytopic":"topic","name":"","x":320,"y":1840,"wires":[["bb095c96.9bb328"]]},{"id":"bb095c96.9bb328","type":"function","z":"215a3733.57e8","name":"delay to start","func":"switch (msg.payload) {\n\ncase 1 : \n msg.color = \"Green\";\n msg.payload = \"Wait Starting PC\";\n break;\n \ncase 0 : \n msg.color = \"Red\";\n msg.payload = \"PC is on\";\n break;\n \ndefault : \n msg.color = \"Gray\";\n msg.payload = \"not set\";\n break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":1840,"wires":[["ef38847b.e1e888"]]},{"id":"ef38847b.e1e888","type":"ui_text","z":"215a3733.57e8","group":"4c032911.729c6","order":37,"width":0,"height":0,"name":"","label":"status:","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-left","x":670,"y":1840,"wires":[]},{"id":"9425dc48.21bba","type":"change","z":"215a3733.57e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":260,"wires":[["e059ff9d.30ebf"]]},{"id":"97526d86.ab7b5","type":"change","z":"215a3733.57e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":380,"wires":[["e059ff9d.30ebf"]]},{"id":"e059ff9d.30ebf","type":"join","z":"215a3733.57e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":550,"y":320,"wires":[["c9f478.8905f388"]]},{"id":"c9f478.8905f388","type":"function","z":"215a3733.57e8","name":"If statement","func":"let gpioa = 0\nlet gpiob = 0\nif (msg.payload.gpiox == 1 && msg.payload.gpioy == 1) {\n node.send([{payload: 1},{payload: 0}])\n} else if (msg.payload.gpiox == 1 && msg.payload.gpioy === 0) {\n node.send([{payload: 0},{payload: 1}])\n} else {\n // illegal combination, so do nothing\n}\nreturn \nreturn msg;","outputs":1,"noerr":0,"x":690,"y":320,"wires":[["47f3a08.949c4e","94ffacc9.0e1448"]]},{"id":"4c032911.729c6","type":"ui_group","z":"","name":"Schakelaars","tab":"f4f3f5b4.649508","order":1,"disp":true,"width":8,"collapse":true},{"id":"f4f3f5b4.649508","type":"ui_tab","z":"","name":"DeSterrenWacht","icon":"dashboard","disabled":false,"hidden":false}]