# Philips Hue - Dashboard inconsistency

**URL:** <https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842>\
**Category:** Configuration\
**Created:** [January 16, 2023, 5:13pm UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842 "2023-01-16T17:13:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/kevin/32/6521_2.png) [@Kevin](https://community.gladysassistant.com/u/Kevin)\
**Post date:** [January 16, 2023, 5:13pm UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/1 "2023-01-16T17:13:54Z")

</div>

Hello,

I don’t know if the subject/bug has already been discussed or reported but I noticed something yesterday and I don’t know if this behavior is normal:

- I turn on the Philips Hue lights in my kitchen with the main button to turn on all the lights in the room.

- I ask Google Home (outside of Gladys Assistant) to turn off the lights in X minutes.

- The Gladys dashboard indicates that the lights are on (even though they are off). Same observation after a refresh (F5).

Is this related to the fact that the lights are turned off via an external system? Or is it simply a bug?

Thanks for your clarification 😊

---

<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:** [January 17, 2023, 2:14am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/2 "2023-01-17T02:14:19Z")

</div>

Hi @Kevin! That’s a good question 🙂

For integrations that can be controlled outside of Gladys, and notably the Philips Hue integration, what we do in Gladys is refresh the state of these devices every 60 seconds to be able to retrieve the latest state if it was changed outside of Gladys.

So normally if you don’t see the change immediately, that’s normal — it should show up within 0 to 60 seconds!

Unfortunately we don’t have much choice; ideally Philips Hue would broadcast an event to notify third-party applications that a new state is available, but they don’t, so we have to use the available APIs ^^

---

<div class="post-metadata">

**Author:** ![Kevin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/kevin/32/6521_2.png) [@Kevin](https://community.gladysassistant.com/u/Kevin)\
**Post date:** [January 17, 2023, 7:39am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/3 "2023-01-17T07:39:21Z")

</div>

Indeed, when re-running tests yesterday, I noticed that at certain times it would update. And I thought that you must, in one way or another, be calling the available APIs every x amount of time. At least that answers my question.

However, where it never changes is the bulb’s color state. Gladys seems to remember what was selected the last time. But that doesn’t match reality if the change was made using the Philips Hue app, for example.

It’s not an issue that prevents proper operation but I prefer to report this minor bug 🙂

---

<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:** [January 17, 2023, 2:39pm UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/4 "2023-01-17T14:39:44Z")

</div>

> [@Kevin](#):
>
> On the other hand, where it never changes is the bulb’s color state. Gladys seems to remember what was selected for it last time. But that doesn’t match reality if the change was made with the Philips Hue app, for example.

Ah, that one is a bug 🙂 do you have development skills to help us fix it or not?

Otherwise I invite you to create an issue on our GitHub repo so we don’t lose track of the bug!

---

<div class="post-metadata">

**Author:** ![Kevin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/kevin/32/6521_2.png) [@Kevin](https://community.gladysassistant.com/u/Kevin)\
**Post date:** [January 17, 2023, 3:00pm UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/5 "2023-01-17T15:00:55Z")

</div>

I have development skills, but they’re mainly limited to .NET C# (and related technologies); as for Node.js, I only used it once out of curiosity.  
I should look into it a bit — it shouldn’t be too tricky to fix such a bug.

But in the meantime, I’ll go create an issue on GitHub.

---

<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:** [January 23, 2023, 3:57am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/6 "2023-01-23T03:57:48Z")

</div>

Thanks for your GitHub issue, @Kevin!

I’m reposting it here:

> <https://github.com/GladysAssistant/Gladys/issues/1690>
>
> I noticed on my dashboard that my Philips Hue lights retain the last state set d…irectly from Gladys. 
> For example, I put the light on red with Gladys. I change the color with the Android App Philips and I set the color to yellow. But on my Gladys dashboard, the red is still visible. The color is not correctly updating when I change de color with an external source. 
> Same issue with temperature and intensity I think (not sure at 100%, need to do some extra test). 
> 
> Working fine with the state ON or OFF (with a little delay).

If anyone happens to be around and has Philips Hue, could they help us find the bug? @cicoub13 I think you have Philips Hue? 🙂

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [January 23, 2023, 2:42pm UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/7 "2023-01-23T14:42:44Z")

</div>

I’ve resold my Philips Hue Bridge to control my bulbs via Zigbee2Mqtt 😐 but I’ll test the color reporting just in case (from Zigbee)

---

<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:** [January 24, 2023, 2:39am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/8 "2023-01-24T02:39:56Z")

</div>

Ah darn 😛 @VonOx you have Philips Hue with a bridge, right?

---

<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:** [January 24, 2023, 4:49am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/9 "2023-01-24T04:49:51Z")

</div>

Yes, I have that only for one Living Color, the rest is on z2m.

---

<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:** [January 24, 2023, 6:26am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/10 "2023-01-24T06:26:47Z")

</div>

Ok, so you have color control on that Living Color? Could you test this bug and see if you can find a solution?

---

<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:** [January 24, 2023, 5:47pm UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/11 "2023-01-24T17:47:16Z")

</div>

Yes, I’m away on a trip; I’ll test it at the end of the week when I’m back home.

---

<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:** [January 26, 2023, 9:28am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/12 "2023-01-26T09:28:49Z")

</div>

I confirm that it doesn’t work if an external control is used (Hue app / Voice etc)

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/9/9a394eebc29fde3e293b321fdd523a7457e51d68.png)

Correct state:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/4/49191dc90f17a49cdb4d3102ffed0552de20ccd8.png)

The sync only happens on the on/off

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [January 26, 2023, 9:48am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/13 "2023-01-26T09:48:39Z")

</div>

Only the On/Off poll has been developed. I commented on the issue, pointing to the code that needs to be updated.

---

<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:** [January 26, 2023, 9:52am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/14 "2023-01-26T09:52:02Z")

</div>

Good catch @cicoub13!

@VonOx Could you check what the state looks like at this line: [Gladys/server/services/philips-hue/lib/light/light.poll.js at master · GladysAssistant/Gladys · GitHub](https://github.com/GladysAssistant/Gladys/blob/master/server/services/philips-hue/lib/light/light.poll.js#L21)?

Then you need to do a `this.gladys.event.emit` with the color

---

<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:** [January 26, 2023, 10:20am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/15 "2023-01-26T10:20:20Z")

</div>

```json
{
  on: true,
  bri: 120,
  hue: 45780,
  sat: 254,
  effect: 'none',
  xy: [0.1397, 0.0985],
  alert: 'select',
  colormode: 'xy',
  mode: 'homeautomation',
  reachable: true
}

```

I foolishly did that, but I think the color needs to be converted

```js
logger.info(state);
this.gladys.event.emit(EVENTS.DEVICE.NEW_STATE, {
      device_feature_external_id: `${LIGHT_EXTERNAL_ID_BASE}:${bridgeSerialNumber}:${lightId}:${DEVICE_FEATURE_TYPES.LIGHT.COLOR}`,
      state: state.hue,
    });

```

---

<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:** [January 26, 2023, 10:22am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/16 "2023-01-26T10:22:47Z")

</div>

> [@VonOx](#):
>
> I stupidly did that but I think the color needs to be converted

You have the `hsbToRgb` function then `rgbToInt` in `servers/utils/colors.js`!

You use hue + sat + bri!

---

<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:** [January 26, 2023, 10:24am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/17 "2023-01-26T10:24:28Z")

</div>

Hue direct, it works — I hadn’t waited long enough (it’s not exactly the same blue but in any case it comes back)

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/3/35488ef806cde781bc016a5935c6adcd7034308d.png)

---

<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:** [January 26, 2023, 10:26am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/18 "2023-01-26T10:26:09Z")

</div>

Yes, the saturation and brightness are missing to get the same blue 🙂

Cool, if that works, thanks for taking a look!

---

<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:** [September 4, 2023, 9:40am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/19 "2023-09-04T09:40:01Z")

</div>

Hi @cicoub13, I’m reposting my GitHub message here, I saw that you made commits on GitHub mentioning this topic, do you have a PR? 🙂

I’m talking about this: [https://github.com/cicoub13/Gladys/commit/85d9b8d8f15a514783d4d1a6fddfee5daaf4897d](https://github.com/cicoub13/Gladys/commit/85d9b8d8f15a514783d4d1a6fddfee5daaf4897d)

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [September 4, 2023, 10:09am UTC](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842/20 "2023-09-04T10:09:10Z")

</div>

Hello. Yes, I’ll look into it this week, but I’ll need someone to test it in real life (no more Philips Hue bridge thanks to Zigbee compatibility).

[Next page](https://community.gladysassistant.com/t/philips-hue-incoherence-tableau-de-bord/7842.md?page=2)
