# Problem with HA Integration - Offline if off

**URL:** <https://diyhue.discourse.group/t/problem-with-ha-integration-offline-if-off/667>\
**Category:** Support\
**Tags:** diyhue\
**Created:** [November 30, 2023, 9:46am UTC](https://diyhue.discourse.group/t/problem-with-ha-integration-offline-if-off/667 "2023-11-30T09:46:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaigame](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kaigame](https://diyhue.discourse.group/u/kaigame)\
**Post date:** [November 30, 2023, 9:46am UTC](https://diyhue.discourse.group/t/problem-with-ha-integration-offline-if-off/667/1 "2023-11-30T09:46:50Z")

</div>

Hi all,

having a bit of an issue with Diyhue+Home Assistant at the moment, which prevents me from using it currently.

When configured, all of my lights appear as offline, all of those lights are working within HA jut fine.  
All of the HA lights appear offline, it seems to be that when the lights are off, they are offline:

2023-11-29 12:48:08,187 - services.stateFetch - INFO - start lights sync  
2023-11-29 12:48:08,187 - services.stateFetch - WARNING - Kitchen is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Living Room is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Lamp is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Bathroom is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Upstairs is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Bedroom is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Entrance is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Light: Kitchen Main is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Living Room Light 4 is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Living Room Light 5 is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Living Room Light 3 is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Living Room Light 2 is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Entrance Light is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Bedroom Light 1 is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Bedroom Light 2 is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Stairs Light is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Bathroom Light is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Lamp Light 3 is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Lamp Light 2 is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Lamp Light 1 is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,190 - services.stateFetch - WARNING - Kitchen Light 2 is unreachable: ‘NoneType’ object is not subscriptable  
2023-11-29 12:48:08,190 - services.stateFetch - WARNING - Living Room Light 1 is unreachable: ‘NoneType’ object is not subscriptable

It looks like this has to do with the Null values within the HA entities.

Any ideas?

---

<div class="post-metadata">

**Author:** ![victorize](https://avatars.discourse-cdn.com/v4/letter/v/7ba0ec/32.png) [@victorize](https://diyhue.discourse.group/u/victorize)\
**Post date:** [December 6, 2023, 4:44am UTC](https://diyhue.discourse.group/t/problem-with-ha-integration-offline-if-off/667/2 "2023-12-06T04:44:35Z")

</div>

I am experiencing the exact same error in my logs.  
Zigbee lights still works flawless on ZHA in HA but trying to use DiyHue and Hue Essentials is unusable at this point or extremely unstable.  
Nothing has changed except HA updates a few days ago. HA 2023.11.3

So not really sure what to troubleshoot. Reinstalled DiyHue multiple times but as soon as you add any lights it starts misbehaving.

---

<div class="post-metadata">

**Author:** ![kaigame](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kaigame](https://diyhue.discourse.group/u/kaigame)\
**Post date:** [December 6, 2023, 12:22pm UTC](https://diyhue.discourse.group/t/problem-with-ha-integration-offline-if-off/667/3 "2023-12-06T12:22:48Z")

</div>

Something must have changed between DIYHue and HA, but i’ve got no idea what, i’m no programmer 🙂

There seem to be several reports of this now, but no fix as of yet.

When the lights do ‘work’ for me, i can turn them on and off, and only adjust the colour via the hue elements preconfigured scenes, brightness and colour control do not work at all.

---

<div class="post-metadata">

**Author:** ![victorize](https://avatars.discourse-cdn.com/v4/letter/v/7ba0ec/32.png) [@victorize](https://diyhue.discourse.group/u/victorize)\
**Post date:** [December 9, 2023, 3:39am UTC](https://diyhue.discourse.group/t/problem-with-ha-integration-offline-if-off/667/4 "2023-12-09T03:39:53Z")

</div>

Where did you see other reports of this issue? Your post with your logs is the first time that I came across someone mentioning this. Didn’t see any mention on the GitHub Issues tab.

---

<div class="post-metadata">

**Author:** ![kaigame](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kaigame](https://diyhue.discourse.group/u/kaigame)\
**Post date:** [December 9, 2023, 5:26pm UTC](https://diyhue.discourse.group/t/problem-with-ha-integration-offline-if-off/667/5 "2023-12-09T17:26:16Z")

</div>

> <https://github.com/diyhue/diyHue/issues/916>
>
> \### Issue does not already exist?
> 
> No, I did search
> 
> \### Select Environment
> …
> 
> Docker
> 
> \### Home Assistant related?
> 
> Yes
> 
> \### Description
> 
> I setup a connection between HA using the local ip, token and port. When I scan the following error comes up, indicating an error not in the connection but in the underlying setup. Could this be because of the type of lights I use? Some of them only have on-off
> 
> \### Errorlog:
> 
> \`\`\`
> scan for light
> 2023-07-09 16:51:01,928 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:01\] "POST /api/8ae152b61e5911eeae1c02420a000002/lights HTTP/1.1" 200 -
> 2023-07-09 16:51:03,172 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:03\] "GET /lights HTTP/1.1" 200 -
> 2023-07-09 16:51:03,186 - services.stateFetch - INFO - start lights sync
> 2023-07-09 16:51:04,641 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:04\] "GET /api/8ae152b61e5911eeae1c02420a000002/groups/0 HTTP/1.1" 200 -
> 2023-07-09 16:51:05,172 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:05\] "GET /lights HTTP/1.1" 200 -
> 2023-07-09 16:51:06,875 - lights.discover - INFO - \[
> "10.0.0.1:80",
> "10.0.0.30:80",
> "10.0.0.32:80",
> "10.0.0.49:80",
> "10.0.0.109:80",
> "10.0.0.195:80",
> "10.0.0.213:80",
> "10.0.0.248:80"
> \]
> 2023-07-09 16:51:06,875 - lights.protocols.mqtt - INFO - MQTT discovery called
> 2023-07-09 16:51:07,168 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:07\] "GET /lights HTTP/1.1" 200 -
> 2023-07-09 16:51:08,266 - services.homeAssistantWS - WARNING - Home Assistant Web Socket Client disconnected trying to (re)connect
> \[Errno 113\] No route to host
> 2023-07-09 16:51:08,266 - services.homeAssistantWS - INFO - HomeAssistant WebSocket discovery called
> 2023-07-09 16:51:09,164 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:09\] "GET /lights HTTP/1.1" 200 -
> 2023-07-09 16:51:09,642 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:09\] "GET /api/8ae152b61e5911eeae1c02420a000002/groups/0 HTTP/1.1" 200 -
> 2023-07-09 16:51:11,171 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:11\] "GET /lights HTTP/1.1" 200 -
> 2023-07-09 16:51:11,338 - services.homeAssistantWS - ERROR - Error connecting to Home Assistant WebSocket
> Traceback (most recent call last):
> File "/opt/hue-emulator/services/homeAssistantWS.py", line 232, in create\_websocket\_client
> homeassistant\_ws\_client.connect()
> File "/usr/local/lib/python3.9/dist-packages/ws4py/client/\_\_init\_\_.py", line 217, in connect
> self.sock.connect(self.bind\_addr)
> OSError: \[Errno 113\] No route to host
> Exception in thread Thread-29:
> Traceback (most recent call last):
> File "/usr/lib/python3.9/threading.py", line 954, in \_bootstrap\_inner
> self.run()
> File "/usr/lib/python3.9/threading.py", line 892, in run
> self.\_target(\*self.\_args, \*\*self.\_kwargs)
> File "/opt/hue-emulator/lights/discover.py", line 116, in scanForLights
> discover(detectedLights)
> File "/opt/hue-emulator/services/homeAssistantWS.py", line 268, in discover
> homeassistant\_ws\_client.get\_all\_lights()
> AttributeError: 'NoneType' object has no attribute 'get\_all\_lights'
> 2023-07-09 16:51:13,174 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:13\] "GET /lights HTTP/1.1" 200 -
> 2023-07-09 16:51:14,639 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:14\] "GET /api/8ae152b61e5911eeae1c02420a000002/groups/0 HTTP/1.1" 200 -
> 2023-07-09 16:51:15,173 - werkzeug - INFO - 10.0.0.189 - - \[09/Jul/2023 16:51:15\] "GET /lights HTTP/1.1" 200 -
> 2023-07-09 16:51:16,237 - services.stateFetch - INFO - start lights sync
> \`\`\`
> 
> 
> \### Steps to reproduce
> 
> Connect to DIYHUE to Home Assistant 2023.7.1
> Run scan
> Check docker logs
> 
> \### Please enter your operating system details here
> 
> unraid 6.12.2 
> 
> \### What DiyHue version(branch) are you using?
> 
> master (latest)

> **[diyHue Add-on](https://community.home-assistant.io/t/diyhue-add-on/250513/176)**
>
> Yes, I have the same issue… As soon as I add HA to DIYHue the lights go on/offline all the time and in the log I get the following warnings: 2023-11-07 17:14:52,805 - services.stateFetch - WARNING - Ganglicht 2 is unreachable: ‘NoneType’ object...

(I commented in this one), but there are two others with the same issue

I think there are more, but there you go

> <https://github.com/diyhue/hassio-addon/issues/22>
>
> Here is some of the output from the Addon inside of home assistant:
> 2023-11-07 …12:21:10,358 - services.stateFetch - INFO - start lights sync
> 2023-11-07 12:21:10,359 - services.stateFetch - WARNING - Light Bars is unreachable: 'NoneType' object is not subscriptable
> 2023-11-07 12:21:10,360 - services.stateFetch - WARNING - Floor Light is unreachable: 'NoneType' object is not subscriptable
> 2023-11-07 12:21:10,360 - services.stateFetch - WARNING - Bathroom Light 3 is unreachable: 'NoneType' object is not subscriptable
> 2023-11-07 12:21:10,361 - services.stateFetch - WARNING - Bathroom Light 2 is unreachable: 'NoneType' object is not subscriptable
> 2023-11-07 12:21:10,362 - services.stateFetch - WARNING - Bathroom Light 1 is unreachable: 'NoneType' object is not subscriptable
> 2023-11-07 12:21:10,363 - services.stateFetch - WARNING - Kitchen Light 1 is unreachable: 'NoneType' object is not subscriptable
> 2023-11-07 12:21:10,363 - services.stateFetch - WARNING - Kitchen Light 2 is unreachable: 'NoneType' object is not subscriptable
> 2023-11-07 12:21:10,364 - services.stateFetch - WARNING - Can Light 1 is unreachable: 'NoneType' object is not subscriptable
> 2023-11-07 12:21:10,364 - services.stateFetch - WARNING - Fan Light is unreachable: 'NoneType' object is not subscriptable
> 
>  
> \<img width="1006" alt="Screenshot 2023-11-07 at 12 23 47 PM" src="https://github.com/diyhue/hassio-addon/assets/31420840/44ca13d9-6c1d-4379-b430-04d9b59d906b"\>
> 
> It seems that diyhue finds the lights through the home assistant API and they are all controllable through the hue app but the hue app as well as the diyhue webpage marks the lights as offline/unresponsive

---

<div class="post-metadata">

**Author:** ![victorize](https://avatars.discourse-cdn.com/v4/letter/v/7ba0ec/32.png) [@victorize](https://diyhue.discourse.group/u/victorize)\
**Post date:** [December 12, 2023, 4:04am UTC](https://diyhue.discourse.group/t/problem-with-ha-integration-offline-if-off/667/6 "2023-12-12T04:04:45Z")

</div>

Ah thank you.  
Sadly doesn’t look like a possible fix is coming anytime soon. 😢

---

<div class="post-metadata">

**Author:** ![kaigame](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kaigame](https://diyhue.discourse.group/u/kaigame)\
**Post date:** [December 12, 2023, 7:16pm UTC](https://diyhue.discourse.group/t/problem-with-ha-integration-offline-if-off/667/7 "2023-12-12T19:16:35Z")

</div>

You never know, unfortunately it’s completely unusable for me right now, but it’s not critical for my setup, was just a nice to have,

If anyone wants me to do anything specific, i’ll follow through
