Last active
January 12, 2018 12:01
-
-
Save smadds/f4347ee0e6db630733f16e71c931984f to your computer and use it in GitHub Desktop.
Node Red lighting control using DMX & Tasmota.
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": "86b36e2c.706d3", | |
"type": "ui_slider", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"label": "Office Lights", | |
"group": "a72fd130.a713a", | |
"order": 1, | |
"width": 0, | |
"height": 0, | |
"passthru": false, | |
"topic": "1", | |
"min": 0, | |
"max": "255", | |
"step": "10", | |
"x": 390, | |
"y": 60, | |
"wires": [ | |
[ | |
"e4d2a379.6dbc5" | |
] | |
] | |
}, | |
{ | |
"id": "6e1b6cc6.11be94", | |
"type": "ui_slider", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"label": "Kitchen Lights", | |
"group": "a72fd130.a713a", | |
"order": 2, | |
"width": 0, | |
"height": 0, | |
"passthru": false, | |
"topic": "2", | |
"min": 0, | |
"max": "255", | |
"step": "10", | |
"x": 420, | |
"y": 120, | |
"wires": [ | |
[ | |
"bc50e29f.dcb1c" | |
] | |
] | |
}, | |
{ | |
"id": "250e6fa9.8282f", | |
"type": "ui_slider", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"label": "Pendant Light", | |
"group": "a72fd130.a713a", | |
"order": 3, | |
"width": 0, | |
"height": 0, | |
"passthru": false, | |
"topic": "3", | |
"min": 0, | |
"max": "255", | |
"step": "10", | |
"x": 440, | |
"y": 180, | |
"wires": [ | |
[ | |
"4bb5f5b7.caae8c" | |
] | |
] | |
}, | |
{ | |
"id": "933c9dc7.12d22", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "cmnd/kitchen-leds/pwm4", | |
"qos": "", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 450, | |
"y": 900, | |
"wires": [] | |
}, | |
{ | |
"id": "7b15e30f.f0bcac", | |
"type": "ui_slider", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"label": "Counter lights", | |
"group": "a72fd130.a713a", | |
"order": 4, | |
"width": 0, | |
"height": 0, | |
"passthru": false, | |
"topic": "", | |
"min": 0, | |
"max": "1023", | |
"step": "1", | |
"x": 840, | |
"y": 420, | |
"wires": [ | |
[ | |
"3b085703.c7c3f8", | |
"2bf118d8.573068" | |
] | |
] | |
}, | |
{ | |
"id": "d493b356.386bf", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "cmnd/kitchen-leds/pwm5", | |
"qos": "", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 450, | |
"y": 960, | |
"wires": [] | |
}, | |
{ | |
"id": "c2368e79.e71f7", | |
"type": "ui_button", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"group": "2985619f.094eee", | |
"order": 1, | |
"width": "3", | |
"height": "2", | |
"passthru": false, | |
"label": "Bright", | |
"color": "#000000", | |
"bgcolor": "#c0e0ff", | |
"icon": "", | |
"payload": "1", | |
"payloadType": "num", | |
"topic": "", | |
"x": 610, | |
"y": 220, | |
"wires": [ | |
[ | |
"66e4fb19.2e7fc4", | |
"770bb460.54ddec" | |
] | |
] | |
}, | |
{ | |
"id": "aedf29b1.8b3d28", | |
"type": "ui_button", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"group": "2985619f.094eee", | |
"order": 3, | |
"width": "3", | |
"height": "2", | |
"passthru": false, | |
"label": "Meal", | |
"color": "#ffffff", | |
"bgcolor": "#204080", | |
"icon": "", | |
"payload": "3", | |
"payloadType": "num", | |
"topic": "", | |
"x": 610, | |
"y": 300, | |
"wires": [ | |
[ | |
"66e4fb19.2e7fc4", | |
"770bb460.54ddec" | |
] | |
] | |
}, | |
{ | |
"id": "e1b6cc8b.4524e", | |
"type": "ui_button", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"group": "2985619f.094eee", | |
"order": 2, | |
"width": "3", | |
"height": "2", | |
"passthru": false, | |
"label": "Evening", | |
"color": "", | |
"bgcolor": "", | |
"icon": "", | |
"payload": "2", | |
"payloadType": "num", | |
"topic": "", | |
"x": 600, | |
"y": 260, | |
"wires": [ | |
[ | |
"66e4fb19.2e7fc4", | |
"770bb460.54ddec" | |
] | |
] | |
}, | |
{ | |
"id": "a638c5de.f86a58", | |
"type": "ui_button", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"group": "2985619f.094eee", | |
"order": 5, | |
"width": "3", | |
"height": "2", | |
"passthru": false, | |
"label": "Night", | |
"color": "#ffffff", | |
"bgcolor": "#000020", | |
"icon": "", | |
"payload": "5", | |
"payloadType": "num", | |
"topic": "", | |
"x": 610, | |
"y": 380, | |
"wires": [ | |
[ | |
"66e4fb19.2e7fc4", | |
"770bb460.54ddec" | |
] | |
] | |
}, | |
{ | |
"id": "66e4fb19.2e7fc4", | |
"type": "function", | |
"z": "f12c6936.f5d828", | |
"name": "Presets", | |
"func": "var dmx1 = {topic:1};\nvar dmx2 = {topic:2};\nvar dmx3 = {topic:3};\nvar pwm1={};\nvar pwm2={};\nvar pwm3={};\nvar pwm4={};\nvar pwm5={};\n\n\nswitch(msg.payload) {\n case 1: //Bright\n dmx1.payload = 255;\n dmx2.payload = 255;\n dmx3.payload = 255;\n pwm4.payload = 1023;\n pwm5.payload = 1023;\n break;\n case 2: //Evening\n dmx1.payload = 120;\n dmx2.payload = 120;\n dmx3.payload = 80;\n pwm4.payload = 300;\n pwm5.payload = 300;\n break;\n case 3: //Meal\n dmx1.payload = 80;\n dmx2.payload = 80;\n dmx3.payload = 110;\n pwm4.payload = 300;\n pwm5.payload = 300;\n break;\n case 4: //Just Counter\n dmx1.payload = 0;\n dmx2.payload = 0;\n dmx3.payload = 0;\n pwm4.payload = 800;\n pwm5.payload = 800;\n break;\n case 5: //Night\n dmx1.payload = 0;\n dmx2.payload = 0;\n dmx3.payload = 0;\n pwm4.payload = 2;\n pwm5.payload = 2;\n break;\n case 6: //Night\n dmx1.payload = 0;\n dmx2.payload = 0;\n dmx3.payload = 0;\n pwm4.payload = 0;\n pwm5.payload = 0;\n break;\n default:\n dmx1.payload = 0;\n dmx2.payload = 0;\n dmx3.payload = 0;\n pwm4.payload = 0;\n pwm5.payload = 0;\n break;\n}\n\nreturn [dmx1, dmx2, dmx3, pwm1, pwm2, pwm3, pwm4, pwm5];", | |
"outputs": "8", | |
"noerr": 0, | |
"x": 800, | |
"y": 320, | |
"wires": [ | |
[ | |
"e4d2a379.6dbc5" | |
], | |
[ | |
"bc50e29f.dcb1c" | |
], | |
[ | |
"4bb5f5b7.caae8c" | |
], | |
[ | |
"58a68c99.2025d4" | |
], | |
[ | |
"e9309763.6580d8" | |
], | |
[ | |
"a7e37ea4.32309" | |
], | |
[ | |
"3b085703.c7c3f8" | |
], | |
[ | |
"2bf118d8.573068" | |
] | |
], | |
"outputLabels": [ | |
"dmx1", | |
"dmx2", | |
"dmx3", | |
"pwm1", | |
"pwm2", | |
"pwm3", | |
"pwm4", | |
"pwm5" | |
] | |
}, | |
{ | |
"id": "98823e65.441c9", | |
"type": "ui_button", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"group": "2985619f.094eee", | |
"order": 4, | |
"width": "3", | |
"height": "2", | |
"passthru": false, | |
"label": "Just Counter", | |
"color": "#ffffff", | |
"bgcolor": "#000040", | |
"icon": "", | |
"payload": "4", | |
"payloadType": "num", | |
"topic": "", | |
"x": 590, | |
"y": 340, | |
"wires": [ | |
[ | |
"66e4fb19.2e7fc4", | |
"770bb460.54ddec" | |
] | |
] | |
}, | |
{ | |
"id": "85f6e9ff.5dcd78", | |
"type": "ui_button", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"group": "2985619f.094eee", | |
"order": 6, | |
"width": "3", | |
"height": "2", | |
"passthru": true, | |
"label": "Off", | |
"color": "#ffffff", | |
"bgcolor": "#101010", | |
"icon": "", | |
"payload": "6", | |
"payloadType": "num", | |
"topic": "", | |
"x": 610, | |
"y": 420, | |
"wires": [ | |
[ | |
"66e4fb19.2e7fc4", | |
"770bb460.54ddec" | |
] | |
] | |
}, | |
{ | |
"id": "e4d2a379.6dbc5", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/dmx1", | |
"qos": "2", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 1140, | |
"y": 60, | |
"wires": [] | |
}, | |
{ | |
"id": "bc50e29f.dcb1c", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/dmx2", | |
"qos": "2", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 1140, | |
"y": 120, | |
"wires": [] | |
}, | |
{ | |
"id": "4bb5f5b7.caae8c", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/dmx3", | |
"qos": "2", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 1140, | |
"y": 180, | |
"wires": [] | |
}, | |
{ | |
"id": "58a68c99.2025d4", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/pwm1", | |
"qos": "2", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 1140, | |
"y": 240, | |
"wires": [] | |
}, | |
{ | |
"id": "e9309763.6580d8", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/pwm2", | |
"qos": "2", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 1140, | |
"y": 300, | |
"wires": [] | |
}, | |
{ | |
"id": "a7e37ea4.32309", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/pwm3", | |
"qos": "2", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 1140, | |
"y": 360, | |
"wires": [] | |
}, | |
{ | |
"id": "3b085703.c7c3f8", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/pwm4", | |
"qos": "2", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 1140, | |
"y": 420, | |
"wires": [] | |
}, | |
{ | |
"id": "2bf118d8.573068", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/pwm5", | |
"qos": "2", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 1140, | |
"y": 480, | |
"wires": [] | |
}, | |
{ | |
"id": "45ef97fd.99f098", | |
"type": "mqtt in", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/pwm5", | |
"qos": "2", | |
"broker": "e4e72b98.749778", | |
"x": 140, | |
"y": 960, | |
"wires": [ | |
[ | |
"d493b356.386bf" | |
] | |
] | |
}, | |
{ | |
"id": "80e2a117.1a74b", | |
"type": "mqtt in", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/pwm4", | |
"qos": "2", | |
"broker": "e4e72b98.749778", | |
"x": 140, | |
"y": 900, | |
"wires": [ | |
[ | |
"933c9dc7.12d22", | |
"7b15e30f.f0bcac" | |
] | |
] | |
}, | |
{ | |
"id": "7510056d.d88dec", | |
"type": "mqtt in", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/pwm3", | |
"qos": "2", | |
"broker": "e4e72b98.749778", | |
"x": 140, | |
"y": 840, | |
"wires": [ | |
[] | |
] | |
}, | |
{ | |
"id": "fb84c4a9.2d3308", | |
"type": "mqtt in", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/pwm2", | |
"qos": "2", | |
"broker": "e4e72b98.749778", | |
"x": 140, | |
"y": 780, | |
"wires": [ | |
[] | |
] | |
}, | |
{ | |
"id": "e55eb927.00cbc8", | |
"type": "mqtt in", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/pwm1", | |
"qos": "2", | |
"broker": "e4e72b98.749778", | |
"x": 140, | |
"y": 720, | |
"wires": [ | |
[] | |
] | |
}, | |
{ | |
"id": "1587758f.daec2a", | |
"type": "mqtt in", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/dmx3", | |
"qos": "2", | |
"broker": "e4e72b98.749778", | |
"x": 140, | |
"y": 660, | |
"wires": [ | |
[ | |
"3eee3be5.e81b64", | |
"250e6fa9.8282f" | |
] | |
] | |
}, | |
{ | |
"id": "a450ead6.37bbc8", | |
"type": "mqtt in", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/dmx2", | |
"qos": "2", | |
"broker": "e4e72b98.749778", | |
"x": 140, | |
"y": 600, | |
"wires": [ | |
[ | |
"c7a25ab3.3025d8", | |
"6e1b6cc6.11be94" | |
] | |
] | |
}, | |
{ | |
"id": "553d5cf9.f75014", | |
"type": "mqtt in", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/dmx1", | |
"qos": "2", | |
"broker": "e4e72b98.749778", | |
"x": 140, | |
"y": 540, | |
"wires": [ | |
[ | |
"a21f8fcd.d354c", | |
"86b36e2c.706d3" | |
] | |
] | |
}, | |
{ | |
"id": "a21f8fcd.d354c", | |
"type": "change", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "topic", | |
"pt": "msg", | |
"to": "1", | |
"tot": "num" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 410, | |
"y": 540, | |
"wires": [ | |
[ | |
"5b9d70da.0105a" | |
] | |
] | |
}, | |
{ | |
"id": "c7a25ab3.3025d8", | |
"type": "change", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "topic", | |
"pt": "msg", | |
"to": "2", | |
"tot": "num" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 410, | |
"y": 600, | |
"wires": [ | |
[ | |
"5b9d70da.0105a" | |
] | |
] | |
}, | |
{ | |
"id": "3eee3be5.e81b64", | |
"type": "change", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "topic", | |
"pt": "msg", | |
"to": "3", | |
"tot": "num" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 410, | |
"y": 660, | |
"wires": [ | |
[ | |
"5b9d70da.0105a" | |
] | |
] | |
}, | |
{ | |
"id": "5b9d70da.0105a", | |
"type": "udmx", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"x": 650, | |
"y": 600, | |
"wires": [] | |
}, | |
{ | |
"id": "770bb460.54ddec", | |
"type": "mqtt out", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"topic": "settings/kitchen/lightpresets", | |
"qos": "2", | |
"retain": "true", | |
"broker": "e4e72b98.749778", | |
"x": 860, | |
"y": 220, | |
"wires": [] | |
}, | |
{ | |
"id": "4f72760e.cc3288", | |
"type": "ui_button", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"group": "1b616a57.c43366", | |
"order": 3, | |
"width": "0", | |
"height": "0", | |
"passthru": false, | |
"label": "Settings", | |
"color": "", | |
"bgcolor": "#404040", | |
"icon": "", | |
"payload": "Settings", | |
"payloadType": "str", | |
"topic": "", | |
"x": 740, | |
"y": 760, | |
"wires": [ | |
[ | |
"d32cc6ca.f382b8" | |
] | |
] | |
}, | |
{ | |
"id": "86386ca4.72075", | |
"type": "comment", | |
"z": "f12c6936.f5d828", | |
"name": "PAGE CHANGE", | |
"info": "", | |
"x": 780, | |
"y": 700, | |
"wires": [] | |
}, | |
{ | |
"id": "c0f51c41.8af86", | |
"type": "link in", | |
"z": "f12c6936.f5d828", | |
"name": "Away", | |
"links": [ | |
"ab8ad33.fd3213" | |
], | |
"x": 455, | |
"y": 420, | |
"wires": [ | |
[ | |
"85f6e9ff.5dcd78" | |
] | |
] | |
}, | |
{ | |
"id": "d32cc6ca.f382b8", | |
"type": "ui_ui_control", | |
"z": "f12c6936.f5d828", | |
"name": "ui control", | |
"x": 900, | |
"y": 800, | |
"wires": [ | |
[] | |
] | |
}, | |
{ | |
"id": "ef08ac90.1215e", | |
"type": "ui_button", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"group": "1b616a57.c43366", | |
"order": 2, | |
"width": "3", | |
"height": "1", | |
"passthru": false, | |
"label": "Charts", | |
"color": "", | |
"bgcolor": "#404040", | |
"icon": "", | |
"payload": "Charts", | |
"payloadType": "str", | |
"topic": "", | |
"x": 750, | |
"y": 800, | |
"wires": [ | |
[ | |
"d32cc6ca.f382b8" | |
] | |
] | |
}, | |
{ | |
"id": "cf5050.2c871fb", | |
"type": "ui_button", | |
"z": "f12c6936.f5d828", | |
"name": "", | |
"group": "1b616a57.c43366", | |
"order": 1, | |
"width": "3", | |
"height": "1", | |
"passthru": false, | |
"label": "Console", | |
"color": "", | |
"bgcolor": "#404040", | |
"icon": "", | |
"payload": "Console", | |
"payloadType": "str", | |
"topic": "", | |
"x": 740, | |
"y": 840, | |
"wires": [ | |
[ | |
"d32cc6ca.f382b8" | |
] | |
] | |
}, | |
{ | |
"id": "15a4e8fd.d74f57", | |
"type": "alexa-home", | |
"z": "f12c6936.f5d828", | |
"conf": "8134e8ac.4c7ef8", | |
"device": "12660", | |
"acknoledge": true, | |
"name": "Study Lights", | |
"topic": "", | |
"x": 670, | |
"y": 20, | |
"wires": [ | |
[ | |
"b309c919.900f68" | |
] | |
] | |
}, | |
{ | |
"id": "b309c919.900f68", | |
"type": "function", | |
"z": "f12c6936.f5d828", | |
"name": "Scale 100>255", | |
"func": "inmsg = msg.payload;\nif (msg.payload === true) msg.payload = 100;\nif (msg.payload === false) msg.payload = 0;\nmsg.payload = msg.payload * 2.55;\nmsg.payload = msg.payload.toFixed(0);\nnode.status({text:inmsg + \" > \" + msg.payload});\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 840, | |
"y": 20, | |
"wires": [ | |
[ | |
"e4d2a379.6dbc5" | |
] | |
] | |
}, | |
{ | |
"id": "c99082c4.2f02d", | |
"type": "alexa-home", | |
"z": "f12c6936.f5d828", | |
"conf": "8134e8ac.4c7ef8", | |
"device": "12665", | |
"acknoledge": true, | |
"name": "Kitchen Lights", | |
"topic": "", | |
"x": 670, | |
"y": 80, | |
"wires": [ | |
[ | |
"21e7bf19.abb7a" | |
] | |
] | |
}, | |
{ | |
"id": "21e7bf19.abb7a", | |
"type": "function", | |
"z": "f12c6936.f5d828", | |
"name": "Scale 100>255", | |
"func": "inmsg = msg.payload;\nif (msg.payload === true) msg.payload = 100;\nif (msg.payload === false) msg.payload = 0;\nmsg.payload = msg.payload * 2.55;\nmsg.payload = msg.payload.toFixed(0);\nnode.status({text:inmsg + \" > \" + msg.payload});\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 840, | |
"y": 80, | |
"wires": [ | |
[ | |
"bc50e29f.dcb1c" | |
] | |
] | |
}, | |
{ | |
"id": "17b10af9.9ce445", | |
"type": "alexa-home", | |
"z": "f12c6936.f5d828", | |
"conf": "8134e8ac.4c7ef8", | |
"device": "12666", | |
"acknoledge": true, | |
"name": "Pendant Light", | |
"topic": "", | |
"x": 670, | |
"y": 140, | |
"wires": [ | |
[ | |
"190e8080.bde3a" | |
] | |
] | |
}, | |
{ | |
"id": "190e8080.bde3a", | |
"type": "function", | |
"z": "f12c6936.f5d828", | |
"name": "Scale 100>255", | |
"func": "inmsg = msg.payload;\nif (msg.payload === true) msg.payload = 100;\nif (msg.payload === false) msg.payload = 0;\nmsg.payload = msg.payload * 2.55;\nmsg.payload = msg.payload.toFixed(0);\nnode.status({text:inmsg + \" > \" + msg.payload});\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 840, | |
"y": 140, | |
"wires": [ | |
[ | |
"4bb5f5b7.caae8c" | |
] | |
] | |
}, | |
{ | |
"id": "141b7b8d.fa3984", | |
"type": "alexa-home", | |
"z": "f12c6936.f5d828", | |
"conf": "8134e8ac.4c7ef8", | |
"device": "12667", | |
"acknoledge": true, | |
"name": "Counter Lights", | |
"topic": "", | |
"x": 640, | |
"y": 480, | |
"wires": [ | |
[ | |
"c81672dc.044b2" | |
] | |
] | |
}, | |
{ | |
"id": "c81672dc.044b2", | |
"type": "function", | |
"z": "f12c6936.f5d828", | |
"name": "Scale 100>1023", | |
"func": "inmsg = msg.payload;\nif (msg.payload === true) msg.payload = 100;\nif (msg.payload === false) msg.payload = 0;\nmsg.payload = msg.payload * 10.23;\nmsg.payload = msg.payload.toFixed(0);\nnode.status({text:inmsg + \" > \" + msg.payload});\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 840, | |
"y": 480, | |
"wires": [ | |
[ | |
"3b085703.c7c3f8", | |
"2bf118d8.573068" | |
] | |
] | |
}, | |
{ | |
"id": "a72fd130.a713a", | |
"type": "ui_group", | |
"z": "", | |
"name": "Lighting Sliders", | |
"tab": "5955d47b.d81d1c", | |
"order": 2, | |
"disp": false, | |
"width": "6" | |
}, | |
{ | |
"id": "e4e72b98.749778", | |
"type": "mqtt-broker", | |
"z": "", | |
"broker": "localhost", | |
"port": "1883", | |
"clientid": "", | |
"usetls": false, | |
"compatmode": true, | |
"keepalive": "60", | |
"cleansession": true, | |
"willTopic": "", | |
"willQos": "0", | |
"willPayload": "", | |
"birthTopic": "", | |
"birthQos": "0", | |
"birthPayload": "" | |
}, | |
{ | |
"id": "2985619f.094eee", | |
"type": "ui_group", | |
"z": "", | |
"name": "Kitchen Lighting", | |
"tab": "e5bc8a1a.f5e098", | |
"order": 2, | |
"disp": true, | |
"width": "6" | |
}, | |
{ | |
"id": "1b616a57.c43366", | |
"type": "ui_group", | |
"z": "", | |
"name": "Navigation", | |
"tab": "e5bc8a1a.f5e098", | |
"order": 3, | |
"disp": false, | |
"width": "6" | |
}, | |
{ | |
"id": "8134e8ac.4c7ef8", | |
"type": "alexa-home-conf", | |
"z": "", | |
"username": "simon.maddox" | |
}, | |
{ | |
"id": "5955d47b.d81d1c", | |
"type": "ui_tab", | |
"z": "", | |
"name": "Settings", | |
"icon": "dashboard", | |
"order": 2 | |
}, | |
{ | |
"id": "e5bc8a1a.f5e098", | |
"type": "ui_tab", | |
"z": "", | |
"name": "Home", | |
"icon": "dashboard", | |
"order": 1 | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment