# Zigbee2mqtt - Debug

**URL:** <https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080>\
**Category:** Développement\
**Tags:** zigbee2mqtt\
**Created:** [February 1, 2021, 12:57pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080 "2021-02-01T12:57:33Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![Shiftmaj](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/s/e9c0ed/32.png) [@Shiftmaj](https://community.gladysassistant.com/u/Shiftmaj)\
**Post date:** [November 23, 2021, 6:01pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/102 "2021-11-23T18:01:37Z")

</div>

Hmm, it seems I have nothing new to pull under this tag, I’ll try again a bit later (probably tomorrow, not available tonight).

---

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [November 23, 2021, 6:02pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/103 "2021-11-23T18:02:48Z")

</div>

Oh ok, I spoke too soon, it seems there are still ~45 minutes before the image is ready 😛

---

<div class="post-metadata">

**Author:** ![Shiftmaj](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/s/e9c0ed/32.png) [@Shiftmaj](https://community.gladysassistant.com/u/Shiftmaj)\
**Post date:** [November 23, 2021, 10:10pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/104 "2021-11-23T22:10:03Z")

</div>

New test with the new image, but it seems that the «&nbsp;Save&nbsp;» button does not change, even after re-adding the device 😕  
The device disappears upon addition… Then reappears upon page reload.

---

<div class="post-metadata">

**Author:** ![Shiftmaj](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/s/e9c0ed/32.png) [@Shiftmaj](https://community.gladysassistant.com/u/Shiftmaj)\
**Post date:** [November 24, 2021, 6:16pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/105 "2021-11-24T18:16:09Z")

</div>

Good news!  
Contrary to what I thought, I had brought with me one of the switches that I had requested to be added some time ago ([Zigbee2mqtt: Add device ZM-L03E-Z · Issue #1244 · GladysAssistant/Gladys · GitHub](https://github.com/GladysAssistant/Gladys/issues/1244)) and it works too 👍

---

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [November 24, 2021, 7:17pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/106 "2021-11-24T19:17:08Z")

</div>

> [@Shiftmaj](#):
>
> It seems that the «&nbsp;Save&nbsp;» button does not change, even after re-adding the device

This makes me sad. Can I hope that you tested incorrectly?? 😛

> [@Shiftmaj](#):
>
> The device disappears when added… Then reappears when the page is reloaded

The device disappears? The button is not changed to «&nbsp;Already in Gladys&nbsp;»? And after reloading, it’s still «&nbsp;Save&nbsp;»? Not «&nbsp;Update&nbsp;»?

---

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [November 24, 2021, 7:55pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/107 "2021-11-24T19:55:01Z")

</div>

Okay, I’ve reproduced the issue, and indeed, it’s a silly error in the ID detection…  
New image with the fix is being built, it will take 1.5 hours before it’s available.

🤞

---

<div class="post-metadata">

**Author:** ![Shiftmaj](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/s/e9c0ed/32.png) [@Shiftmaj](https://community.gladysassistant.com/u/Shiftmaj)\
**Post date:** [November 24, 2021, 10:17pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/108 "2021-11-24T22:17:46Z")

</div>

Good, now I have «&nbsp;Already created&nbsp;» on the devices that are registered in Gladys.  
By deleting a device (from Gladys, then Z2M), I can reintegrate it directly into Gladys without any issues; the «&nbsp;Save&nbsp;» button comes back in place of the «&nbsp;Already created&nbsp;» button.  
I think we’re pretty good then 🙂

P.S.: While I’m at it, I did some tests and noticed an inconsistency with the scenes when deleting and re-adding a device. In the «&nbsp;Turn on/off the light&nbsp;» type blocks, the device is correctly removed when it is deleted from Gladys. Once removed, it must be manually put back into the scene. On the other hand, in the «&nbsp;Control a device&nbsp;» type blocks, the behavior differs slightly. Editing a scene after the device is deleted keeps the device’s control block (but not filled). However, if the device is re-added before any new scene save (i.e. between deletion and re-addition), the scene retains the device’s pre-deletion properties.

---

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [November 25, 2021, 5:54am UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/109 "2021-11-25T05:54:21Z")

</div>

Ok, that’s a bit much.

However, for a scene bug, I don’t think we should discuss it in a zigbee2mqtt topic, otherwise we’ll lose people.

---

<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:** [November 25, 2021, 8:57am UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/110 "2021-11-25T08:57:04Z")

</div>

Thanks for testing @Shiftmaj, it’s great to get feedback, it allows us to merge more confidently 🙂 (I don’t have this equipment)

I just merged the PR from @AlexTrovato!

@AlexTrovato Can you confirm that what we have on master is «&nbsp;production ready&nbsp;»? Any known bugs left?

---

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [November 25, 2021, 9:01am UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/111 "2021-11-25T09:01:21Z")

</div>

On this part, I am not aware of other bugs related to the evolutions.  
I am rather calm.

(I have the impression that someone wants to close about ten GitHub tickets on the subject :p)

Otherwise, I would be able to make myself available.

---

<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:** [November 25, 2021, 9:02am UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/112 "2021-11-25T09:02:39Z")

</div>

Great! Aha, this isn’t for me, it’s for people who ask for these compatibilities 🙂

It’s really going to be cool once we have this auto-detection in production.

---

<div class="post-metadata">

**Author:** ![bertrandda](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/bertrandda/32/5929_2.png) [@bertrandda](https://community.gladysassistant.com/u/bertrandda)\
**Post date:** [November 25, 2021, 9:16pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/113 "2021-11-25T21:16:39Z")

</div>

So I’m testing my new toys, so far no major issues, great job on this service 👏

I just have a question about this kind of device [Philips 929002398602 control via MQTT | Zigbee2MQTT](https://www.zigbee2mqtt.io/devices/929002398602.html) it’s a kind of remote control/switch. If I understand correctly, the proper way to turn a light on/off from this type of device is to use scenes. But it seems that this is not possible. In the triggers, I have put `Device state change`, I have chosen my remote control then `equals` and there I put the value `on_press` (the zigbee2mqtt doc indicates the list of possible values) unfortunately when saving, error with `\"[0].value\" must be a number` as a message in the developer Network tab. Is this just not implemented yet or is my solution not the right one?

---

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [November 25, 2021, 9:32pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/114 "2021-11-25T21:32:21Z")

</div>

Sorry, but indeed, this type of device (remote control / cubes…) is not fully managed.  
The values are non-numeric actions, and we have not yet studied (to my knowledge) the appropriate way to handle this type of value in the Gladys core.

And on zigbee2mqtt, the values in the form of a string are almost unique to each device.

---

<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:** [November 26, 2021, 1:28pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/115 "2021-11-26T13:28:27Z")

</div>

> [@AlexTrovato](#):
>
> The values are non-numeric actions, and we have not yet studied (to my knowledge) the appropriate way to handle this type of value in the Gladys core.

We need to handle each case individually and create a specific component in the UI to manage the values 🙂

Several possibilities:

- Either we do a mapping with numerical values (which allows us to have the history). For example, «&nbsp;click&nbsp;» = 1, «&nbsp;double-click&nbsp;» = 2, etc… and then we need to display a specific component in the UI that displays a translated value.
- Or we do not do any mapping and we use the «&nbsp;string&nbsp;» states of Gladys 4 (yes it exists 🙂 ), but then we lose the history of the values. And likewise, we need to create a specific component in the UI to translate the values 🙂

---

<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:** [November 26, 2021, 6:09pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/116 "2021-11-26T18:09:57Z")

</div>

For your information, the new version of Gladys integrates Zigbee2mqtt with automatic detection 🔥🔥

Thanks to @AlexTrovato!

> [@Nouvelle version 4.7 : Affichage graphique et mise à jour majeure de l'intégration Zigbee2mqtt!](https://community.gladysassistant.com/t/nouvelle-version-4-7-affichage-graphique-et-mise-a-jour-majeure-de-lintegration-zigbee2mqtt/6693?u=pierre-gilles):
>
> Salut à tous ! Après des mois de travail, je suis heureux de lancer aujourd’hui Gladys Assistant v4.7 (techniquement, Gladys Assistant v4.7.1), une mise à jour assez importante avec 2 principales nouveautés : La vue “graphique” sur le tableau de bord Une mise à jour majeure de Zigbee2mqtt, grâce au super travail de @AlexTrovato. Pour en savoir plus, j’ai détaillé toutes les nouveautés dans un article sur le blog: La documentation a été mise à jour aussi: [Afficher un graphique sur le table…](https://gladysassistant.com/fr/docs/dashboard/chart)

---

<div class="post-metadata">

**Author:** ![bertrandda](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/bertrandda/32/5929_2.png) [@bertrandda](https://community.gladysassistant.com/u/bertrandda)\
**Post date:** [November 26, 2021, 7:04pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/117 "2021-11-26T19:04:33Z")

</div>

> [@AlexTrovato](#):
>
> On zigbee2mqtt, string values are almost unique to each device.

It seems that the library used by zigbee2mqtt provides a list of statuses for each action [zigbee-herdsman-converters/devices/philips.js at 05f0795cbf3742a17d59152bbe2186ec6bc8a48e · Koenkk/zigbee-herdsman-converters · GitHub](https://github.com/Koenkk/zigbee-herdsman-converters/blob/05f0795cbf3742a17d59152bbe2186ec6bc8a48e/devices/philips.js#L1739-L1741)

> [@pierre-gilles](#):
>
> Either we don’t do any mapping and use the «&nbsp;string&nbsp;» states of Gladys 4 (yes it exists 🙂 ), but then we lose the history of the values. And similarly, we need to create a specific component in the UI to translate the values

Perhaps this second solution is simpler? It seems to me that the only place where we need these states is in the scenes, so keeping the strings may be a good solution and knowing that we can have the list automatically (so a select for the scene trigger conditions).

For information, we can see that the states are well detected by Gladys, here is what it looks like on the dashboard.  
 ![Enregistrement de l’écran 2021-11-26 à 19.49.48](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/4/4b6b254b9de0b596d9b7375c36424cc8ce67a930.gif)

---

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [November 27, 2021, 8:45am UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/118 "2021-11-27T08:45:14Z")

</div>

To go back to the history of devices with «&nbsp;string&nbsp;» value,

1. It should be possible to integrate this into the scenes, as a double click could allow triggering a scene (I think that would be great)
2. indeed, the «&nbsp;string&nbsp;» states exist, but the management of these is quite limited for the moment (according to the cameras), so not exploitable as is

Now, this may be «&nbsp;complicated&nbsp;» (not impossible) to succeed in making an exhaustive and coherent mapping between all possible states of the devices and integrations and Gladys.

For me, the simplest would really be to make a mapping in numerical value, but in terms of UI, the display may prove complex given the number of states and their variants.

---

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [November 27, 2021, 7:00pm UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/119 "2021-11-27T19:00:46Z")

</div>

@Tolkyen  
I’m pinging you here regarding the Zigbee2Mqtt multi-outlet.

> <https://github.com/GladysAssistant/Gladys/issues/1333>
>
> \`\`\`
> {
> "name": "0xbc33acfffe6ec3e2",
> "external\_id": "zigbee2mqtt:0xbc33acf…ffe6ec3e2",
> "model": "HG06338",
> "features": \[\],
> "should\_poll": false,
> "service\_id": "c2e22497-dfb0-4b92-a11c-981b663f1ad2",
> "supported": false
> }
> \`\`\`

If you’re motivated to test, I’ve created a new Docker image that should handle your device: `atrovato/gladys:zigbee2mqtt`

If you’re not «&nbsp;used to&nbsp;» installing test images, I wouldn’t recommend trying.

PS: for everyone, this image includes an update on device control and a fix on the state change of actuators

---

<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:** [November 29, 2021, 7:55am UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/120 "2021-11-29T07:55:13Z")

</div>

@AlexTrovato Regarding the power strips, do you think it will be possible to implement the functionality we discussed at some point with the splitting of power strips into multiple devices (natively)?

The idea is to allow the user to distribute the different outlets in different rooms, to enable the control of each individual outlet in the scenes, and for these outlets to work with voice assistants 🙂

---

<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:** [November 29, 2021, 8:11am UTC](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080/121 "2021-11-29T08:11:03Z")

</div>

> [@AlexTrovato](#):
>
> - It should be possible to integrate this into the scenes, as a double click could allow triggering a scene (I think that would be great)
> - Indeed, the «&nbsp;string&nbsp;» states exist, but the management of these is quite limited for now (especially for cameras), so not exploitable as is

Yes 100%, it’s not coded, but what I meant is that it’s not something impossible, and in terms of data model/DB, we already had the functionality with the cameras.

After that, yes, we need to adapt the scenes / and a bit the core to properly propagate these states.

> [@AlexTrovato](#):
>
> For me, the simplest thing would be to do a numerical value mapping, but in terms of UI, the display might be complex given the number of states and their variants.

It’s a bit the problem of double mapping indeed, it can quickly become a mess ^^

[Previous page](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080.md?page=5)

[Next page](https://community.gladysassistant.com/t/zigbee2mqtt-debug/6080.md?page=7)
