Node to control color bulb?

I got a few Feit color bulbs from Costco flashed tasmota it. Is there any node that I can use to control the brightness, warmness, and color? I guess the call service should work too but is there any document what exactly payload I need to send? if there is specific node it might be easier?
Thanks!

Yes, but it is not simple.

I have a couple of similar bulbs.

There is a tasmota node, but it won't make it any easier to control the bulb. It is more for connecting to the devices rather than their control.

What you need is a slider node. Set the limits and send the value to the bulb.

AFAIK, it is just a number from 1 to 100 (Percentage of brightness)

But you have to specify the channel / name of the bulb.

Not too difficult.
Sorry: I know I said it isn't simple at the start but then said it wasn't too difficult.

It is mid-range, would be a better description.

1 Like

disclaimer: This works on my set up. You WILL need to change things.

Here is a flow I have to control one of my bulbs.

You will have to install the tasmota node when you import the flow.

[{"id":"a2a58c3e.075588","type":"Tasmota Switch","z":"9245b569.9f881","broker":"8a2e80be.f7c928","device":"BULB-1","name":"","fullTopic":"","cmndPrefix":"","statPrefix":"","telePrefix":"","outputs":"1","onValue":"","offValue":"","toggleValue":"","x":870,"y":1750,"wires":[[]]},{"id":"3bef3b47.3f877c","type":"inject","z":"9245b569.9f881","name":"On","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":590,"y":1750,"wires":[["db5171cf.747318"]]},{"id":"7ba6a8dc.1de028","type":"inject","z":"9245b569.9f881","name":"Off","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":590,"y":1790,"wires":[["db5171cf.747318"]]},{"id":"db5171cf.747318","type":"change","z":"9245b569.9f881","name":"Topic","rules":[{"t":"set","p":"topic","pt":"msg","to":"switch1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":1750,"wires":[["a2a58c3e.075588"]]},{"id":"8569b986.16993","type":"comment","z":"9245b569.9f881","name":"Working.","info":"","x":740,"y":1710,"wires":[]},{"id":"fbe2b3b2.f7dab8","type":"ui_button","z":"9245b569.9f881","name":"1","group":"9f4e1e5d.a65d68","order":1,"width":"2","height":"2","passthru":false,"label":"{{msg.payload}}","tooltip":"1","color":"","bgcolor":"grey","icon":"","payload":"X","payloadType":"str","topic":"","x":230,"y":1700,"wires":[["ec964c4a.67f25"]]},{"id":"ec964c4a.67f25","type":"function","z":"9245b569.9f881","name":"push button toggle","func":"let l = context.get('state') || 0;\nlet msg1 = {};\nif (msg.payload == 'X')\n{\n    l = (l + 1) % 2;\n    context.set('state',l);\n}\nif (l === 0)\n{\n    msg.payload = '<font color = \"orange\" i class=\"fa fa-lightbulb-o fa-3x\"></i>';\n    //msg1.payload = \"off\";\n    msg1.payload = false;\n}\nelse\nif (l === 1)\n{\n    //\n    msg.payload = '<font color = \"lime\" i class=\"fa fa-lightbulb-o fa-3x\"></i>';\n    //msg1.payload = \"on\";\n    msg1.payload = true;\n}\nreturn [msg,msg1];","outputs":2,"noerr":0,"x":270,"y":1740,"wires":[["fbe2b3b2.f7dab8"],["e79678cf.916af8","db5171cf.747318"]]},{"id":"e79678cf.916af8","type":"debug","z":"9245b569.9f881","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":250,"y":1780,"wires":[]},{"id":"f10a148a.a60cd8","type":"debug","z":"9245b569.9f881","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":230,"y":1830,"wires":[]},{"id":"29d3ae4e.4d9b3a","type":"link in","z":"9245b569.9f881","name":"","links":["72645424.bc051c"],"x":95,"y":1740,"wires":[["fbe2b3b2.f7dab8","f10a148a.a60cd8"]]},{"id":"ec06883f.ed137","type":"mqtt in","z":"9245b569.9f881","name":"","topic":"stat/BULB-1/RESULT/#","qos":"2","datatype":"auto","broker":"8a2e80be.f7c928","x":770,"y":2000,"wires":[["2dc2fe50.9ed3ea","ce7ee904.e5097"]]},{"id":"ce7ee904.e5097","type":"json","z":"9245b569.9f881","name":"","property":"payload","action":"","pretty":false,"x":970,"y":2000,"wires":[["10ee3463.4a9b3c","be76c740.d742d"]]},{"id":"10ee3463.4a9b3c","type":"switch","z":"9245b569.9f881","name":"","property":"payload.POWER","propertyType":"msg","rules":[{"t":"eq","v":"OFF","vt":"str"},{"t":"eq","v":"ON","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1140,"y":2000,"wires":[["7cb59f56.5b768"],["1d9278d0.a920bf"]]},{"id":"7cb59f56.5b768","type":"change","z":"9245b569.9f881","name":"Off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload","pt":"msg","to":"<font color = \"black\" i class=\"fa fa-lightbulb-o fa-3x\"></i>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1310,"y":1970,"wires":[["72645424.bc051c","f2a1838c.e5eef"]]},{"id":"1d9278d0.a920bf","type":"change","z":"9245b569.9f881","name":"On","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload","pt":"msg","to":"<font color = \"white\" i class=\"fa fa-lightbulb-o fa-3x\"></i>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1310,"y":2020,"wires":[["72645424.bc051c","f2a1838c.e5eef"]]},{"id":"72645424.bc051c","type":"link out","z":"9245b569.9f881","name":"","links":["ba7e2e31.0b0bb","29d3ae4e.4d9b3a"],"x":1415,"y":2000,"wires":[]},{"id":"a99f32b8.fe0a7","type":"inject","z":"9245b569.9f881","name":"Off","topic":"press","payload":"<font color = \"black\" i class=\"fa fa-lightbulb-o fa-3x\"></i><font>","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":"0.2","x":90,"y":1650,"wires":[["fbe2b3b2.f7dab8","297d03e7.ce12f4"]]},{"id":"8a2e80be.f7c928","type":"mqtt-broker","z":"","name":"MQTT host","broker":"192.168.0.99","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"ARDUINO_STATUS","birthQos":"2","birthPayload":"connected","willTopic":"ARDUINO_STATUS","willQos":"0","willPayload":"disconnected"},{"id":"9f4e1e5d.a65d68","type":"ui_group","z":"","name":"Bulbs","tab":"a0ef1d6c.c0bc1","order":1,"disp":true,"width":"6","collapse":false},{"id":"a0ef1d6c.c0bc1","type":"ui_tab","z":"","name":"Real World Control (Relays etc)","icon":"dashboard","disabled":false,"hidden":false}]

EDITED FLOW!
Make sure you have the latest. Silly mistake in the switch node. Fixed now.

It doesn't have the slider in there yet.

But I hope with that flow to get you started, you can put in the slider to control the brightness.

(I've tried a bit and can't but I admit it: I'm dumb)

1 Like

thanks for the idea!

This also may be helpful for you:

Tasmota chat room
(I hope that works)

They may be able to help with exactly what you need to send to set the brightness.

1 Like

Oh, here is one I bashed up that works. Though the slider is controlled by the up/down arrows. (Don't know why)

(Solution: Tick the "only on release" in the slider node)

[{"id":"d04bc211.6306e","type":"ui_slider","z":"9245b569.9f881","name":"","label":"slider","tooltip":"","group":"9f4e1e5d.a65d68","order":3,"width":0,"height":0,"passthru":false,"outs":"all","topic":"","min":0,"max":"100","step":1,"x":180,"y":2090,"wires":[["5856c8ac.5a8098"]]},{"id":"5856c8ac.5a8098","type":"mqtt out","z":"9245b569.9f881","name":"","topic":"cmnd/BULB-1/dimmer","qos":"","retain":"","broker":"8a2e80be.f7c928","x":360,"y":2130,"wires":[]},{"id":"9f4e1e5d.a65d68","type":"ui_group","z":"","name":"Bulbs","tab":"a0ef1d6c.c0bc1","order":1,"disp":true,"width":"6","collapse":false},{"id":"8a2e80be.f7c928","type":"mqtt-broker","z":"","name":"MQTT host","broker":"192.168.0.99","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"ARDUINO_STATUS","birthQos":"2","birthPayload":"connected","willTopic":"ARDUINO_STATUS","willQos":"0","willPayload":"disconnected"},{"id":"a0ef1d6c.c0bc1","type":"ui_tab","z":"","name":"Real World Control (Relays etc)","icon":"dashboard","disabled":false,"hidden":false}]

Of course you will have to change the MQTT broker and names used.

1 Like

Did the flow work?

looks it is dashboard node? I haven't had any dashboard stuff on node-red yet, don't know how to make it work.

I ended up just send payload to a topic one by one, if I need 80% on red, in 2 steps, send payload 80 to topic bulb1/cmnd/dimmer, and send 255,0,0 to topic bulb1/cmnd/color. seems worked.

Is there way to send multiple payloads in one step?

I made it a dashboard node only because I wasn't sure how you wanted to enter the data, and a slider gives a lot better control of what is sent.

Rather than having a bunch of inject nodes sending different values. Though I guess I could have put 3 inject nodes sending 30, 50 and 80. You would have seen the light change brightness.

You can replace the slider with anything you want, so long as the output is a number and not a string.

But I'm glad you got it working.

it is triggered by other event, say if there is motion at front door, set the outside light brightness to 100%, after no motion 30 seconds, set it back to 40%.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.