I want to set the brightness for a control device. now you can only set 1 number between 0 and 100.
i want to sent a json message to the control device end adjust de brightness dynamicly
Regards Rick
I want to set the brightness for a control device. now you can only set 1 number between 0 and 100.
i want to sent a json message to the control device end adjust de brightness dynamicly
Regards Rick
Hey
Do you mind telling us more about your case?
Hello,
In node-red i register a new light device. That device should control 3 other light
cube devices. Because they are actually 1 lamp.
on/off via that registered new node-red device works fine. But the brightness not.
[
{
"id": "f6f2187d.f17ca8",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "682221649ae351c2",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "Paallamp Off",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"light\",\"deviceId\":\"984db14d-dd32-47f1-8fe5-ce022f90f545\",\"light\":{\"power\":\"off\",\"brightness\":\"\",\"type\":\"color-temperature\",\"colorOrTemp\":\"\",\"hslStr\":\"\"}}",
"category": "light",
"device": "984db14d-dd32-47f1-8fe5-ce022f90f545",
"action": "",
"x": 810,
"y": 1040,
"wires": [
[]
]
},
{
"id": "9c02cfa3137da37a",
"type": "bigtimer",
"z": "f6f2187d.f17ca8",
"outtopic": "",
"outpayload1": "On",
"outpayload2": "Off",
"name": "Big Timer",
"comment": "",
"lat": "52.14",
"lon": "4.44",
"starttime": "5004",
"endtime": "0",
"starttime2": 0,
"endtime2": "1410",
"startoff": 0,
"endoff": "15",
"startoff2": 0,
"endoff2": 0,
"offs": "+2",
"outtext1": "",
"outtext2": "",
"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,
"day6": 0,
"month6": 0,
"day7": 0,
"month7": 0,
"day8": 0,
"month8": 0,
"day9": 0,
"month9": 0,
"day10": 0,
"month10": 0,
"day11": 0,
"month11": 0,
"day12": 0,
"month12": 0,
"d1": 0,
"w1": 0,
"d2": 0,
"w2": 0,
"d3": 0,
"w3": 0,
"d4": 0,
"w4": 0,
"d5": 0,
"w5": 0,
"d6": 0,
"w6": 0,
"xday1": 0,
"xmonth1": 0,
"xday2": 0,
"xmonth2": 0,
"xday3": 0,
"xmonth3": 0,
"xday4": 0,
"xmonth4": 0,
"xday5": 0,
"xmonth5": 0,
"xday6": 0,
"xmonth6": 0,
"xday7": 0,
"xmonth7": 0,
"xday8": 0,
"xmonth8": 0,
"xday9": 0,
"xmonth9": 0,
"xday10": 0,
"xmonth10": 0,
"xday11": 0,
"xmonth11": 0,
"xday12": 0,
"xmonth12": 0,
"xd1": 0,
"xw1": 0,
"xd2": 0,
"xw2": 0,
"xd3": 0,
"xw3": 0,
"xd4": 0,
"xw4": 0,
"xd5": 0,
"xw5": 0,
"xd6": 0,
"xw6": 0,
"suspend": false,
"random": false,
"randon1": false,
"randoff1": true,
"randon2": false,
"randoff2": false,
"repeat": false,
"atstart": true,
"odd": false,
"even": false,
"x": 920,
"y": 300,
"wires": [
[
"d93fde85253c3fc8"
],
[],
[]
]
},
{
"id": "d77ff7ed88cbcc10",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "Initialize",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 40,
"wires": [
[
"04575b33627ee32b"
]
]
},
{
"id": "04575b33627ee32b",
"type": "register-device",
"z": "f6f2187d.f17ca8",
"name": "Night Light Trigger",
"server": "47b82da33cd7c32b",
"device_id": "06251b43-eacc-43da-9d1e-60d67e24d79d",
"device_name": "Night Light Trigger",
"category": "light",
"capabilities": "{\"toggleNum\":\"1\",\"values\":[\"power\"]}",
"manufacturer": "NodeRed",
"model": "C1",
"firmware_version": "1.0.0",
"service_address": "192.168.86.32",
"tags": "{}",
"state": "{}",
"x": 370,
"y": 40,
"wires": [
[]
]
},
{
"id": "d93fde85253c3fc8",
"type": "switch",
"z": "f6f2187d.f17ca8",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "On",
"vt": "str"
},
{
"t": "eq",
"v": "Off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 1110,
"y": 300,
"wires": [
[
"b7f61ae1c4bbb023"
],
[
"56e1a4fa7ccc6a0b"
]
]
},
{
"id": "d999c41a6c613fbd",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "Paal3 Off",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"light\",\"deviceId\":\"a4c1383c459f7322\",\"light\":{\"power\":\"off\",\"brightness\":\"\",\"type\":\"color-temperature\",\"colorOrTemp\":\"\",\"hslStr\":\"\"}}",
"category": "light",
"device": "a4c1383c459f7322",
"action": "",
"x": 780,
"y": 680,
"wires": [
[]
]
},
{
"id": "a1cae70edfa44667",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "Paal2 Off",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"light\",\"deviceId\":\"a4c13881f81496ec\",\"light\":{\"power\":\"off\",\"brightness\":\"\",\"type\":\"color-temperature\",\"colorOrTemp\":\"\",\"hslStr\":\"\"}}",
"category": "light",
"device": "a4c13881f81496ec",
"action": "",
"x": 780,
"y": 640,
"wires": [
[]
]
},
{
"id": "56e1a4fa7ccc6a0b",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "NightLight trigger Off",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"single\",\"single\":\"off\",\"deviceId\":\"7945c1fe-7efd-4d71-9f03-eb6e873a2318\"}",
"category": "switch",
"device": "7945c1fe-7efd-4d71-9f03-eb6e873a2318",
"action": "",
"x": 1360,
"y": 360,
"wires": [
[]
]
},
{
"id": "aca98161d3633df9",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "Paal3 On",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"light\",\"deviceId\":\"a4c1383c459f7322\",\"light\":{\"power\":\"on\",\"brightness\":\"\",\"type\":\"color-temperature\",\"colorOrTemp\":\"\",\"hslStr\":\"\"}}",
"category": "light",
"device": "a4c1383c459f7322",
"action": "",
"x": 780,
"y": 560,
"wires": [
[]
]
},
{
"id": "0fe7c531616fc6e5",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "Paal2 On",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"light\",\"deviceId\":\"a4c13881f81496ec\",\"light\":{\"power\":\"on\",\"brightness\":\"\",\"type\":\"color-temperature\",\"colorOrTemp\":\"\",\"hslStr\":\"\"}}",
"category": "light",
"device": "a4c13881f81496ec",
"action": "",
"x": 780,
"y": 520,
"wires": [
[]
]
},
{
"id": "b7f61ae1c4bbb023",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "Night Light trigger On",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"single\",\"single\":\"on\",\"deviceId\":\"7945c1fe-7efd-4d71-9f03-eb6e873a2318\"}",
"category": "switch",
"device": "7945c1fe-7efd-4d71-9f03-eb6e873a2318",
"action": "",
"x": 1360,
"y": 240,
"wires": [
[]
]
},
{
"id": "d382ac56b6cc7edb",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "Initialize",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 80,
"wires": [
[
"dd83c84da5361f96"
]
]
},
{
"id": "dd83c84da5361f96",
"type": "register-device",
"z": "f6f2187d.f17ca8",
"name": "Night Light Enabled",
"server": "47b82da33cd7c32b",
"device_id": "dd112f56-06f0-4caf-919f-1a392db8605c",
"device_name": "Night Light Enabled",
"category": "switch",
"capabilities": "{\"toggleNum\":\"1\",\"values\":[\"power\"]}",
"manufacturer": "NodeRed",
"model": "C2",
"firmware_version": "1.0.0",
"service_address": "192.168.86.32",
"tags": "{}",
"state": "{}",
"x": 370,
"y": 80,
"wires": [
[]
]
},
{
"id": "78e61e394cf2644e",
"type": "event-state",
"z": "f6f2187d.f17ca8",
"name": "status change night light enabler",
"server": "47b82da33cd7c32b",
"list": "",
"category": "switch",
"device": "6eedcd9a-1e64-405d-b11f-38852f953ddc",
"state": "all",
"x": 170,
"y": 300,
"wires": [
[
"2c34a1b426902321"
]
]
},
{
"id": "30b1ac16eb0b58d8",
"type": "switch",
"z": "f6f2187d.f17ca8",
"name": "State",
"property": "payload.payload.power.powerState",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 590,
"y": 300,
"wires": [
[
"8d0678178dba67a6"
],
[
"b7063233aab1f0e1"
]
]
},
{
"id": "2c34a1b426902321",
"type": "json",
"z": "f6f2187d.f17ca8",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 430,
"y": 300,
"wires": [
[
"30b1ac16eb0b58d8"
]
]
},
{
"id": "8d0678178dba67a6",
"type": "change",
"z": "f6f2187d.f17ca8",
"name": "auto",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "auto",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 280,
"wires": [
[
"9c02cfa3137da37a"
]
]
},
{
"id": "b7063233aab1f0e1",
"type": "change",
"z": "f6f2187d.f17ca8",
"name": "stop",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "stop",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 340,
"wires": [
[
"9c02cfa3137da37a"
]
]
},
{
"id": "b8d8efe567110ee5",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "On",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1110,
"y": 240,
"wires": [
[
"b7f61ae1c4bbb023"
]
]
},
{
"id": "b97a19b02cb9f66f",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "Off",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1110,
"y": 360,
"wires": [
[
"56e1a4fa7ccc6a0b"
]
]
},
{
"id": "9895f86ff71ea018",
"type": "register-device",
"z": "f6f2187d.f17ca8",
"name": "Paallamp",
"server": "47b82da33cd7c32b",
"device_id": "38b8f85e-a0ef-44a5-8fa1-95b07473d289",
"device_name": "Paallamp",
"category": "light",
"capabilities": "{\"toggleNum\":\"1\",\"values\":[\"power\",\"brightness\"]}",
"manufacturer": "Node-Red",
"model": "C3",
"firmware_version": "1.0.0",
"service_address": "192.168.86.32",
"tags": "{}",
"state": "{}",
"x": 340,
"y": 520,
"wires": [
[]
]
},
{
"id": "19fb435f458ffa16",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "Initialize",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 520,
"wires": [
[
"9895f86ff71ea018"
]
]
},
{
"id": "bc5a3f515e77a523",
"type": "event-state",
"z": "f6f2187d.f17ca8",
"name": "Status event paallamp",
"server": "47b82da33cd7c32b",
"list": "",
"category": "light",
"device": "984db14d-dd32-47f1-8fe5-ce022f90f545",
"state": "all",
"x": 160,
"y": 580,
"wires": [
[
"738c6979b5619919",
"8b15fa9e6ea94287"
]
]
},
{
"id": "1e3b029fe547c1f0",
"type": "switch",
"z": "f6f2187d.f17ca8",
"name": "State",
"property": "payload.payload.power.powerState",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 590,
"y": 580,
"wires": [
[
"aca98161d3633df9",
"0fe7c531616fc6e5",
"757dcff6124d9b7e"
],
[
"d999c41a6c613fbd",
"a1cae70edfa44667",
"62046c93492c9f8d"
]
]
},
{
"id": "738c6979b5619919",
"type": "json",
"z": "f6f2187d.f17ca8",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 430,
"y": 580,
"wires": [
[
"1e3b029fe547c1f0"
]
]
},
{
"id": "757dcff6124d9b7e",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "Paal1 On",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"light\",\"deviceId\":\"a4c13872eb928cdd\",\"light\":{\"power\":\"on\",\"brightness\":\"\",\"type\":\"color-temperature\",\"colorOrTemp\":\"\",\"hslStr\":\"\"}}",
"category": "light",
"device": "a4c13872eb928cdd",
"action": "",
"x": 780,
"y": 480,
"wires": [
[]
]
},
{
"id": "62046c93492c9f8d",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "Paal1 Off",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"light\",\"deviceId\":\"a4c13872eb928cdd\",\"light\":{\"power\":\"off\",\"brightness\":\"\",\"type\":\"color-temperature\",\"colorOrTemp\":\"\",\"hslStr\":\"\"}}",
"category": "light",
"device": "a4c13872eb928cdd",
"action": "",
"x": 780,
"y": 600,
"wires": [
[]
]
},
{
"id": "1efaacefa1fb36b7",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "Paallamp On",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"light\",\"deviceId\":\"984db14d-dd32-47f1-8fe5-ce022f90f545\",\"light\":{\"power\":\"on\",\"brightness\":\"\",\"type\":\"color-temperature\",\"colorOrTemp\":\"\",\"hslStr\":\"\"}}",
"category": "light",
"device": "984db14d-dd32-47f1-8fe5-ce022f90f545",
"action": "",
"x": 810,
"y": 940,
"wires": [
[]
]
},
{
"id": "b0c151337ced450c",
"type": "event-state",
"z": "f6f2187d.f17ca8",
"name": "State event night trigger",
"server": "47b82da33cd7c32b",
"list": "",
"category": "switch",
"device": "7945c1fe-7efd-4d71-9f03-eb6e873a2318",
"state": "all",
"x": 180,
"y": 980,
"wires": [
[
"b4feb39e63bfa81d"
]
]
},
{
"id": "b4feb39e63bfa81d",
"type": "json",
"z": "f6f2187d.f17ca8",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 450,
"y": 980,
"wires": [
[
"dc876222717dd301"
]
]
},
{
"id": "dc876222717dd301",
"type": "switch",
"z": "f6f2187d.f17ca8",
"name": "State",
"property": "payload.payload.power.powerState",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 610,
"y": 980,
"wires": [
[
"1efaacefa1fb36b7"
],
[
"682221649ae351c2"
]
]
},
{
"id": "fab388f7835f3922",
"type": "debug",
"z": "f6f2187d.f17ca8",
"name": "debug 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 980,
"y": 660,
"wires": []
},
{
"id": "de61d84fb3c8d6bf",
"type": "event-state",
"z": "f6f2187d.f17ca8",
"name": "",
"server": "47b82da33cd7c32b",
"list": "",
"category": "light",
"device": "a4c13872eb928cdd",
"state": "brightness",
"x": 940,
"y": 540,
"wires": [
[
"fab388f7835f3922"
]
]
},
{
"id": "9574accdb28de1dd",
"type": "debug",
"z": "f6f2187d.f17ca8",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 940,
"y": 840,
"wires": []
},
{
"id": "2e2f493a8804f601",
"type": "debug",
"z": "f6f2187d.f17ca8",
"name": "debug 4",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 160,
"y": 900,
"wires": []
},
{
"id": "8b15fa9e6ea94287",
"type": "change",
"z": "f6f2187d.f17ca8",
"name": "change serial naar Paal1",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "984db14d-dd32-47f1-8fe5-ce022f90f545\",\"third_serial_number\":\"38b8f85e-a0ef-44a5-8fa1-95b07473d289",
"fromt": "str",
"to": "a4c13872eb928cdd",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 210,
"y": 780,
"wires": [
[
"b982488ed0ef73aa"
]
]
},
{
"id": "6b7d215fe10834e4",
"type": "control-device",
"z": "f6f2187d.f17ca8",
"name": "paal 1",
"server": "47b82da33cd7c32b",
"list": "{\"type\":\"light\",\"deviceId\":\"a4c13872eb928cdd\",\"light\":{\"power\":\"on\",\"brightness\":\"\",\"type\":\"color-temperature\",\"colorOrTemp\":\"\",\"hslStr\":\"\"}}",
"category": "light",
"device": "a4c13872eb928cdd",
"action": "",
"x": 950,
"y": 760,
"wires": [
[]
]
},
{
"id": "b982488ed0ef73aa",
"type": "json",
"z": "f6f2187d.f17ca8",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 430,
"y": 780,
"wires": [
[
"34f68e9e4218ada7"
]
]
},
{
"id": "34f68e9e4218ada7",
"type": "switch",
"z": "f6f2187d.f17ca8",
"name": "brightness between 0 and 100",
"property": "payload.payload.brightness.brightness",
"propertyType": "msg",
"rules": [
{
"t": "btwn",
"v": "0",
"vt": "num",
"v2": "100",
"v2t": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 670,
"y": 780,
"wires": [
[
"6b7d215fe10834e4",
"9574accdb28de1dd"
]
]
},
{
"id": "47b82da33cd7c32b",
"type": "api-server",
"name": "iHost",
"ip": "ihost.local",
"ipaddr": "192.168.1.10",
"token": "e3ebbcda-5aa7-4057-a7d2-7f67a6c56d4e"
}
]
Regards Rick
@hiconkong @jiayu.gou hey do you mind taking a look?
Can anybody look at this?
Regards Rick
hey
I just got feedback from dev, and more info is needed. So could you please download the Node-Red log right after you control the device?
You can attach it here or Google Drive.
Thx in advance