# Issue detecting Hue bridge since 4.2.1

**URL:** <https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431>\
**Category:** Configuration\
**Created:** [June 6, 2021, 6:03am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431 "2021-06-06T06:03:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [June 6, 2021, 6:03am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/1 "2021-06-06T06:03:59Z")

</div>

When will the Philips Hue bug be uploaded?  
I still can’t do anything.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 7, 2021, 1:39am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/2 "2021-06-07T01:39:19Z")

</div>

What bug?

If you are referring to the increase in the local discovery timeout (UpNp-search), this was released in 4.3.1 25 days ago (see CHANGELOG: [Release v4.3.1 · GladysAssistant/Gladys · GitHub](https://github.com/GladysAssistant/Gladys/releases/tag/v4.3.1)).

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [June 7, 2021, 5:06am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/3 "2021-06-07T05:06:26Z")

</div>

Yes, I’m talking about that.  
It still doesn’t work on my end.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 7, 2021, 5:19am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/4 "2021-06-07T05:19:26Z")

</div>

Oh shoot! It worked for some people, so since I didn’t get any more feedback, I thought the issue was resolved 🙂

For your information, we doubled the timeout from 5s to 10 seconds, but maybe that’s not enough in your case.

Do you have a development setup or not? I can’t remember.

If yes, you could try making the change locally (add another 5-10 seconds to the timeout) and see if it works? (Example commit to modify this: [Increase Philips hue bridge scan timeout to 10s (#1185) · GladysAssistant/Gladys@757d95b · GitHub](https://github.com/GladysAssistant/Gladys/commit/757d95bd98508398ee7e82e7ca4cde14d32f6e7b) )

Otherwise, I can build a development version with the timeout doubled.

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [June 7, 2021, 4:23pm UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/5 "2021-06-07T16:23:05Z")

</div>

I found it strange that it took so long to fix that.

Yes, I have a development environment, but I’m far from being up to par.  
I’ll check it out.  
@VonOx you had the same problem, does it work for you now?

You told me it was possible to do an UpNp-search and also an N-uPnP-search, why not do that?  
If you can do the most, you can do the least!!

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [June 7, 2021, 7:07pm UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/6 "2021-06-07T19:07:40Z")

</div>

Yes, it had resolved the problem, or so I thought, because it no longer works, so the source of the problem is probably elsewhere.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 8, 2021, 12:51am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/7 "2021-06-08T00:51:54Z")

</div>

> [@Tlse-vins](#):
>
> You told me it was possible to do an UpNp-search and also N-uPnP-search, why not do that?

Because when searching with @VonOx, increasing the timeout solved the problem for him, so we stopped there 🙂

> [@Tlse-vins](#):
>
> Those who can do more can do less!!

Yes, but the more takes more time to develop, time which is far from being infinite 🙂

> [@VonOx](#):
>
> Yes, it had solved the problem, or so I thought because it no longer works, so the source of the problem is probably elsewhere.

Oh dear. Okay, we’ll continue to investigate then. @VonOx can you do some tests to see where it comes from? Increase the timeout for example? See if it’s a problem related to the Docker configuration?

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 14, 2021, 8:17am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/8 "2021-06-14T08:17:08Z")

</div>

@lmilcent Your bug fix in the scenes is live in Gladys v4.4:

> [@Gladys Assistant v4.4 est disponible avec la détection d'entrée/sortie de zones!](https://community.gladysassistant.com/t/gladys-assistant-v4-4-est-disponible-avec-la-detection-dentree-sortie-de-zones/6388):
>
> Salut à tous ! Gladys Assistant v4.4 est disponible, et ajoute plusieurs fonctionnalités assez demandées sur le forum slight_smile Liste complète des fonctionnalités sur le blog: Merci à ceux qui ont contribués à cette release slight_smile

---

<div class="post-metadata">

**Author:** ![JeuFore](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/jeufore/32/7544_2.png) [@JeuFore](https://community.gladysassistant.com/u/JeuFore)\
**Post date:** [June 21, 2021, 9:11am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/9 "2021-06-21T09:11:55Z")

</div>

Hello,

Wouldn’t adding the possibility to specify the bridge’s IP as a last resort be a relevant solution?

This will allow the user to still connect the bridge to Gladys in really particular cases.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 21, 2021, 10:18am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/10 "2021-06-21T10:18:53Z")

</div>

Why not, it could be a good idea!

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [June 21, 2021, 6:44pm UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/11 "2021-06-21T18:44:41Z")

</div>

Yes, if it’s possible that would be great. Because at the moment I still have nothing.

Is this issue present with other people who have Philips Hue?

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [June 21, 2021, 9:23pm UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/12 "2021-06-21T21:23:52Z")

</div>

I haven’t been able to reproduce it on my side recently, it’s a bit random because I had the issue.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 22, 2021, 12:53am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/13 "2021-06-22T00:53:04Z")

</div>

> [@pierre-gilles](#):
>
> Do you have a dev setup or not, I don’t remember?  
> If yes, you could potentially make the modification locally (add another 5-10 seconds of timeout) and see if it works? (Example of the commit to modify this: [Increase Philips hue bridge scan timeout to 10s (#1185) · GladysAssistant/Gladys@757d95b · GitHub](https://github.com/GladysAssistant/Gladys/commit/757d95bd98508398ee7e82e7ca4cde14d32f6e7b))  
> Otherwise, I can make a dev build by doubling the timeout

@Tlse-vins you didn’t answer me about Philips Hue, I wanted to know if it was just a timeout issue or not, could you test changing the timeout?

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [June 24, 2021, 7:15pm UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/14 "2021-06-24T19:15:15Z")

</div>

Hello @pierre-gilles, I didn’t have time to look at it before.  
I just tested it in my dev environment with a 30-second timeout and it’s the same.  
I did check that the bridge is on the same network.

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [June 24, 2021, 7:27pm UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/15 "2021-06-24T19:27:54Z")

</div>

@JeuFore mentions the use of the IP address, Eedomus does it this way. There is even a network scan to find the IP and Mac addresses of the devices.  
Is this a viable solution?

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 28, 2021, 1:40am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/16 "2021-06-28T01:40:51Z")

</div>

> [@Tlse-vins](#):
>
> Is this a feasible solution?

Manual addition is indeed a feasible solution. However, in your case, if it worked with the N-Upnp search, I thought we could do a hybrid scan UpNp + N-UpNp, that’s another solution.

> [@Tlse-vins](#):
>
> There’s even a network scan to find the IP and Mac addresses of devices.

A network scan is exactly what we’re doing right now, except it doesn’t seem to work for you.

Initially, I think that in your case, a mix of N-Upnp + Upnp would be the simplest solution.

Would you have time to take a look at it?

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [June 28, 2021, 5:24am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/17 "2021-06-28T05:24:13Z")

</div>

I did a test by replacing UpNp with N-UpNp in 2 files.  
In the logs, a bridge was found but it is not under Gladys.  
Additionally, there are several error messages in several files.

I could give you feedback tonight.

For your information, I am not a developer. If you make the changes, I can test them by integrating them on my side.

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [July 4, 2021, 8:25pm UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/18 "2021-07-04T20:25:21Z")

</div>

Here is the result of the modification above.

`2021-07-04T22:22:21+0200 <info> light.getBridges.js:12 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 1 bridges`

`2021-07-04T22:22:21+0200 <trace> errorMiddleware.js:49 (errorMiddleware) TypeError: Cannot read property 'serial' of undefined`  
`at /home/linux-vins/gladys/server/services/philips-hue/lib/light/light.getBridges.js:14:49`  
` at Array.forEach (<anonymous>)`  
`at PhilipsHueLightHandler.getBridges (/home/linux-vins/gladys/server/services/philips-hue/lib/light/light.getBridges.js:13:16)`

`at processTicksAndRejections (internal/process/task_queues.js:97:5)`

```
at async getBridges (/home/linux-vins/gladys/server/services/philips-hue/api/hue.controller.js:10:21)

```

`From previous event:`

```
at /home/linux-vins/gladys/server/api/middlewares/asyncMiddleware.js:4:11

at Layer.handle [as handle_request] (/home/linux-vins/gladys/server/node_modules/express/lib/router/layer.js:95:5)

at next (/home/linux-vins/gladys/server/node_modules/express/lib/router/route.js:137:13)

at /home/linux-vins/gladys/server/api/middlewares/authMiddleware.js:28:7

```

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [July 5, 2021, 1:08am UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/19 "2021-07-05T01:08:13Z")

</div>

@Tlse-vins The N-uPnP search and UpNp search API are not the same, hence the error.

The library documentation:

> <https://github.com/peter-murray/node-hue-api/blob/main/docs/discovery.md>

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [July 6, 2021, 7:26pm UTC](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431/20 "2021-07-06T19:26:13Z")

</div>

I read the documentation thoroughly.  
I tried removing the Hue application bridge and putting it back, I performed bridge searches in both cases and nothing in Gladys, no detection.

The change from N-UPnP to UPnP follows a request from @Herve who had detection issues with the first method. Was he the only one in this situation?

Since this change, no detection on my side, and @VonOx intermittently (if I’m not mistaken).

Is anyone else affected by this issue?  
Does it work with Gladys Plus?

@pierre-gilles opened an issue

> <https://github.com/GladysAssistant/Gladys/issues/1180>
>
> Make sure that N-UpNp search doesn't make the get bridge request fail in case th…e Pi doesn't have internet

to implement both methods.

I’m ready to test.

[Next page](https://community.gladysassistant.com/t/probleme-detection-pont-hue-depuis-la-4-2-1/6431.md?page=2)
