# Pairing DIY Hue with Home Assistant

**URL:** <https://diyhue.discourse.group/t/pairing-diy-hue-with-home-assistant/251>\
**Category:** Support\
**Created:** [January 26, 2021, 8:34pm UTC](https://diyhue.discourse.group/t/pairing-diy-hue-with-home-assistant/251 "2021-01-26T20:34:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![YKing](https://avatars.discourse-cdn.com/v4/letter/y/5daacb/32.png) [@YKing](https://diyhue.discourse.group/u/YKing)\
**Post date:** [January 26, 2021, 8:34pm UTC](https://diyhue.discourse.group/t/pairing-diy-hue-with-home-assistant/251/1 "2021-01-26T20:34:26Z")

</div>

Hello everyone.  
I installed DIYhue on a raspberry Pi and on the same Pi Home Assistant.  
I followed the tutorial but i cannot find the lamps included on Home Assistant.  
I also had to edit the config.json because i had no Home Assistant entry, so it looks like this:  
“emulator”: {  
“alarm”: {  
“email”: “”,  
“lasttriggered”: 100000,  
“on”: false  
},  
“homeassistant”: {  
“enabled”: true,  
“homeAssistantIncludeByDefault”: true,  
“homeAssistantIp”: “127.0.0.1”,  
“homeAssistantPort”: 8123,  
“homeAssistantToken”: “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”  
},  
“lights”: {},  
“mqtt”: {  
“discoveryPrefix”: “homeassistant”,  
“enabled”: false,  
“mqttPassword”: “”,  
“mqttPort”: “1883”,  
“mqttServer”: “mqtt”,  
“mqttUser”: “”

The DIY Server starts up fine and runs but cannot find any components at all

---

<div class="post-metadata">

**Author:** ![wiggy](https://avatars.discourse-cdn.com/v4/letter/w/46a35a/32.png) [@wiggy](https://diyhue.discourse.group/u/wiggy)\
**Post date:** [February 7, 2021, 12:51pm UTC](https://diyhue.discourse.group/t/pairing-diy-hue-with-home-assistant/251/2 "2021-02-07T12:51:20Z")

</div>

Hey,

I had the same thing - no homeassistant object in config.json. I added it, just like the previous poster, and no home assistant lights are discovered.

I enabled debug logging in diyhue, and it doesn’t seem like anything to do with home assistant is ever called. I.e., I go to /scan and can see discovery for other services, but not home assistant -

> ```
> 2021-02-07 13:39:08,906 - root - DEBUG - shelly: <discover> invoked!
> 2021-02-07 13:39:08,917 - root - DEBUG - ESPHome: <discover> invoked!
> 2021-02-07 13:39:08,931 - root - INFO - MQTT discovery called
> 2021-02-07 13:39:08,941 - root - DEBUG - Hyperion: <discover> invoked!
> 2021-02-07 13:39:09,648 - root - DEBUG - Sending M-Search response to 10.2.0.202
> 2021-02-07 13:39:11,906 - root - DEBUG - Yeelight search end
> 
> ```

I set an invalid IP address for home assistant in config.json, restarted, and there’s no error on scanning. I changed the title of the object in config.json to “zzfail” and there’s no mention of this either.

I’ve no idea what I’m doing but it looks like invalid emulators are ignored, and “homeassistant” is an invalid emulator.

edit: I see the homeassistant object gets recreated but it still seems to be ignored.

edit edit: Finally got it, I think. I need to be running a DEV version. All fine now. Sorry!

---

<div class="post-metadata">

**Author:** ![ryan780](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/ryan780/32/9_2.png) [@ryan780](https://diyhue.discourse.group/u/ryan780)\
**Post date:** [February 22, 2021, 10:52pm UTC](https://diyhue.discourse.group/t/pairing-diy-hue-with-home-assistant/251/3 "2021-02-22T22:52:37Z")

</div>

Does the connection from HA use the Hue Cloud connection or the Hue Local hub connection? If it uses the local connection, you should be able to set it up the same way you would a genuine hue hub. The HTTP calls it recognizes are identical. That’s kinda the whole point.

---

<div class="post-metadata">

**Author:** ![ministryofsillywalks](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/ministryofsillywalks/32/149_2.png) [@ministryofsillywalks](https://diyhue.discourse.group/u/ministryofsillywalks)\
**Post date:** [March 15, 2021, 12:05pm UTC](https://diyhue.discourse.group/t/pairing-diy-hue-with-home-assistant/251/4 "2021-03-15T12:05:48Z")

</div>

I have exactly the same issue.  
What DEV version did you have to switch to?  
I’m running DIYhue in docker  
diyhue/core:latest

---

<div class="post-metadata">

**Author:** ![wiggy](https://avatars.discourse-cdn.com/v4/letter/w/46a35a/32.png) [@wiggy](https://diyhue.discourse.group/u/wiggy)\
**Post date:** [March 15, 2021, 12:19pm UTC](https://diyhue.discourse.group/t/pairing-diy-hue-with-home-assistant/251/5 "2021-03-15T12:19:31Z")

</div>

Hi,

I switched from diyhue/core:latest to diyhue/core:amd64-dev.

I’d be curious to know where I missed this in the documentation.

---

<div class="post-metadata">

**Author:** ![ministryofsillywalks](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/ministryofsillywalks/32/149_2.png) [@ministryofsillywalks](https://diyhue.discourse.group/u/ministryofsillywalks)\
**Post date:** [March 15, 2021, 12:22pm UTC](https://diyhue.discourse.group/t/pairing-diy-hue-with-home-assistant/251/6 "2021-03-15T12:22:34Z")

</div>

thanks for the fast reply.  
I also found no mention of this in the docs.

---

<div class="post-metadata">

**Author:** ![Mevel](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/mevel/32/34_2.png) [@Mevel](https://diyhue.discourse.group/u/Mevel)\
**Post date:** [March 24, 2021, 8:05pm UTC](https://diyhue.discourse.group/t/pairing-diy-hue-with-home-assistant/251/7 "2021-03-24T20:05:06Z")

</div>

diyHue has been updated now from dev to master.

Homeassistant integration is now part of the default diyHue Setup
