Control your Hao Deng Lights mesh lights from Home Assistant! This integration allows you to control the above lights that you'd normally use through the Hao Deng App. It might work if you use the Magic Light BLE or Magic Home Pro app as well (see below).
- This integration is in beta. Please open an issue if you have any problems!
- This integration uses the cloud. If you don't have a wifi bridge, this won't work (ie, if you can control your lights with the Hao Deng app when you're away from home, you're good. If you have to be at your house to use it, you're not good)
- As of right now, lights are only read in on server start. So when you add or modify lights (including adding them to groups) they will not be automatically updated and you'll need to restart home assistant (this is definitely a feature coming, but we're in beta right now!)
- The Magic Cloud API doesn't seem to be able to handle more than 5 or so light updates at a time. This can make the lights stutter out of sync when updating a lot at once. Try not to update too many at once from Home Assistant. If you need to update a lot at once, create a group in the Hao Deng app. This will show up as a single light Home Assistant (you'll need to restart HA after you create the group in the app).
- If this integration works for you, please hit the star button up there. It gives me the warm fuzzies to know this code is benefitting other people! :)
- I can only test with the lights pictured above. I can't guarantee it'll work with any other type of light.
Do you have HACS installed?
- Add Hao Deng Cloud Component as custom repository.
- Go to:
HACS->Integrations-> Click menu in right top -> Custom repositories - A modal opens
- Fill https://github.com/Pharylon/hao_deng_cloud in the input in the footer of the modal
- Select
integrationin category select box - Click Add
- Go to:
- Search integrations for Hao Deng Cloud
- Click
Install - Restart Home Assistant
- Setup Hao Deng Cloud integration using Setup instructions below
- Install this platform by creating a
custom_componentsfolder in the same folder as your configuration.yaml, if it doesn't already exist. - Create another folder
hao_deng_cloudin thecustom_componentsfolder. Copy all files fromcustom_components/hao_deng_cloudinto thehao_deng_cloudfolder.
- In Home Assistant click on
Settings - Click on
Devices & services - Click on
+ Add integration - Search for and select
Hao Deng Cloud - Enter the
usernameandpasswordyou use in the Hao Deng app - Once the system connects, your lights will show up as available and can be controlled from HA
- Enjoy :)
- Added support for multiple mesh places. As part of this, device IDs will change in Home Assistant. You'll need to delete the old ones!
- Gropus of lights in the Hao Deng app will now be imported as lights into Home Assistant! After you have your groups set up in the Hao Deng app, reboot home assistant to pick them up!
This integration requires the cloud
- Make sure it works through the Hao Deng app (this integration does not work unless you can control your lights through that app) when bluetooth is off, or you're out of bluetooth range of your lights
- Make sure your country code is correct
- Make sure you have the newest version of this integration installed
- Restart your server once if you've made any chages to your lights recently
- Before submitting an issue, add
custom_components.hao_deng_cloud: debugto theloggerconfig in youconfiguration.yaml:
logger: default: error logs: custom_components.hao_deng_cloud: debug
Restart Home Assistant for logging to begin.
Logs can be found under Settings - System - Logs - Home Assistant Core
Be sure to click Load Full Logs in order to retrieve all logs and submit those with any issues.
If you use the Magic Light BLE or Magic Home Pro app, this might work. But I don't know, I don't use that app so I haven't tested it. My understand is they're all just reskinned versions of the Hao Deng app, but again, I have no first-hand experience using them. If you use either of those apps and this integration doesn't work, drop me a line and I can take a look at adding support. And if you do use them and they do work, let me know so I can update this ReadMe!
Credit to
@SleepyNinja0o started work on a bluetooth integration and had to give it up as it was unstable. However, I used his authentication
code and got a lot of other helpful tidbits from his repo. Huge shotout to him for all his hard work!