-
Notifications
You must be signed in to change notification settings - Fork 490
Description
This is not exactly an issue, but I've been tinkering and noticed that python-broadlink supports LEDvance APM ceiling light with slight modifications.
Important Note :
This works only for LEDvance 4SMART+ WiFi Ceiling TW 24W (SKU : 4058075484887) which uses the "LEDVANCE APM SMART+ Wi-Fi" App and is based on Broadlink. There are a few other bulbs which uses the "LEDVANCE APM SMART+ Wi-Fi" app that I suspect will work but I do not have them to test. It will not work on lights/bulbs which uses the "LEDVANCE SMART+ Wi-Fi" and is based on Tuya platform.
These ceiling light has device code of 0x6498. Adding this device code to lb1 allows the light to be added into home assistant. Power on/off, changing brightness works flawlessly. Changing colour temperature works but it is reversed (i.e. increasing temperature in home assistant results in the bulb getting warmer and vice versa). Tried setting it to lb2 but it won't work when adding device.
Here are the steps I took.
- Add 0x6498 to lb1 (credit to https://community.home-assistant.io/t/broadlink-rm4c-modify-python-library/258914/4)
- Install and open SSH & Web Terminal addon
- type docker exec -it homeassistant /bin/bash
- Enter the command: cd /./usr/local/lib/python3.8/site-packages/broadlink
- Open the file using the command: vi init.py
- Inside the file Type “i” (This will start edition mode on the file).
- Under the section “Supported Types”, "lb1" add the line 0x6498: (LB1, “Broadlink”),
- Press ESC
- Type “:wq” and then press enter.
- Reboot HASSIO.
- Join light to wifi
- reset light by turning on and off 5 times
- Connect PC to light's AP "LEDVANCE_Smart"
- launch python and import broadlink
- call broadlink.setup('WIFI_SSID', 'WIFI_Passcode', 3)
- At this point, PC should drop from the "LEDVANCE_Smart" AP
- Configure light using python-broadlink
- At this point, PC should join back to your regular wifi ssid.
- In Python do this
- device = broadlink.hello('IP_of_Light")
- device.auth()
- device.set_lock(False)
- After the above is done, I was able to add a broadlink device using the IP of the light.
I suspect this may break when there is an update to python-broadlink in home-assistant.
Would appreciate if contributor(s) to this code can add 0x6498 into the supported device. (Bonus if the inverse colour temperature could be looked into. I would like to contribute but I'm not sure how to. I am happy to do any further testing with this type of light.