use bigtimer and MQTT broker to control landscape lights
-
-
Save daviddohm/3fa9ae1df251bab64f1be9f6baae3929 to your computer and use it in GitHub Desktop.
Landscape Light Control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"42317d62.9cf2d4","type":"tab","label":"Flow 1"},{"id":"10abbf93.0b6e1","type":"mqtt-broker","z":"","broker":"test.mosquitto.org","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"523a0b55.fe2bec","type":"ui_tab","z":"","name":"Light Test","icon":"dashboard","order":"1"},{"id":"4cb4eab9.8836e4","type":"mqtt in","z":"42317d62.9cf2d4","name":"Landscape light Status","topic":"AlliedTest","qos":"2","broker":"10abbf93.0b6e1","x":171,"y":108,"wires":[["e353d669.ac606","141762b5.7de68d"]]},{"id":"b1edfbfd.9d1958","type":"mqtt out","z":"42317d62.9cf2d4","name":"Landscape Light Control","topic":"AlliedTest","qos":"","retain":"false","broker":"10abbf93.0b6e1","x":816,"y":470,"wires":[]},{"id":"5d8a8984.17e3","type":"ui_button","z":"42317d62.9cf2d4","tab":"523a0b55.fe2bec","name":"Light On","payload":"on_override","topic":"","group":"Landscape Light Control","order":1,"x":162,"y":349,"wires":[["bc28caed.9852d"]]},{"id":"6f9f1e33.63dd08","type":"ui_button","z":"42317d62.9cf2d4","tab":"523a0b55.fe2bec","name":"Light Off","payload":"off_override","topic":"","group":"Landscape Light Control","order":1,"x":159,"y":441,"wires":[["bc28caed.9852d"]]},{"id":"2afc7f4a.25f3b","type":"debug","z":"42317d62.9cf2d4","name":"","active":true,"console":"false","complete":"false","x":781,"y":385,"wires":[]},{"id":"e764eda.c1a141","type":"e-mail","z":"42317d62.9cf2d4","server":"smtp.mail.att.net","port":"465","secure":true,"name":"5599030346@vtext.com","dname":"","x":808,"y":127,"wires":[]},{"id":"e353d669.ac606","type":"ui_template","z":"42317d62.9cf2d4","tab":"523a0b55.fe2bec","name":"On-Off Indicator","group":"Landscape Light Feedback","order":1,"format":"<div layout=\"row\" layout-align=\"space-between center\">\n<p flex> </p>\n <ng-md-icon icon=\"wb_incandescent\" ng-style=\"{fill:msg.payload=='1' ?'red':'black'}\" size=\"32\"></ng-md-icon>\n</div>","storeOutMessages":true,"fwdInMessages":true,"x":399,"y":187,"wires":[[]]},{"id":"a774ca2c.923e3","type":"ui_switch","z":"42317d62.9cf2d4","tab":"523a0b55.fe2bec","name":"Enable Send SMS Status Message","topic":"AlliedTest","group":"Landscape Light Feedback","order":1,"onvalue":"true","offvalue":"false","x":505,"y":53,"wires":[["439941ab.462798"]]},{"id":"739dca52.c58074","type":"debug","z":"42317d62.9cf2d4","name":"","active":false,"console":"false","complete":"false","x":801,"y":222,"wires":[]},{"id":"439941ab.462798","type":"function","z":"42317d62.9cf2d4","name":"Switchvariable","func":"global.set(\"Sendsms\",msg.payload);\n","outputs":1,"noerr":0,"x":806,"y":58,"wires":[[]]},{"id":"3b8b8ac5.729086","type":"function","z":"42317d62.9cf2d4","name":"SendSMS","func":"var Sendmessage=global.get(\"Sendsms\");\nif (Sendmessage==\"true\")\n{\nreturn msg;\n}\nelse\n{\n return null;\n}","outputs":1,"noerr":0,"x":600,"y":125,"wires":[["e764eda.c1a141","739dca52.c58074"]]},{"id":"141762b5.7de68d","type":"function","z":"42317d62.9cf2d4","name":"Format Status Text","func":"m = msg.payload;\nif (m == \"1\")\n{\n return {payload:\"Landscape Lights On\"};\n}\nelse if (m == \"0\")\n{\n return {payload:\"Landscape Lights Off\"};\n}","outputs":1,"noerr":0,"x":423,"y":125,"wires":[["3b8b8ac5.729086"]]},{"id":"bc28caed.9852d","type":"bigtimer","z":"42317d62.9cf2d4","outtopic":"","outpayload1":"1","outpayload2":"0","name":"Landscape Lights","lat":"36.797025","lon":"-119.670181","starttime":"5001","endtime":"1335","startoff":0,"endoff":0,"offs":0,"outtext1":"1","outtext2":"0","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":407,"y":406.5,"wires":[["b1edfbfd.9d1958","2afc7f4a.25f3b"],[],[]]},{"id":"7b44b42.e9a3ccc","type":"ui_button","z":"42317d62.9cf2d4","tab":"523a0b55.fe2bec","name":"Auto","payload":"auto","topic":"","group":"Landscape Light Control","order":1,"x":151,"y":396,"wires":[["bc28caed.9852d"]]}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment