Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ktinkerer
Created September 29, 2016 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ktinkerer/1dc7c11fcf225041f8aebd1b035aa84c to your computer and use it in GitHub Desktop.
Save ktinkerer/1dc7c11fcf225041f8aebd1b035aa84c to your computer and use it in GitHub Desktop.
[
{
"id":"34541282.b27bae",
"type":"exec",
"z":"950c840e.c0af58",
"command":"sudo /home/pi/raspberry-strogonanoff/src/strogonanoff_sender.py --channel 1 --button 1 --gpio 0 on",
"addpay":false,
"append":"",
"useSpawn":"",
"timer":"",
"name":"Socket One On",
"x":813.5,
"y":237.5,
"wires":[
[
],
[
],
[
]
]
},
{
"id":"9ad3d882.b5b758",
"type":"exec",
"z":"950c840e.c0af58",
"command":"sudo /home/pi/raspberry-strogonanoff/src/strogonanoff_sender.py --channel 1 --button 1 --gpio 0 off",
"addpay":false,
"append":"",
"useSpawn":"",
"timer":"",
"name":"Socket One Off",
"x":810,
"y":375,
"wires":[
[
],
[
],
[
]
]
},
{
"id":"efdee8e2.9fb068",
"type":"exec",
"z":"950c840e.c0af58",
"command":"sudo /home/pi/raspberry-strogonanoff/src/strogonanoff_sender.py --channel 1 --button 2 --gpio 0 on",
"addpay":false,
"append":"",
"useSpawn":"",
"timer":"",
"name":"Socket Two On",
"x":804.5,
"y":295,
"wires":[
[
],
[
],
[
]
]
},
{
"id":"fd5dd4d6.17d618",
"type":"exec",
"z":"950c840e.c0af58",
"command":"sudo /home/pi/raspberry-strogonanoff/src/strogonanoff_sender.py --channel 1 --button 2 --gpio 0 off",
"addpay":false,
"append":"",
"useSpawn":"",
"timer":"",
"name":"Socket Two Off",
"x":813,
"y":451.5,
"wires":[
[
],
[
],
[
]
]
},
{
"id":"9d12b0fa.e67d1",
"type":"ui_button",
"z":"950c840e.c0af58",
"name":"",
"group":"b42ee72b.eeddf8",
"order":0,
"width":0,
"height":0,
"label":"Light One On",
"color":"",
"icon":"",
"payload":"now",
"payloadType":"str",
"topic":"",
"x":305,
"y":232,
"wires":[
[
"34541282.b27bae"
]
]
},
{
"id":"e53efb5f.bd5e68",
"type":"ui_button",
"z":"950c840e.c0af58",
"name":"",
"group":"b42ee72b.eeddf8",
"order":0,
"width":0,
"height":0,
"label":"Light One Off",
"color":"",
"icon":"",
"payload":"now",
"payloadType":"str",
"topic":"",
"x":306,
"y":280,
"wires":[
[
"9ad3d882.b5b758"
]
]
},
{
"id":"cb7c8b21.9ddf68",
"type":"ui_button",
"z":"950c840e.c0af58",
"name":"",
"group":"b42ee72b.eeddf8",
"order":0,
"width":0,
"height":0,
"label":"Light Two On",
"color":"",
"icon":"",
"payload":"now",
"payloadType":"str",
"topic":"",
"x":312,
"y":323,
"wires":[
[
"efdee8e2.9fb068"
]
]
},
{
"id":"cdaa93ed.a6b98",
"type":"ui_button",
"z":"950c840e.c0af58",
"name":"",
"group":"b42ee72b.eeddf8",
"order":0,
"width":0,
"height":0,
"label":"Light Two Off",
"color":"",
"icon":"",
"payload":"now",
"payloadType":"str",
"topic":"",
"x":318,
"y":367,
"wires":[
[
"fd5dd4d6.17d618"
]
]
},
{
"id":"bee3d23.756c83",
"type":"ui_button",
"z":"950c840e.c0af58",
"name":"",
"group":"b42ee72b.eeddf8",
"order":0,
"width":0,
"height":0,
"label":"Both On",
"color":"",
"icon":"",
"payload":"now",
"payloadType":"str",
"topic":"",
"x":305,
"y":411,
"wires":[
[
"34541282.b27bae",
"94786d61.ff169"
]
]
},
{
"id":"71da3654.abc578",
"type":"ui_button",
"z":"950c840e.c0af58",
"name":"",
"group":"b42ee72b.eeddf8",
"order":0,
"width":0,
"height":0,
"label":"Both Off",
"color":"",
"icon":"",
"payload":"now",
"payloadType":"str",
"topic":"",
"x":313,
"y":454,
"wires":[
[
"9ad3d882.b5b758",
"3d5b2143.1fcb5e"
]
]
},
{
"id":"94786d61.ff169",
"type":"delay",
"z":"950c840e.c0af58",
"name":"",
"pauseType":"delay",
"timeout":"500",
"timeoutUnits":"milliseconds",
"rate":"1",
"rateUnits":"second",
"randomFirst":"1",
"randomLast":"5",
"randomUnits":"seconds",
"drop":false,
"x":626,
"y":297,
"wires":[
[
"efdee8e2.9fb068"
]
]
},
{
"id":"3d5b2143.1fcb5e",
"type":"delay",
"z":"950c840e.c0af58",
"name":"",
"pauseType":"delay",
"timeout":"500",
"timeoutUnits":"milliseconds",
"rate":"1",
"rateUnits":"second",
"randomFirst":"1",
"randomLast":"5",
"randomUnits":"seconds",
"drop":false,
"x":627,
"y":467,
"wires":[
[
"fd5dd4d6.17d618"
]
]
},
{
"id":"99c0f30d.3d78",
"type":"sunrise",
"z":"950c840e.c0af58",
"name":"Sunny",
"lat":"0",
"lon":"0",
"start":"sunrise",
"end":"sunset",
"x":288,
"y":158,
"wires":[
[
],
[
"39dc3b31.c9c744"
]
]
},
{
"id":"39dc3b31.c9c744",
"type":"function",
"z":"950c840e.c0af58",
"name":"",
"func":"if (msg.payload == 0 ) {\n return msg;\n}\n",
"outputs":1,
"noerr":0,
"x":463,
"y":177,
"wires":[
[
"34541282.b27bae",
"94786d61.ff169"
]
]
},
{
"id":"9dfb89c1.bf4aa8",
"type":"mqtt in",
"z":"950c840e.c0af58",
"name":"",
"topic":"livingroom/lights",
"qos":"2",
"broker":"d00e99cc.d03368",
"x":307,
"y":555,
"wires":[
[
"327241d5.92c52e"
]
]
},
{
"id":"327241d5.92c52e",
"type":"filter",
"z":"950c840e.c0af58",
"name":"On/Off",
"property":"payload",
"propertyType":"msg",
"asArray":false,
"itemProperty":"payload",
"itemPropertyType":"item",
"rules":[
{
"t":"eq",
"v":"on",
"vt":"str",
"output":1
},
{
"t":"eq",
"v":"off",
"vt":"str",
"output":2
}
],
"checkall":"true",
"outputs":"2",
"x":406,
"y":501,
"wires":[
[
"34541282.b27bae",
"94786d61.ff169"
],
[
"9ad3d882.b5b758",
"3d5b2143.1fcb5e"
]
]
},
{
"id":"ee269e0e.9afc9",
"type":"inject",
"z":"950c840e.c0af58",
"name":"10.30 on weekdays",
"topic":"",
"payload":"",
"payloadType":"date",
"repeat":"",
"crontab":"30 22 * * 1,2,3,4",
"once":false,
"x":383,
"y":51,
"wires":[
[
"9ad3d882.b5b758",
"3d5b2143.1fcb5e"
]
]
},
{
"id":"86584321.621a3",
"type":"inject",
"z":"950c840e.c0af58",
"name":"11pm on weekends",
"topic":"",
"payload":"",
"payloadType":"date",
"repeat":"",
"crontab":"00 23 * * 5,6,0",
"once":false,
"x":387,
"y":94,
"wires":[
[
"9ad3d882.b5b758",
"3d5b2143.1fcb5e"
]
]
},
{
"id":"b42ee72b.eeddf8",
"type":"ui_group",
"z":"950c840e.c0af58",
"name":"Lights",
"tab":"6a30d220.8360ec",
"disp":true,
"width":"6"
},
{
"id":"d02e98cc.d03368",
"type":"mqtt-broker",
"z":"950c840e.c0af58",
"broker":"92.234.12.105",
"port":"1883",
"clientid":"",
"usetls":false,
"compatmode":true,
"keepalive":"60",
"cleansession":true,
"willTopic":"",
"willQos":"0",
"willPayload":"",
"birthTopic":"",
"birthQos":"0",
"birthPayload":""
},
{
"id":"6a30d220.8360ec",
"type":"ui_tab",
"z":"",
"name":"Living Room",
"icon":"dashboard",
"order":3
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment