Der Code passte nicht mehr
[{"id":"cb5f48f44725f232","type":"tab","label":"ExterneSchalter","disabled":false,"info":"","env":[]},{"id":"ea293678b60f7ec7","type":"link out","z":"cb5f48f44725f232","name":"switch connect 1","mode":"link","links":["e9ffa3ef.cde5d"],"x":665,"y":120,"wires":[]},{"id":"2674907ca540146b","type":"link out","z":"cb5f48f44725f232","name":"switch connect 4","mode":"link","links":["f14867fc.930ab8"],"x":665,"y":300,"wires":[]},{"id":"edde7283845b7ecb","type":"link out","z":"cb5f48f44725f232","name":"switch connect 5","links":["8cde3678.94ac88","1d05179e.1f1a78","1e0f28f7.6b3347","a17061ed.e682d"],"x":665,"y":340,"wires":[]},{"id":"5579abdd1f35f98b","type":"link out","z":"cb5f48f44725f232","name":"switch connect 6","links":["a45ee432.b7ef98","c9adec52.63ae6","f4303c75.d5b1c","31dcf86e.085898"],"x":665,"y":380,"wires":[]},{"id":"da76a9767fa76e3b","type":"link out","z":"cb5f48f44725f232","name":"switch connect 7","links":["e97a5ba1.09c7e8","38796905.f4b7f6","de881e69.90777","3f2d3621.ced3da"],"x":665,"y":420,"wires":[]},{"id":"da96a72d8b83cf4e","type":"link out","z":"cb5f48f44725f232","name":"switch connect 8","links":["95089e82.5785e","2840c10.f61294","f38ca7b2.7594d8","c946b435.21b198"],"x":665,"y":460,"wires":[]},{"id":"3a7e6e56b8426cd3","type":"link out","z":"cb5f48f44725f232","name":"switch connect 2","mode":"link","links":["7255f9f4.6304d8"],"x":665,"y":180,"wires":[]},{"id":"72ce8a3f13a877b0","type":"link out","z":"cb5f48f44725f232","name":"switch connect 3","mode":"link","links":["c698c6e8.416b58"],"x":665,"y":240,"wires":[]},{"id":"0e679b012a2498b9","type":"debug","z":"cb5f48f44725f232","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":490,"y":460,"wires":[]},{"id":"3a1d3e9288b183f5","type":"debug","z":"cb5f48f44725f232","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":420,"wires":[]},{"id":"999e67b773b6c908","type":"mcp23017input","z":"cb5f48f44725f232","name":"","chip":"7d707a6fc0325b8c","bitNum":"7","pullUp":true,"invert":false,"debounce":200,"onMsg":false,"offMsg":true,"x":210,"y":460,"wires":[["da96a72d8b83cf4e","0e679b012a2498b9"]]},{"id":"6b6e17c2a49e21f3","type":"mcp23017input","z":"cb5f48f44725f232","name":"","chip":"7d707a6fc0325b8c","bitNum":"6","pullUp":true,"invert":false,"debounce":200,"onMsg":false,"offMsg":true,"x":210,"y":420,"wires":[["da76a9767fa76e3b","3a1d3e9288b183f5"]]},{"id":"43e6f7a6f01a1c08","type":"debug","z":"cb5f48f44725f232","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":380,"wires":[]},{"id":"f690687a0907615b","type":"mcp23017input","z":"cb5f48f44725f232","name":"","chip":"7d707a6fc0325b8c","bitNum":"5","pullUp":true,"invert":false,"debounce":200,"onMsg":false,"offMsg":true,"x":210,"y":380,"wires":[["5579abdd1f35f98b","43e6f7a6f01a1c08"]]},{"id":"57a4f8d476396f25","type":"debug","z":"cb5f48f44725f232","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":340,"wires":[]},{"id":"45168b9c1733652a","type":"debug","z":"cb5f48f44725f232","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":300,"wires":[]},{"id":"f31782f60cc1cd59","type":"mcp23017input","z":"cb5f48f44725f232","name":"","chip":"7d707a6fc0325b8c","bitNum":"4","pullUp":true,"invert":false,"debounce":200,"onMsg":false,"offMsg":true,"x":210,"y":340,"wires":[["edde7283845b7ecb","57a4f8d476396f25"]]},{"id":"07f488cd0a69369b","type":"mcp23017input","z":"cb5f48f44725f232","name":"","chip":"7d707a6fc0325b8c","bitNum":"3","pullUp":true,"invert":false,"debounce":200,"onMsg":false,"offMsg":true,"x":220,"y":300,"wires":[["45168b9c1733652a","2674907ca540146b"]]},{"id":"75f9d6d9ec592080","type":"debug","z":"cb5f48f44725f232","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":240,"wires":[]},{"id":"712bf14eb50f3ef3","type":"debug","z":"cb5f48f44725f232","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":180,"wires":[]},{"id":"ccd48f3c83b539d8","type":"mcp23017input","z":"cb5f48f44725f232","name":"","chip":"7d707a6fc0325b8c","bitNum":"2","pullUp":true,"invert":false,"debounce":200,"onMsg":false,"offMsg":true,"x":220,"y":240,"wires":[["72ce8a3f13a877b0","75f9d6d9ec592080"]]},{"id":"ec0b070f6386b884","type":"mcp23017input","z":"cb5f48f44725f232","name":"","chip":"7d707a6fc0325b8c","bitNum":"1","pullUp":true,"invert":false,"debounce":200,"onMsg":false,"offMsg":true,"x":220,"y":180,"wires":[["712bf14eb50f3ef3","3a7e6e56b8426cd3"]]},{"id":"9b372d708ba245d7","type":"debug","z":"cb5f48f44725f232","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":120,"wires":[]},{"id":"449f9de136427704","type":"mcp23017input","z":"cb5f48f44725f232","name":"","chip":"7d707a6fc0325b8c","bitNum":"0","pullUp":true,"invert":false,"debounce":200,"onMsg":false,"offMsg":true,"x":220,"y":120,"wires":[["ea293678b60f7ec7","9b372d708ba245d7"]]},{"id":"bd32befb61d6c1c9","type":"comment","z":"cb5f48f44725f232","name":"mcp23017chip","info":"","x":210,"y":80,"wires":[]},{"id":"a9a74e13a2614e4e","type":"comment","z":"cb5f48f44725f232","name":"Achtung Pekaway verwendet die Gleiche Adresse 20","info":"","x":750,"y":80,"wires":[]},{"id":"d9af6084a0454db1","type":"mqtt out","z":"cb5f48f44725f232","name":"","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"0ddb07c65cbb68bc","x":1530,"y":680,"wires":[]},{"id":"f50d8139531f7089","type":"ui_switch","z":"cb5f48f44725f232","name":"","label":"{{Dimmname}}","tooltip":"","group":"b39a769e1a5ab2d0","order":4,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","topicType":"str","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","animate":true,"className":"","x":870,"y":680,"wires":[["07cd5a4c59219153","c622b22719356e5c","a6de0d99506da97e"]]},{"id":"39c391eb92c55d77","type":"link in","z":"cb5f48f44725f232","name":"dimmer0 value/name","links":["ee271eb64628fc0a"],"x":305,"y":600,"wires":[["64667e58c9ddc644"]]},{"id":"5ee6246f8ed4a254","type":"change","z":"cb5f48f44725f232","name":"on=global dimmer","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"\"dimmer0\"","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":600,"wires":[["6a2a9f6e0d05a6aa"]]},{"id":"6a2a9f6e0d05a6aa","type":"function","z":"cb5f48f44725f232","name":"set topic & payload","func":"msg.topic = \"pkw/cmnd/PekawayMOTA/driver15\";\nvar value = parseInt(msg.payload)*40;\n\nmsg.payload = \"pwm,0,\" + value;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1270,"y":600,"wires":[["d9af6084a0454db1"]]},{"id":"07cd5a4c59219153","type":"change","z":"cb5f48f44725f232","name":"on=global dimmer","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"\"dimmer1\"","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":680,"wires":[["5ce7cb147e3d0b03"]]},{"id":"5ce7cb147e3d0b03","type":"function","z":"cb5f48f44725f232","name":"set topic & payload","func":"msg.topic = \"pkw/cmnd/PekawayMOTA/driver15\";\nvar value = parseInt(msg.payload)*40;\n\nmsg.payload = \"pwm,1,\" + value;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1270,"y":680,"wires":[["d9af6084a0454db1"]]},{"id":"e8bcdbb5a8c1115f","type":"link in","z":"cb5f48f44725f232","name":"dimmer1 value/name","links":["c6b55fd009e69ef0"],"x":305,"y":680,"wires":[["9d6f7b66cd576232"]]},{"id":"9cc34554a258c383","type":"link in","z":"cb5f48f44725f232","name":"dimmer2 value/name","links":["325d9614f6237827"],"x":305,"y":760,"wires":[["8f965550de64f127"]]},{"id":"f653138c9b3cbe2b","type":"link in","z":"cb5f48f44725f232","name":"dimmer3 value/name","links":["31f94e298e95c2b4"],"x":305,"y":840,"wires":[["ca9d03feb97bdfbc"]]},{"id":"1376f8955ba6e1e0","type":"link in","z":"cb5f48f44725f232","name":"dimmer4 value/name","links":["9d8da021cba66085"],"x":305,"y":920,"wires":[["f9a83844e17422bc"]]},{"id":"d79673761db440f4","type":"link in","z":"cb5f48f44725f232","name":"dimmer5 value/name","links":["3b589471ad93efe2"],"x":305,"y":1000,"wires":[["2e599513c0434d6b"]]},{"id":"4bb6225a277597c9","type":"link in","z":"cb5f48f44725f232","name":"dimmer6 value/name","links":["6ce111f8c4860e01"],"x":305,"y":1080,"wires":[["0668502e608f8bd0"]]},{"id":"59d84bf44afeb5bf","type":"link in","z":"cb5f48f44725f232","name":"dimmer7 value/name","links":["fa4a585a780c2772"],"x":305,"y":1160,"wires":[["21a8e71ad55a68b8"]]},{"id":"5c27aee58f56ce6d","type":"ui_switch","z":"cb5f48f44725f232","name":"","label":"{{Dimmname}}","tooltip":"","group":"b39a769e1a5ab2d0","order":6,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","topicType":"str","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","animate":true,"className":"","x":870,"y":760,"wires":[["c28d50fab0225f06","c622b22719356e5c","21e9ef7430aee699"]]},{"id":"b404e169f4078976","type":"ui_switch","z":"cb5f48f44725f232","name":"","label":"{{Dimmname}}","tooltip":"","group":"b39a769e1a5ab2d0","order":8,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","topicType":"str","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","animate":true,"className":"","x":870,"y":840,"wires":[["435a60704973aaec","c622b22719356e5c","38b9cf440622088b"]]},{"id":"e1b68b892bf16c77","type":"ui_switch","z":"cb5f48f44725f232","name":"","label":"{{Dimmname}}","tooltip":"","group":"b39a769e1a5ab2d0","order":10,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","topicType":"str","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","animate":true,"className":"","x":870,"y":920,"wires":[["9005d5b8312165fd","c622b22719356e5c","b9e099d398477262"]]},{"id":"09eab325530d7a1c","type":"ui_switch","z":"cb5f48f44725f232","name":"","label":"{{Dimmname}}","tooltip":"","group":"b39a769e1a5ab2d0","order":12,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","topicType":"str","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","animate":true,"className":"","x":870,"y":1000,"wires":[["b396ae2905870e4c","c622b22719356e5c","8f91c45a65d44107"]]},{"id":"cf160e500d124906","type":"ui_switch","z":"cb5f48f44725f232","name":"","label":"{{Dimmname}}","tooltip":"","group":"b39a769e1a5ab2d0","order":14,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","topicType":"str","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","animate":true,"className":"","x":870,"y":1080,"wires":[["8fdd6b97de81c144","c622b22719356e5c","6962ab70812067e9"]]},{"id":"8be7759755ab5498","type":"ui_switch","z":"cb5f48f44725f232","name":"","label":"{{Dimmname}}","tooltip":"","group":"b39a769e1a5ab2d0","order":16,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","topicType":"str","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","animate":true,"className":"","x":870,"y":1160,"wires":[["f195d5cc86667539","c622b22719356e5c","15180c374d4c0430"]]},{"id":"c28d50fab0225f06","type":"change","z":"cb5f48f44725f232","name":"on=global dimmer","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"\"dimmer2\"","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":760,"wires":[["0454156606c27d05"]]},{"id":"0454156606c27d05","type":"function","z":"cb5f48f44725f232","name":"set topic & payload","func":"msg.topic = \"pkw/cmnd/PekawayMOTA/driver15\";\nvar value = parseInt(msg.payload)*40;\n\nmsg.payload = \"pwm,2,\" + value;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1270,"y":760,"wires":[["d9af6084a0454db1"]]},{"id":"435a60704973aaec","type":"change","z":"cb5f48f44725f232","name":"on=global dimmer","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"\"dimmer3\"","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":840,"wires":[["0e4bb57c8378b90b"]]},{"id":"0e4bb57c8378b90b","type":"function","z":"cb5f48f44725f232","name":"set topic & payload","func":"msg.topic = \"pkw/cmnd/PekawayMOTA/driver15\";\nvar value = parseInt(msg.payload)*40;\n\nmsg.payload = \"pwm,3,\" + value;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1270,"y":840,"wires":[["d9af6084a0454db1"]]},{"id":"9005d5b8312165fd","type":"change","z":"cb5f48f44725f232","name":"on=global dimmer","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"\"dimmer4\"","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":920,"wires":[["5267c7bec312db58"]]},{"id":"5267c7bec312db58","type":"function","z":"cb5f48f44725f232","name":"set topic & payload","func":"msg.topic = \"pkw/cmnd/PekawayMOTA/driver15\";\nvar value = parseInt(msg.payload)*40;\n\nmsg.payload = \"pwm,4,\" + value;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1270,"y":920,"wires":[["d9af6084a0454db1"]]},{"id":"b396ae2905870e4c","type":"change","z":"cb5f48f44725f232","name":"on=global dimmer","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"\"dimmer5\"","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":1000,"wires":[["977168a8e183a713"]]},{"id":"977168a8e183a713","type":"function","z":"cb5f48f44725f232","name":"set topic & payload","func":"msg.topic = \"pkw/cmnd/PekawayMOTA/driver15\";\nvar value = parseInt(msg.payload)*40;\n\nmsg.payload = \"pwm,5,\" + value;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1270,"y":1000,"wires":[["d9af6084a0454db1"]]},{"id":"8fdd6b97de81c144","type":"change","z":"cb5f48f44725f232","name":"on=global dimmer","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"\"dimmer6\"","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":1080,"wires":[["af90f0f35da3a1ba"]]},{"id":"af90f0f35da3a1ba","type":"function","z":"cb5f48f44725f232","name":"set topic & payload","func":"msg.topic = \"pkw/cmnd/PekawayMOTA/driver15\";\nvar value = parseInt(msg.payload)*40;\n\nmsg.payload = \"pwm,6,\" + value;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1270,"y":1080,"wires":[["d9af6084a0454db1"]]},{"id":"f195d5cc86667539","type":"change","z":"cb5f48f44725f232","name":"on=global dimmer","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"\"dimmer7\"","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":1160,"wires":[["f8327e1c45eb288e"]]},{"id":"f8327e1c45eb288e","type":"function","z":"cb5f48f44725f232","name":"set topic & payload","func":"msg.topic = \"pkw/cmnd/PekawayMOTA/driver15\";\nvar value = parseInt(msg.payload)*40;\n\nmsg.payload = \"pwm,7,\" + value;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1270,"y":1160,"wires":[["d9af6084a0454db1"]]},{"id":"bc6e4874c450ef34","type":"ui_switch","z":"cb5f48f44725f232","name":"","label":"{{Dimmname}}","tooltip":"","group":"b39a769e1a5ab2d0","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","topicType":"str","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","animate":true,"className":"","x":870,"y":600,"wires":[["c622b22719356e5c","5ee6246f8ed4a254","bc3034f50653dfb7"]]},{"id":"64667e58c9ddc644","type":"function","z":"cb5f48f44725f232","name":"","func":"msg.Dimmname = global.get(\"Ndimmer0\");\nvar check = global.get(\"dimmone\");\nmsg.payload = check;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":600,"wires":[["bc6e4874c450ef34"]]},{"id":"c622b22719356e5c","type":"function","z":"cb5f48f44725f232","name":"save relay status","func":"var check2 = flow.get(\"Rupdate\");\n\n\nif (check2 != true)\n{\n\nmsg.payload = { \"dimmone\":global.get(\"dimmone\"),\n\"dimmtwo\":global.get(\"dimmtwo\"),\n\"dimmthree\":global.get(\"dimmthree\"),\n\"dimmfour\":global.get(\"dimmfour\"),\n\"dimmfive\":global.get(\"dimmfive\"),\n\"dimmsix\":global.get(\"dimmsix\"),\n\"dimmseven\":global.get(\"dimmseven\"),\n\"dimmeight\":global.get(\"dimmeight\")\n}\nreturn msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":1240,"wires":[["0f759d2f8b678f56"]]},{"id":"0f759d2f8b678f56","type":"file","z":"cb5f48f44725f232","name":"","filename":"pekaway/SwDimmstatusload","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1310,"y":1240,"wires":[[]]},{"id":"6510e56a43ada11a","type":"function","z":"cb5f48f44725f232","name":"globalVariable set Dimmone","func":"\nvar check2 = flow.get(\"Rupdate\");\n \n\nvar check = global.get(\"dimmone\");\n\n\nif(check2 === \"on\")\n{\n return\n}\nelse\n{\nif (check === \"on\")\n { \n check= \"off\"; \n global.set(\"dimmone\", \"off\");\n \n }\n else\n {\n check = \"on\"; \n global.set(\"dimmone\", \"on\");\n }\n \nmsg.payload = check;\nreturn msg;\n}\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":580,"wires":[["bc6e4874c450ef34"]]},{"id":"9d6f7b66cd576232","type":"function","z":"cb5f48f44725f232","name":"","func":"msg.Dimmname = global.get(\"Ndimmer1\");\nvar check = global.get(\"dimmtwo\");\nmsg.payload = check;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":680,"wires":[["f50d8139531f7089"]]},{"id":"8f965550de64f127","type":"function","z":"cb5f48f44725f232","name":"","func":"msg.Dimmname = global.get(\"Ndimmer2\");\nvar check = global.get(\"dimmthree\");\nmsg.payload = check;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":760,"wires":[["5c27aee58f56ce6d"]]},{"id":"ca9d03feb97bdfbc","type":"function","z":"cb5f48f44725f232","name":"","func":"msg.Dimmname = global.get(\"Ndimmer3\");\nvar check = global.get(\"dimmfour\");\nmsg.payload = check;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":840,"wires":[["b404e169f4078976"]]},{"id":"f9a83844e17422bc","type":"function","z":"cb5f48f44725f232","name":"","func":"msg.Dimmname = global.get(\"Ndimmer4\");\nvar check = global.get(\"dimmfive\");\nmsg.payload = check;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":920,"wires":[["e1b68b892bf16c77"]]},{"id":"2e599513c0434d6b","type":"function","z":"cb5f48f44725f232","name":"","func":"msg.Dimmname = global.get(\"Ndimmer5\");\nvar check = global.get(\"dimmsix\");\nmsg.payload = check;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":1000,"wires":[["09eab325530d7a1c"]]},{"id":"0668502e608f8bd0","type":"function","z":"cb5f48f44725f232","name":"","func":"msg.Dimmname = global.get(\"Ndimmer6\");\nvar check = global.get(\"dimmseven\");\nmsg.payload = check;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":1100,"wires":[["cf160e500d124906"]]},{"id":"21a8e71ad55a68b8","type":"function","z":"cb5f48f44725f232","name":"","func":"msg.Dimmname = global.get(\"Ndimmer7\");\nvar check = global.get(\"dimmeight\");\nmsg.payload = check;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":1180,"wires":[["8be7759755ab5498"]]},{"id":"c7cdeffe5c226f37","type":"function","z":"cb5f48f44725f232","name":"globalVariable set Dimmtwo","func":"\nvar check2 = flow.get(\"Rupdate\");\n \n\nvar check = global.get(\"dimmtwo\");\n\n\nif(check2 === \"on\")\n{\n return\n}\nelse\n{\nif (check === \"on\")\n { \n check= \"off\"; \n global.set(\"dimmtwo\", \"off\");\n \n }\n else\n {\n check = \"on\"; \n global.set(\"dimmtwo\", \"on\");\n }\n \nmsg.payload = check;\nreturn msg;\n}\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":660,"wires":[["f50d8139531f7089"]]},{"id":"454b0b2c4274a51a","type":"function","z":"cb5f48f44725f232","name":"globalVariable set Dimmothree","func":"\nvar check2 = flow.get(\"Rupdate\");\n \n\nvar check = global.get(\"dimmthree\");\n\n\nif(check2 === \"on\")\n{\n return\n}\nelse\n{\nif (check === \"on\")\n { \n check= \"off\"; \n global.set(\"dimmthree\", \"off\");\n \n }\n else\n {\n check = \"on\"; \n global.set(\"dimmthree\", \"on\");\n }\n \nmsg.payload = check;\nreturn msg;\n}\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":740,"wires":[["5c27aee58f56ce6d"]]},{"id":"253b4a923f4c8cdf","type":"function","z":"cb5f48f44725f232","name":"globalVariable set Dimmfour","func":"\nvar check2 = flow.get(\"Rupdate\");\n \n\nvar check = global.get(\"dimmfour\");\n\n\nif(check2 === \"on\")\n{\n return\n}\nelse\n{\nif (check === \"on\")\n { \n check= \"off\"; \n global.set(\"dimmfour\", \"off\");\n \n }\n else\n {\n check = \"on\"; \n global.set(\"dimmfour\", \"on\");\n }\n \nmsg.payload = check;\nreturn msg;\n}\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":820,"wires":[["b404e169f4078976"]]},{"id":"928f1dde39c7932d","type":"file in","z":"cb5f48f44725f232","name":"","filename":"pekaway/SwDimmstatusload","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":390,"y":1720,"wires":[["89f5560aa6a1de5d"]]},{"id":"bc3034f50653dfb7","type":"function","z":"cb5f48f44725f232","name":"set Global","func":"global.set(\"dimmone\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1020,"y":560,"wires":[[]]},{"id":"a6de0d99506da97e","type":"function","z":"cb5f48f44725f232","name":"set Global","func":"global.set(\"dimmtwo\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1020,"y":640,"wires":[[]]},{"id":"21e9ef7430aee699","type":"function","z":"cb5f48f44725f232","name":"set Global","func":"global.set(\"dimmthree\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1020,"y":720,"wires":[[]]},{"id":"38b9cf440622088b","type":"function","z":"cb5f48f44725f232","name":"set Global","func":"global.set(\"dimmfour\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1020,"y":800,"wires":[[]]},{"id":"b9e099d398477262","type":"function","z":"cb5f48f44725f232","name":"set Global","func":"global.set(\"dimmfive\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1020,"y":880,"wires":[[]]},{"id":"8f91c45a65d44107","type":"function","z":"cb5f48f44725f232","name":"set Global","func":"global.set(\"dimmsix\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1020,"y":960,"wires":[[]]},{"id":"6962ab70812067e9","type":"function","z":"cb5f48f44725f232","name":"set Global","func":"global.set(\"dimmseven\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1020,"y":1040,"wires":[[]]},{"id":"15180c374d4c0430","type":"function","z":"cb5f48f44725f232","name":"set Global","func":"global.set(\"dimmeight\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1020,"y":1120,"wires":[[]]},{"id":"ae42518a70c05794","type":"inject","z":"cb5f48f44725f232","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"10","topic":"","payload":"","payloadType":"date","x":130,"y":1720,"wires":[["928f1dde39c7932d"]]},{"id":"89f5560aa6a1de5d","type":"debug","z":"cb5f48f44725f232","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":620,"y":1720,"wires":[]},{"id":"f32fe13c5fb7c682","type":"link in","z":"cb5f48f44725f232","name":"pekaway display dimmer","links":["8d2726e6672c69f0"],"x":355,"y":640,"wires":[["64667e58c9ddc644","21a8e71ad55a68b8","0668502e608f8bd0","2e599513c0434d6b","f9a83844e17422bc","8f965550de64f127","9d6f7b66cd576232","ca9d03feb97bdfbc"]]},{"id":"64c23e9f22719e99","type":"mqtt in","z":"cb5f48f44725f232","name":"","topic":"pkw/tele/PekawayMOTA/SENSOR","qos":"2","datatype":"auto","broker":"0ddb07c65cbb68bc","nl":false,"rap":true,"rh":0,"inputs":0,"x":240,"y":1600,"wires":[["9b301d9261b21278"]]},{"id":"d273a10da8006dd3","type":"switch","z":"cb5f48f44725f232","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"Switch1","vt":"str"},{"t":"cont","v":"Switch2","vt":"str"},{"t":"cont","v":"Switch3","vt":"str"},{"t":"cont","v":"Switch4","vt":"str"},{"t":"cont","v":"Switch5","vt":"str"},{"t":"cont","v":"Switch6","vt":"str"},{"t":"cont","v":"Switch7","vt":"str"},{"t":"cont","v":"Switch8","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":210,"y":1480,"wires":[["b58b6f962bf17bdf"],["8047109872e89e15"],["7a858dc806b4c700"],["0269c10b5500682f"],["de327356958c97d5"],["09d69c202b7e0932"],["62f6974f4050a1d3"],["43bd8c9c8588f714"]]},{"id":"9b301d9261b21278","type":"split","z":"cb5f48f44725f232","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":490,"y":1600,"wires":[["d273a10da8006dd3"]]},{"id":"b58b6f962bf17bdf","type":"switch","z":"cb5f48f44725f232","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1260,"wires":[["6510e56a43ada11a"]]},{"id":"b8c0056dc31012d3","type":"function","z":"cb5f48f44725f232","name":"globalVariable set Dimmseven","func":"\nvar check2 = flow.get(\"Rupdate\");\n \n\nvar check = global.get(\"dimmseven\");\n\n\nif(check2 === \"on\")\n{\n return\n}\nelse\n{\nif (check === \"on\")\n { \n check= \"off\"; \n global.set(\"dimmseven\", \"off\");\n \n }\n else\n {\n check = \"on\"; \n global.set(\"dimmseven\", \"on\");\n }\n \nmsg.payload = check;\nreturn msg;\n}\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":1060,"wires":[["cf160e500d124906"]]},{"id":"8047109872e89e15","type":"switch","z":"cb5f48f44725f232","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1280,"wires":[["c7cdeffe5c226f37"]]},{"id":"7a858dc806b4c700","type":"switch","z":"cb5f48f44725f232","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1300,"wires":[["454b0b2c4274a51a"]]},{"id":"0269c10b5500682f","type":"switch","z":"cb5f48f44725f232","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1320,"wires":[["253b4a923f4c8cdf"]]},{"id":"de327356958c97d5","type":"switch","z":"cb5f48f44725f232","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1340,"wires":[["bfcbd71effa3c214"]]},{"id":"09d69c202b7e0932","type":"switch","z":"cb5f48f44725f232","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1360,"wires":[["ab1b167d4685b742"]]},{"id":"62f6974f4050a1d3","type":"switch","z":"cb5f48f44725f232","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"ON","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1380,"wires":[["b8c0056dc31012d3"]]},{"id":"43bd8c9c8588f714","type":"switch","z":"cb5f48f44725f232","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"ON","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":1400,"wires":[["c83f9be83093ad6f","7e7a08b566526603"]]},{"id":"c83f9be83093ad6f","type":"debug","z":"cb5f48f44725f232","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":1400,"wires":[]},{"id":"7e7a08b566526603","type":"function","z":"cb5f48f44725f232","name":"globalVariable set dimmeight","func":"\nvar check2 = flow.get(\"Rupdate\");\n \n\nvar check = global.get(\"dimmeight\");\n\n\nif(check2 === \"on\")\n{\n return\n}\nelse\n{\nif (check === \"on\")\n { \n check= \"off\"; \n global.set(\"dimmeight\", \"off\");\n \n }\n else\n {\n check = \"on\"; \n global.set(\"dimmeight\", \"on\");\n }\n \nmsg.payload = check;\nreturn msg;\n}\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":1140,"wires":[["8be7759755ab5498"]]},{"id":"bfcbd71effa3c214","type":"function","z":"cb5f48f44725f232","name":"globalVariable set dimmfive","func":"\nvar check2 = flow.get(\"Rupdate\");\n \n\nvar check = global.get(\"dimmfive\");\n\n\nif(check2 === \"on\")\n{\n return\n}\nelse\n{\nif (check === \"on\")\n { \n check= \"off\"; \n global.set(\"dimmfive\", \"off\");\n \n }\n else\n {\n check = \"on\"; \n global.set(\"dimmfive\", \"on\");\n }\n \nmsg.payload = check;\nreturn msg;\n}\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":900,"wires":[["e1b68b892bf16c77"]]},{"id":"ab1b167d4685b742","type":"function","z":"cb5f48f44725f232","name":"globalVariable set dimmsix","func":"\nvar check2 = flow.get(\"Rupdate\");\n \n\nvar check = global.get(\"dimmsix\");\n\n\nif(check2 === \"on\")\n{\n return\n}\nelse\n{\nif (check === \"on\")\n { \n check= \"off\"; \n global.set(\"dimmsix\", \"off\");\n \n }\n else\n {\n check = \"on\"; \n global.set(\"dimmsix\", \"on\");\n }\n \nmsg.payload = check;\nreturn msg;\n}\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":980,"wires":[["09eab325530d7a1c"]]},{"id":"7d707a6fc0325b8c","type":"mcp23017chip","addr":"0x20","interval":"100"},{"id":"0ddb07c65cbb68bc","type":"mqtt-broker","name":"","broker":"http://localhost","port":"1883","clientid":"","usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"b39a769e1a5ab2d0","type":"ui_group","name":"Dimmer","tab":"c7e50f4d.33f09","order":4,"disp":true,"width":"6","collapse":false,"className":""},{"id":"c7e50f4d.33f09","type":"ui_tab","name":"Switches","icon":"mi-toggle_on","order":2,"disabled":false,"hidden":false}]