# Gladys Assistant 4.18: Zigbee2mqtt backup and native handling of buttons (single click, double click, ...)

**URL:** <https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039>\
**Category:** Actualités\
**Created:** [March 24, 2023, 6:24am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039 "2023-03-24T06:24:13Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [March 24, 2023, 6:24am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/1 "2023-03-24T06:24:13Z")

</div>

Hello everyone!

I came back from vacation this week, cleared out everything that was pending, and there are some little gems 💎

Not everything is in this release (there were a lot of PRs!), but these two features, in my opinion, were ready to go. The rest will arrive in a future release 🙂

**Native handling of buttons with single/double/hold press**

From now on, Gladys natively handles press buttons (Xiaomi-type), which allow triggering actions with single, double presses, etc…

Gladys now displays all available actions:

 ![Screenshot 2023-03-24 at 13.55.22](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/2/2d43a1c2739a2b0aa4df842df31f33c6cf6ad38d.png)

In the interface, actions are shown natively:

 ![Screenshot 2023-03-24 at 13.56.30](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/4/467e457a6d17e6d1b82cd456800e73e38264ea0e.png)

Thanks to @AlexTrovato for this development which will greatly improve the Gladys experience 🙏

**Zigbee2mqtt backup**

Until now, the Zigbee2mqtt integration was not backed up in Gladys, since, I remind you, Zigbee2mqtt is a project separate from Gladys.

But it wasn’t very easy for a user to understand how to restore Zigbee2mqtt on a new instance in case of changing the home automation box!

From now on, Gladys will back up Zigbee2mqtt once a day into the Gladys database, and when restoring on another instance (either by manually moving the Gladys DB, or via a Gladys Plus restore), Zigbee2mqtt can be restored automatically 🥳

In Gladys, in the «&nbsp;Background tasks&nbsp;» tab, you should find a once-per-day task that should be successful if Gladys managed to back up Zigbee2mqtt.

Thanks to @AlexTrovato for this development!

**Ongoing developments**

On my side, I’m working on several big topics:

- Deployment of the Enedis integration in alpha: I am looking for a Gladys Plus user who could give me access to their Enedis account for final tests: [Intégration Enedis-Linky - #75 par pierre-gilles](https://community.gladysassistant.com/t/integration-enedis-linky/7470/75?u=pierre-gilles)
- Displaying a live camera video stream on the dashboard
- Switching from the GPT-3 API to the ChatGPT API using the «&nbsp;turbo&nbsp;» model for instant responses, and especially to divide the cost of this API by 10, which will allow me to give many more credits to Gladys users 🙂

**I’m looking for help on several topics:**

- The «&nbsp;OpenWeather&nbsp;» service is still broken for new users, their new API needs to be integrated: [OpenWeather "Météo" ne fonctionne plus - #38 par pierre-gilles](https://community.gladysassistant.com/t/openweather-meteo-ne-fonctionne-plus/7501/38?u=pierre-gilles)
- I’m still looking for help to populate the «&nbsp;Compatibility&nbsp;» page on the site. No development skills are required to help — a browser and common sense are enough. To help: [[Besoin de vous] Contribuez à la page "Compatibilités" du site!](https://community.gladysassistant.com/t/besoin-de-vous-contribuez-a-la-page-compatibilites-du-site/7986?u=pierre-gilles)
- There are quite a few small bugs reported over the past weeks. I will do a «&nbsp;bugfix&nbsp;» pass at some point, but before that I’d like to finish all the big projects I started several months ago. If someone wants to offer their help: [GitHub · Where software is built](https://github.com/GladysAssistant/Gladys/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

**Changelog**

The full CHANGELOG is available [here](https://github.com/GladysAssistant/Gladys/releases/tag/v4.18.0).

**How to update?**

If you installed Gladys with the official Raspberry Pi OS image, your instances will update **automatically** within the coming hours. This can take up to 24h, don’t panic.

If you installed Gladys with Docker, make sure you are using Watchtower (see the [documentation](https://gladysassistant.com/fr/docs/installation/docker#mise-%C3%A0-jour-automatique-avec-watchtower)).

---

<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:** [March 24, 2023, 6:25am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/2 "2023-03-24T06:25:08Z")

</div>



---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [March 24, 2023, 7:20am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/3 "2023-03-24T07:20:26Z")

</div>

Great job again, thanks a lot to all the developers !!! 👍

I just have a little question that’s been bugging me… since I’ll finally be able to move from my Raspberry Pi (RPi) to my NUC:  
I’m surprised because this morning I made sure I was on the latest version of Gladys and I launched a backup. I check, it clearly says it succeeded:

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

But when I look directly at the backups I see that it’s only slightly larger than yesterday’s backup:

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

Is it possible that the z2m backup is only 10MB? Given that I have almost 50 devices that surprises me but I may be mistaken. I’d like to be sure everything is fine before attempting the migration! 😉

---

<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:** [March 24, 2023, 7:43am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/4 "2023-03-24T07:43:37Z")

</div>

@guim31 The Zigbee2mqtt backup is a behavior separate from the Gladys Plus backup.

Every night at 11:00 PM, the Zigbee2mqtt integration in Gladys asks Zigbee2mqtt to export the important information from your setup, and

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [March 24, 2023, 7:48am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/5 "2023-03-24T07:48:39Z")

</div>

Ahhh ok I didn’t understand how it works.  
So I’ll let it run and see how it goes this weekend!  
Thanks @pierre-gilles

---

<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:** [March 24, 2023, 8:36am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/6 "2023-03-24T08:36:06Z")

</div>

Hi, you can make a manual backup from the Z2M interface, Gladys will capture the file.  
There is a «&nbsp;backup&nbsp;» button somewhere in z2m.

---

<div class="post-metadata">

**Author:** ![Hizo](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/h/51bf81/32.png) [@Hizo](https://community.gladysassistant.com/u/Hizo)\
**Post date:** [March 24, 2023, 9:00am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/7 "2023-03-24T09:00:23Z")

</div>

![Screenshot_20230324_095925](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/5/539133e72124959f0bac41d90f141f9ed75c2b05.png)  
Here, I presume?

I’m not yet on version 4.18, so I can’t test it 🙂

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [March 24, 2023, 12:17pm UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/8 "2023-03-24T12:17:21Z")

</div>

Ok, all good!!

Thanks

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [March 25, 2023, 8:13am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/9 "2023-03-25T08:13:04Z")

</div>

@pierre-gilles it’s good, I got it 🙂

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

This weekend, migrating to my NUC!!!

---

<div class="post-metadata">

**Author:** ![Jluc](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/jluc/32/12397_2.png) [@Jluc](https://community.gladysassistant.com/u/Jluc)\
**Post date:** [March 25, 2023, 3:36pm UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/10 "2023-03-25T15:36:28Z")

</div>

Great, it’s moving forward, especially when @pierre-gilles returns from vacation 🙂  
J’ai reparamétré un bouton avec la nouvelle version et du coup, j’ai pu ajouté des fonctionnalités pour d’autres devices. Top 👍

---

<div class="post-metadata">

**Author:** ![Jluc](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/jluc/32/12397_2.png) [@Jluc](https://community.gladysassistant.com/u/Jluc)\
**Post date:** [March 25, 2023, 3:54pm UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/11 "2023-03-25T15:54:43Z")

</div>

I’ve been using Gladys Plus for several weeks and am now wondering what the procedure is for disconnecting the Raspberry

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [March 25, 2023, 10:01pm UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/12 "2023-03-25T22:01:04Z")

</div>

Good evening @pierre-gilles @AlexTrovato

I have Xiaomi buttons connected via Zigbee2Mqtt — does the change that was made apply (single click instead of 1)? I tried to modify it in a scene and in the Zigbee2Mqtt integration, but I can’t find the new notation. Do I need to delete the button and recreate it to access it?

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [March 25, 2023, 10:41pm UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/13 "2023-03-25T22:41:09Z")

</div>

@pierre-gilles I think I have a little problem ^^

After a thousand adventures, I thought my zigbee2mqtt dongle was dead.  
Turns out it wasn’t 😉

So I’m doing a fresh install of Gladys on my NUC, I restore my backup from yesterday, so far so good.  
I see that the z2m service is running, I see all my devices displayed in Gladys… BUT actually none are available in the Discovery tab anymore, nor even in the z2m interface.  
Everything is empty 😕

Any idea what went wrong? How can I help you debug this?

---

<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:** [March 26, 2023, 4:47am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/14 "2023-03-26T04:47:26Z")

</div>

Hi, on your NUC the USB port may have been renamed, have you tried re-selecting the port from Gladys?

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [March 26, 2023, 8:00am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/15 "2023-03-26T08:00:45Z")

</div>

Yes, indeed it has changed its name, but it doesn’t make any difference when I select it.

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [March 26, 2023, 8:36am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/16 "2023-03-26T08:36:27Z")

</div>

For the record, what was strange is that when I plugged my dongle into the NUC the red LED did not light up.

So I did LOTS (too many) of changes on the z2m side in the configuration.yaml file because my dongle didn’t even show up with an lsusb

After many attempts the dongle appeared but it wasn’t anywhere in /dev/tty\*

Several reboots and it showed up as /dev/ttyUSB0

And that’s when my other devices disappeared from z2m, as if I’d switched dongles.

I still have my Zigbee2mqtt backup on my Pi… What would you say is the best way to sort this out? Should I manually edit the backup file to make it match /dev/ttyUSB0?

Even if I have to start from scratch, I’d like to eventually recover my 50 devices and not have to re-pair everything / restore my scenes… 😅

---

<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:** [March 26, 2023, 8:40am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/17 "2023-03-26T08:40:49Z")

</div>

If your dongle appears to be properly connected to the NUC, try enabling the «&nbsp;permit join&nbsp;» from Gladys or z2m.

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [March 26, 2023, 9:39am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/18 "2023-03-26T09:39:04Z")

</div>

It didn’t work… 😕

So I removed the Gladys and z2m containers and images and deleted the gladysassistant folder in `/var/lib/`

I rebooted my NUC; here are the results of the commands:

```auto
lsusb
Bus 001 Device 002: ID 8087:8001 Intel Corp. Integrated Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
Bus 002 Device 003: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 002 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

```

```auto
/dev/tty*
/dev/tty /dev/tty2 /dev/tty31 /dev/tty43 /dev/tty55 /dev/ttyprintk /dev/ttyS2 /dev/ttyS31
/dev/tty0 /dev/tty20 /dev/tty32 /dev/tty44 /dev/tty56 /dev/ttyS0 /dev/ttyS20 /dev/ttyS4
/dev/tty1 /dev/tty21 /dev/tty33 /dev/tty45 /dev/tty57 /dev/ttyS1 /dev/ttyS21 /dev/ttyS5
/dev/tty10 /dev/tty22 /dev/tty34 /dev/tty46 /dev/tty58 /dev/ttyS10 /dev/ttyS22 /dev/ttyS6
/dev/tty11 /dev/tty23 /dev/tty35 /dev/tty47 /dev/tty59 /dev/ttyS11 /dev/ttyS23 /dev/ttyS7
/dev/tty12 /dev/tty24 /dev/tty36 /dev/tty48 /dev/tty6 /dev/ttyS12 /dev/ttyS24 /dev/ttyS8
/dev/tty13 /dev/tty25 /dev/tty37 /dev/tty49 /dev/tty60 /dev/ttyS13 /dev/ttyS25 /dev/ttyS9
/dev/tty14 /dev/tty26 /dev/tty38 /dev/tty5 /dev/tty61 /dev/ttyS14 /dev/ttyS26 /dev/ttyUSB0
/dev/tty15 /dev/tty27 /dev/tty39 /dev/tty50 /dev/tty62 /dev/ttyS15 /dev/ttyS27
/dev/tty16 /dev/tty28 /dev/tty4 /dev/tty51 /dev/tty63 /dev/ttyS16 /dev/ttyS28
/dev/tty17 /dev/tty29 /dev/tty40 /dev/tty52 /dev/tty7 /dev/ttyS17 /dev/ttyS29
/dev/tty18 /dev/tty3 /dev/tty41 /dev/tty53 /dev/tty8 /dev/ttyS18 /dev/ttyS3
/dev/tty19 /dev/tty30 /dev/tty42 /dev/tty54 /dev/tty9 /dev/ttyS19 /dev/ttyS30

```

So now I’m reinstalling Gladys with the docker command, but I’m afraid that if I directly restore a Gladys Plus backup I’ll have the same issue of a dongle not being recognized (on my RPi it was `/dev/ttyACM0`).

What do you think I should do and in what order? ^^

---

<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:** [March 26, 2023, 3:50pm UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/19 "2023-03-26T15:50:53Z")

</div>

I would have restored the Gladys Plus backup, then checked that in the folder /var/lib…/z2m you have files other than the .conf.  
If you see a .db file and others, it means the z2m backup is indeed present. Then I would have configured the USB port from Gladys. Normally that restarts the z2m container, but here I’m afraid it will overwrite important information in the .conf file…  
You should do a diff of this file before and after.

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [March 26, 2023, 4:24pm UTC](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039/20 "2023-03-26T16:24:22Z")

</div>

Ok I’ll try this procedure tonight and I’ll keep you informed 👍 thanks Alex

[Next page](https://community.gladysassistant.com/t/gladys-assistant-4-18-sauvegarde-zigbee2mqtt-et-gestion-native-des-boutons-clic-simple-double/8039.md?page=2)
