xiaomi_fan icon indicating copy to clipboard operation
xiaomi_fan copied to clipboard

Add yeelink.light.fancl2 (Yeelight 61W fixed ceiling fan light) support

Open jschonenberg opened this issue 3 years ago • 2 comments

Is it possible to add support for the Yeelight fixed ceiling fan light. It would be fine if support is initially limited to fan control.

jschonenberg avatar Mar 02 '21 17:03 jschonenberg

It looks like the device supports some miio commands and has miot-specs too:

https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:light:0000A001:yeelink-fancl2:2

syssi avatar Apr 10 '21 15:04 syssi

# https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:light:0000A001:yeelink-fancl2:2

Device 'urn:miot-spec-v2:device:light:0000A001:yeelink-fancl2:2': Light with 5 services

* Service siid 1: (Device Information): 4 props, 0 actions

        ## Properties ##
                siid 1: piid: 1 (Device Manufacturer): (string, unit: None) (acc: ['read'])
                siid 1: piid: 2 (Device Model): (string, unit: None) (acc: ['read'])
                siid 1: piid: 3 (Device Serial Number): (string, unit: None) (acc: ['read'])
                siid 1: piid: 4 (Current Firmware Version): (string, unit: None) (acc: ['read'])

* Service siid 2: (Light): 7 props, 1 actions

        ## Properties ##
                siid 2: piid: 1 (Switch Status): (bool, unit: None) (acc: ['read', 'write', 'notify'])
                siid 2: piid: 2 (Mode): (uint8, unit: none) (acc: ['read', 'write', 'notify'])
                        {'value': 0, 'description': 'Day'}
                        {'value': 1, 'description': 'Night'}
                siid 2: piid: 3 (Brightness): (uint8, unit: percentage) (acc: ['read', 'write', 'notify'])
                        Range: [1, 100, 1]
                siid 2: piid: 5 (Color Temperature): (uint16, unit: kelvin) (acc: ['read', 'write', 'notify'])
                        Range: [2700, 6500, 1]
                siid 2: piid: 6 (Flow): (uint8, unit: None) (acc: ['read', 'write', 'notify'])
                        {'value': 0, 'description': 'Auto'}
                siid 2: piid: 7 (Power Off Delay Time): (uint32, unit: minutes) (acc: ['read', 'write', 'notify'])
                        Range: [0, 180, 1]
                siid 2: piid: 8 (Left Time): (uint32, unit: minutes) (acc: ['read', 'notify'])
                        Range: [0, 180, 1]

        ## Actions ##
                siid 2: aiid 1 Toggle: in: [] -> out: []

* Service siid 3: (Fan): 7 props, 1 actions

        ## Properties ##
                siid 3: piid: 1 (Switch Status): (bool, unit: None) (acc: ['read', 'write', 'notify'])
                siid 3: piid: 2 (Fan Level): (uint8, unit: none) (acc: ['read', 'write', 'notify'])
                        {'value': 0, 'description': 'Level1'}
                        {'value': 1, 'description': 'Level2'}
                        {'value': 2, 'description': 'Level3'}
                        {'value': 3, 'description': 'Level4'}
                siid 3: piid: 7 (Mode): (uint8, unit: none) (acc: ['read', 'write', 'notify'])
                        {'value': 0, 'description': 'Normal-wind'}
                        {'value': 1, 'description': 'Natural-wind'}
                        {'value': 2, 'description': 'Reverse-wind'}
                        {'value': 3, 'description': 'Strong-wind'}
                        {'value': 4, 'description': 'Small-wind'}
                        {'value': 5, 'description': 'Sleep-wind'}
                siid 3: piid: 8 (Status): (uint8, unit: none) (acc: ['read', 'notify'])
                        {'value': 0, 'description': 'Idle'}
                        {'value': 1, 'description': 'Busy'}
                siid 3: piid: 9 (Device Fault): (uint8, unit: None) (acc: ['read', 'notify'])
                        {'value': 0, 'description': 'No faults'}
                siid 3: piid: 11 (Power Off Delay Time): (uint32, unit: minutes) (acc: ['read', 'write', 'notify'])
                        Range: [0, 720, 1]
                siid 3: piid: 12 (Left Time): (uint32, unit: minutes) (acc: ['read', 'notify'])
                        Range: [0, 720, 1]

        ## Actions ##
                siid 3: aiid 1 Toggle: in: [] -> out: []

* Service siid 4: (yl light 私有服务): 4 props, 9 actions

        ## Properties ##
                siid 4: piid: 1 (上电是否开灯): (uint8, unit: none) (acc: ['read', 'write', 'notify'])
                        {'value': 1, 'description': ''}
                        {'value': 2, 'description': ''}
                siid 4: piid: 2 (夜灯时间段(en, dly, em, eh, sm, sh)): (int64, unit: none) (acc: ['read', 'write', 'notify'])
                        Range: [0, 281474976710655, 1]
                siid 4: piid: 4 (smart-switch-en): (bool, unit: none) (acc: ['read', 'write', 'notify'])
                siid 4: piid: 5 (miband-sleep-ctrl): (uint8, unit: none) (acc: ['read', 'write', 'notify'])
                        {'value': 0, 'description': 'Trun Off MiBand Ctrl'}
                        {'value': 1, 'description': 'Trun Off Light By MiBand When Sleep'}
                        {'value': 2, 'description': 'Trun Off Fan By MiBand When Sleep'}
                        {'value': 3, 'description': 'Trun Off Light And Fan By MiBand When Sleep'}
                        {'value': 4, 'description': 'Turn On Sleep-Wind Mode When Sleep'}
                        {'value': 5, 'description': 'Trun Off Light And Turn On Sleep-Wind Mode When Sleep'}

        ## Actions ##
                siid 4: aiid 2 亮度切换(智能联动): in: [] -> out: []
                siid 4: aiid 3 色温切换(智能联动): in: [] -> out: []
                siid 4: aiid 4 风扇档位切换(智能联动): in: [] -> out: []
                siid 4: aiid 5 birghtness-increase: in: [] -> out: []
                siid 4: aiid 6 brightness-decrease: in: [] -> out: []
                siid 4: aiid 7 ct-increase: in: [] -> out: []
                siid 4: aiid 8 ct-decrease: in: [] -> out: []
                siid 4: aiid 9 on-or-bright-cycle: in: [] -> out: []
                siid 4: aiid 10 on-or-ct-cycle: in: [] -> out: []

* Service siid 5: (yl fan 私有服务): 6 props, 1 actions

        ## Properties ##
                siid 5: piid: 1 (上电是否开风扇): (uint8, unit: none) (acc: ['read', 'write', 'notify'])
                        {'value': 0, 'description': ''}
                        {'value': 1, 'description': ''}
                siid 5: piid: 2 (): (uint32, unit: none) (acc: ['read', 'write', 'notify'])
                        Range: [0, 4294967295, 1]
                siid 5: piid: 3 (smart-switch-en): (bool, unit: none) (acc: ['read', 'write', 'notify'])
                siid 5: piid: 4 (fan-speed): (uint8, unit: percentage) (acc: ['read', 'write', 'notify'])
                        Range: [1, 100, 1]
                siid 5: piid: 5 (sleep-delay-off): (uint16, unit: minutes) (acc: ['read', 'write', 'notify'])
                        Range: [0, 720, 1]
                siid 5: piid: 6 (mode-for-restore): (uint8, unit: none) (acc: ['read', 'notify'])
                        Range: [0, 2, 1]

        ## Actions ##
                siid 5: aiid 1 风扇档位切换(智能联动): in: [] -> out: []

syssi avatar May 08 '21 13:05 syssi