philipslight icon indicating copy to clipboard operation
philipslight copied to clipboard

Add philips.light.cbulb support

Open elordan opened this issue 4 years ago • 17 comments

elordan avatar Nov 12 '19 13:11 elordan

Could you try to add model: philips.light.bulb to your HA configuration. Does it work out of the box? Do you think this bulb has additional features compared to the philips.light.bulb?

syssi avatar Nov 12 '19 13:11 syssi

I have the same problem and adding model: philips.light.bulb works, but without any ability to change bulb color.

malbul avatar Nov 12 '19 22:11 malbul

After adding "model: philips.light.bulb", it works. But it doesn't have the option to change RGB color like malbul said.

elordan avatar Nov 13 '19 13:11 elordan

Supported properties:

"get_prop", ["power", "snm", "bright", "cct", "cid", "sta"]
"get_prop", ["power", "snm", "sta", "bright", "cct", "cid"]

Supported methods:

"set_power", ["on"]
"set_power", ["off"]
"set_cid", [0]
"set_cid", [h] // h of hsv (0...360 degree)
"set_bright", [_this2.state.temp] # 1...100
"apply_fixed_scene", [sceneNumber] # 1-4
"set_bricct", cctSceneValue
"set_bricid", colorSceneValue
"set_cct", [_this2.state.temp] # 1882...7000 
"get_switch_en", []
"set_switch_en", [parseInt(setParams)]
"save_scene", [param[0], param[1], param[2], param[3], param[4], param[5], param[6], param[7], param[8], param[9], param[10], param[11], param[12]]
"get_scene", []

The property cid and the setter set_cid should be implemented to provide full device support.

syssi avatar Nov 13 '19 23:11 syssi

I have a cbulb too. As elordan and mabul said, when change model to philips.light.bulb, it works, can be turned on/off, change brightness, but cannot change rgb color. @syssi do you need some more info to add support for cbulb?

johnskiller avatar Dec 06 '19 03:12 johnskiller

Cool! I will provide some commands later the week for testing.

syssi avatar Dec 06 '19 05:12 syssi

"get_prop", ["power", "snm", "sta", "bright", "cct", "cid"] returns: ['on', 0, 100, 3953, -1, 0]

how to get all properties?

johnskiller avatar Dec 06 '19 12:12 johnskiller

You've already retrieved all properties?!

Does the device support saturation? cid looks like a value between 0 and 360 (the hue part of HSV). If you set "color red" it's possible to add white color by moving the color picker more to the center to get a "light red"?

syssi avatar Dec 07 '19 11:12 syssi

No,cannot do that. There’re 4 icons in MIJIA app: on/off switch, color palette, brightness and color temperature. Color palette only changes hue, brightness only changes L or V of HSL/HSV, no way to change saturation. Color temperature only applies to white color

johnskiller avatar Dec 10 '19 14:12 johnskiller

I mean cannot do that in MIJIA app. Maybe raw command using miio_cli?

johnskiller avatar Dec 10 '19 14:12 johnskiller

Any updates?

malbul avatar Jan 22 '20 00:01 malbul

sorry, I'm away from home for about 2 months.

johnskiller avatar Mar 12 '20 09:03 johnskiller

any updates here?

kuradi avatar Jul 29 '20 20:07 kuradi

@syssi

Supported properties:

"get_prop", ["power", "snm", "bright", "cct", "cid", "sta"]
"get_prop", ["power", "snm", "sta", "bright", "cct", "cid"]

Supported methods:

"set_power", ["on"]
"set_power", ["off"]
"set_cid", [0]
"set_cid", [h] // h of hsv (0...360 degree)
"set_bright", [_this2.state.temp] # 1...100
"apply_fixed_scene", [sceneNumber] # 1-4
"set_bricct", cctSceneValue
"set_bricid", colorSceneValue
"set_cct", [_this2.state.temp] # 1882...7000 
"get_switch_en", []
"set_switch_en", [parseInt(setParams)]
"save_scene", [param[0], param[1], param[2], param[3], param[4], param[5], param[6], param[7], param[8], param[9], param[10], param[11], param[12]]
"get_scene", []

The property cid and the setter set_cid should be implemented to provide full device support.

Hi, how can you get properties and methods for a new miio device? Or is it like something from the firmware?

Sergey-SRG avatar Nov 07 '20 14:11 Sergey-SRG

It's extracted from the android app (mihome react native plugin).

syssi avatar Nov 07 '20 15:11 syssi

@syssi Thanks for the tip, I don't use the app at all and forgot about it;)

Sergey-SRG avatar Nov 07 '20 18:11 Sergey-SRG

Any progress?

Art3mS1d avatar Apr 25 '21 01:04 Art3mS1d