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 (I, personally, have 16 of these in my Great Room so I've really noticed!). To get around this issue, use the Hao Deng app to add your lights to groups that mirror the groups and rooms in your home. This allows the integration to "batch" those lights in a single group and makes everything flow better. For insance, I have a light group in Home Assisstant for my 16 Great Room lights. I put all those lights in a group in the Hao Deng app as well, and now they can be controlled in sync much better!
- 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! :)
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
integration
in 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_components
folder in the same folder as your configuration.yaml, if it doesn't already exist. - Create another folder
hao_deng_cloud
in thecustom_components
folder. Copy all files fromcustom_components/hao_deng_cloud
into thehao_deng_cloud
folder.
- In Home Assistant click on
Settings
- Click on
Devices & services
- Click on
+ Add integration
- Search for and select
Hao Deng Cloud
- Enter you
username
andpassword
you also use in the Hao Deng app - The system will download you light list and add them to Home Assistant
- Once the system could connect to one of the lights your lights will show up as available and can be controlled from HA
- Enjoy :)
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: debug
to thelogger
config 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!