Open sebastiannielsen opened 1 month ago
Discussed many times, at the moment there is no way to properly and fully configure this bulb via MQTT. At least I don't know how to do it. If someone creates the correct configuration we can add it to the script, I won't work on it because my bulb died.
Actually tried out the script in the PR and it works out well: https://github.com/bieniu/ha-shellies-discovery/pull/585
It even works with the effects values.
So I say, you should work on getting that PR merged.
Hello bieniu, regarding this open issue, I have an old version of your script (the version is not documented, but my file is dated May 2023), where there are entries concerning this device type: MODEL_SHELLYBULB_ID = "SHBLB-1" # Shelly Bulb MODEL_SHELLYBULB_PREFIX = "shellybulb"
MODEL_SHELLYBULBRGBW_ID = "SHCB-1" # Shelly DUO RGBW MODEL_SHELLYBULBRGBW_PREFIX = "shellycolorbulb"
And further down of course the appropriate codings... old_shellies_discovery.txt
De Facto, I have (did have...) 2 of these bulbs in my Home-assistant. I deleted one and with the latest version of your script it will of course no longer get re-installed. The original entry is there and working.
Somewhere in the works your coding seems to have got dropped...
Hope this info helps, thanks for your great work on making all this so simple!
Is your feature request related to a problem? Please describe. Duo bulb not supported
Describe the solution you'd like Support for Duo Bulb
Additional context
Have tried with the following code, but it isn't working right, power measurement works fine, but not light switch:
MODEL_SHELLYCB = f"{ATTR_SHELLY} Color Bulb" MODEL_SHELLYCB_ID = "SHCB-1" # Shelly Color Bulb Duo RGB MODEL_SHELLYCB_PREFIX = "shellycolorbulb"
if model_id == MODEL_SHELLYCB_ID or dev_id_prefix == MODEL_SHELLYCB_PREFIX:
Here is a example of MQTT status its spitting out:
Meddelande 270 mottaget på shellies/shellycolorbulb-3494546E7DE6/color/0/status vid 23:13 : { "ison": true, "source": "mqtt", "has_timer": false, "timer_started": 0, "timer_duration": 0, "timer_remaining": 0, "mode": "color", "red": 14, "green": 255, "blue": 242, "white": 0, "gain": 100, "temp": 3000, "brightness": 100, "effect": 0, "transition": 0 }
(it spit out on color/0/status regardless of its in color or white mode) White mode:
Meddelande 279 mottaget på shellies/shellycolorbulb-3494546E7DE6/color/0/status vid 23:14 : { "ison": true, "source": "http", "has_timer": false, "timer_started": 0, "timer_duration": 0, "timer_remaining": 0, "mode": "white", "red": 14, "green": 255, "blue": 242, "white": 0, "gain": 100, "temp": 3000, "brightness": 100, "effect": 0, "transition": 0 }
It also spits out the following statuses, why energy meter works:
Meddelande 284 mottaget på shellies/shellycolorbulb-3494546E7DE6/color/0 vid 23:14 : on QoS: 0 - Retain: false Meddelande 283 mottaget på shellies/shellycolorbulb-3494546E7DE6/light/0/energy vid 23:14 : 135 QoS: 0 - Retain: false Meddelande 282 mottaget på shellies/shellycolorbulb-3494546E7DE6/light/0/power vid 23:14 : 8.59 QoS: 0 - Retain: false
It also seems to expect a plain "on" or "off" payload (no JSON) on: shellies/shellycolorbulb-3494546E7DE6/color/0/command
to turn off and on.
If seems to require, to set color, a set JSON payload on shellies/shellycolorbulb-3494546E7DE6/color/0/set
With the following content: { "mode": "color", "red": 0, ## 0-255 "green": 0, ## 0-255 "blue": 0, ## 0-255 "white": 0, ## 0-255 "gain": 100, ## 0-100 "effect": 0 ## 0 = no effect, 1 = meteror shower, 2 = gradual change, 3 = flash } OR { "mode": "white", "temp": 4750, ## 3000 to 6500 "brightness": 100 ## 0-100 }