mattmattmatt / node-red-contrib-yeelight-compat-hue

💡 A Node-RED node for controlling Yeelight devices, compatible with node-red-contrib-node-hue flows.
https://flows.nodered.org/node/node-red-contrib-yeelight-compat-hue
MIT License
10 stars 12 forks source link

can't get a switch get working correct #21

Open bluenazgul opened 4 years ago

bluenazgul commented 4 years ago

image

[ { "id": "e5b6c0b3.71d14", "type": "ui_switch", "z": "f307e3dd.12879", "name": "", "label": "switch", "tooltip": "", "group": "c61bef92.7077c", "order": 32, "width": 0, "height": 0, "passthru": false, "decouple": "true", "topic": "", "style": "", "onvalue": "{\"on\":true}", "onvalueType": "json", "onicon": "", "oncolor": "", "offvalue": "{\"on\":false}", "offvalueType": "json", "officon": "", "offcolor": "", "x": 150, "y": 460, "wires": [ [ "3a9c9f74.3577a" ] ] }, { "id": "c0e29395.2817d", "type": "debug", "z": "f307e3dd.12879", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "x": 850, "y": 620, "wires": [] }, { "id": "66338d04.1fa5f4", "type": "yeelight-compat-hue-state", "z": "f307e3dd.12879", "name": "", "server": "24785fa0.88f95", "x": 400, "y": 560, "wires": [ [ "989ace7e.2cffb", "c0e29395.2817d" ] ] }, { "id": "3a9c9f74.3577a", "type": "yeelight-compat-hue-out", "z": "f307e3dd.12879", "name": "", "server": "24785fa0.88f95", "x": 660, "y": 460, "wires": [] }, { "id": "989ace7e.2cffb", "type": "function", "z": "f307e3dd.12879", "name": "", "func": "return { payload: msg.payload.state.on };", "outputs": 1, "noerr": 0, "x": 630, "y": 560, "wires": [ [ "e5b6c0b3.71d14", "c0e29395.2817d" ] ] }, { "id": "c61bef92.7077c", "type": "ui_group", "z": "", "name": "Kinderzimmer", "tab": "a19cee0b.5907d", "disp": false, "width": "6", "collapse": false }, { "id": "24785fa0.88f95", "type": "yeelight-compat-hue-config", "z": "", "hostname": "xxx.xxx.xxx.xxx", "port": "55443", "name": "Yeelight Stripe" }, { "id": "a19cee0b.5907d", "type": "ui_tab", "z": "", "name": "Kinderzimmer", "icon": "dashboard", "disabled": false, "hidden": false } ]

i dont know where I have the error, this "switch" setup works on other flows like it want it.

Since I use an Yeelight RGB Stripe that has an manual button too, i need tp read the status of the stripe and would like to change the "Node Red" switch to the correct status.