syssi / philipslight

Xiaomi Philips Lights integration for Home Assistant
Apache License 2.0
70 stars 19 forks source link

Add philips.light.bceiling2 support #26

Open forhuan opened 4 years ago

forhuan commented 4 years ago

https://item.mi.com/product/10150.html?cfrom=search&selected=1192600006&pClass=c

syssi commented 4 years ago
# Properties
["power", "bright", "cct", "snm", "dv", "sw", "bl", "ms", "ac"];

# Methods

add_mb [item]
apply_fixed_scene [scene_num]
delay_off [0]
delay_off [int] # seconds
del_rc []
enable_ac [isOnStr])
enable_bl [isOnStr])
enable_mb [on ? 1 : 0])
enable_mibs [on ? 1 : 0])
get_band_period []
get_mb_mac []
get_mb_rssi []
get_props [props]
get_rc_mac []
get_switch_en []
set_band_period [int]
set_bricct [bri, cct]
set_bright [bri]
set_cct cct]
set_mb_rssi [value]
set_power [power]
set_scene_switch []
set_switch_en [on ? 1 : 0])
start_rc_pair []
stop_rc_pair []
forhuan commented 4 years ago

@syssi Outputs of these commands:

miiocli device --ip IP --token XXXXXXXXXXXXX info
Model: philips.light.bceiling2
Hardware version: esp32
Firmware version: 2.0.7
Network: {'localIp': '192.168.x.x', 'mask': '255.255.255.0', 'gw': '192.168.x.x'}
AP: {'ssid': 'xxxx', 'bssid': '40:31:3C:0E:xx:xx', 'rssi': -24, 'primary': 7}
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command get_prop "['power', 'bright', 'cct', 'snm', 'dv', 'sw', 'bl', 'ms', 'ac']"
['on', 100, 50, 1, 0, [[0, 1], [0, 3], [1, 1]], 1, 0]
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command get_switch_en 
[1]
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command get_rc_mac
 ['']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_power "['off']"
['ok']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_power "['on']"
['ok']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_cct "[1]"
['ok']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_cct "[35]"
['ok']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_cct "[36]"
['ok']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_cct "[100]"
['ok']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command get_prop "['power', 'bright', 'cct', 'snm', 'dv', 'sw', 'bl', 'ms', 'ac']"
['on', 100, 100, 0, 0, [[0, 1], [0, 3], [1, 1]], 1, 0]
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_power "['off']"
['ok']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command enable_ac "[1]"
['ok']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command enable_ac "[0]"
['ok']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command enable_bl "[1]"
['ok']
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command enable_bl "[0]"
['ok']
forhuan commented 4 years ago

Treating bceiling2 as ceiling works ok

ClearSeve commented 3 years ago

Has this been supported?

syssi commented 3 years ago

Not yet.

forhuan commented 3 years ago

Try this config may works

light:
  - platform: xiaomi_miio
    name: Room Light
    host: 192.168.x.x
    token: xxxxxxxxxxxxxxxxxxxxxxxxxxx
    model: philips.light.ceiling