Dashboard - Evolutions / Bugs / etc

The Gladys web interface regularly takes a very long time to load at my place, without any apparent reason.

  • htop normal, few resources used
  • iotop same (htop equivalent at disk level, I am on SD card in read-only mode for the system to preserve it)
  • docker stats normal, everything is around 0% to 10%
  • network: the Zigbee2MQtt web service loads in less than 1 second (on the Rpi as well)
  • Gladys Log, nothing to report.

At the browser level (Chrome), you can see one of the requests taking 57 seconds and others taking 5 seconds!
I only loaded the homepage of my instance.

Other bugs, related to this one:

  • Sometimes when loading, the « Scene » tab disappears during the slowness
  • Same slowness on the « Integration » tab

Is it possible that my DB is too large and slows down the response to requests?

57 seconds on a get myself, that’s clearly not normal! This request should take less than 100ms.

Is the aggregation not currently running on your instance? Or the Gladys Plus backup?

There must be something blocking

I thought the same thing, but I can’t figure out what it could be. And since I notice this regularly, I don’t think it’s the backup or aggregation that take just a few minutes.
I’m deleting some values from my DB, but given the time it takes, I suspect a very low write speed on the Rpi. Could it already be a failure of the SD card?

Edit: during the data deletion command from my DB, my SSH commands take literally seconds or even minutes. But it’s working quite a bit on the SD, with 10Mo/s.

Edit 2: Once the containers are at 0%, I removed a device from Gladys and then it went up to 20% for 30 seconds and my web request took almost 2 minutes to execute:


It’s clear that Gladys is generating a lot of reading and writing. As if she didn’t like my 3.5Go DB too much :sweat_smile:

I’ve noticed this for some time as well, it’s « slow ». Unfortunately, I haven’t had time to analyze it.

It’s just a feeling, but via Gladys it’s worse (knowing that the network factor also plays a role).

In terms of hardware, I have more than enough (Velociraptor HDD / 24GB of RAM / 8 cores), there’s a lock somewhere.

I found an error in the Zigbee2MQTT service. It seems an unhandled value caused the service to crash (error).

@cicoub13 would you have any idea what to look for?

You know on which device?

Not at all. Same error on restart.

Since then I restarted Gladys and the slowness has disappeared @pierre-gilles.

Now that I think about it, I saw my MOES (MOES) radiator thermostatic heads with this feature when I added them to Gladys. In my opinion, it’s « because » of them.

@cicoub13 or @pierre-gilles, do you know what happens when I delete a device from the list in the Zigbee service?
Are all its associated data deleted from the database?

This would explain why when I delete a device, the deletion takes a few minutes to complete.

[EDIT]
I confirm, it has now been easily 30 minutes since the deletion of a sensor is underway. I am not surprised because it is the one that pollutes the most. But it’s a real problem because my Gladys instance does not respond at all during this time.
My scenes are not working for the moment, I have to wait for the operation to finish.

If you are on an SD card, it’s not surprising, it peaks at 10MB/s and then you just have to wait for everything to « unstack », but if it stacks faster than the disk can unstack, it clogs up, and only a restart can empty the « stack ».

This, on the other hand, is more surprising given your hardware! We need to understand what is blocking. How many devices and what integrations do you have? We need to analyze to find out what is slowing it down.

I am interested because in this case if there are areas on the Gladys side that we can optimize better, it will benefit everyone :slight_smile:

This is an error to indicate that we do not handle this event in the Zigbee2mqtt integration, but I do not think that this is related to the slowdowns here.

Yes!

Indeed, if the DB is blocked, everything is blocked (and in your case the DB is the real limiting factor with your SD which is capped at 10MB/s).

By reading your different messages, I don’t think there is a single problem, there may be different paths to explore.

@lmilcent on your side, for me the problem is rather clear: you have a lot of Zigbee2mqtt events that are sent to Gladys, and your disk has a lower throughput than what Zigbee2mqtt sends, so it stacks up and the more it stacks up, the slower your UI will be. If you restart Gladys, it temporarily solves the issue because it empties the stack, but after a few days, in my opinion, it will come back.

On this, several paths:

  • Either you increase the throughput of your disk (switch to an SSD)
  • Or you decrease the amount of data written to the disk:
    • Either see on the Zigbee2mqtt side if some devices can be less verbose
    • Or on the Gladys side, we have talked a lot about a development, it would be to be able to choose by deviceFeature whether or not to record the history, which would improve disk performance.

The other path I would see is the code for checking scene triggers.

@lmilcent if I remember correctly, you have a lot of scenes. In Gladys, each sending of a new sensor state will trigger a check of each trigger of each scene to see if a trigger does not match the new value. This code could take a lot of time and create « backpressure » on the Node.js side. After that, it would translate into high CPU usage, which we do not see here, so nothing is sure… I lean more towards the disk here.

Thanks for your analysis.

Disk Write Limitation

I’m surprised, as this is not a problem that happens several times a day, which I temporarily solve by simply restarting.

Since this morning, the disk has been very lightly used with an average of 50 KB/sec, far from the 10 MB of this morning during the problem. There have even been aggregations since, without any particular issues.

Additionally, I turned off the CO2 sensor that seemed to be causing a lot of pollution.

In my opinion, the theory of the disk being saturated with writes is not the right explanation for all of this.

Well, I would benefit a lot from switching to a disk or SSD, but my case remains interesting for everyone who wants or cannot do so.

Locked Database

This is quite interesting. During heavy operations, such as the deletion of several thousand data entries in the database, I wonder at that moment if the disk is not saturated.

But in this case, is the database lock necessary? Is it inevitable, or can we make parallel queries to avoid blocking Gladys?

Because not being able to use Gladys in such cases is a bit unfortunate. Nothing works, the scenes, the configuration, the dashboards, etc.

I imagine that in a few years, I won’t be the only one to have so much data (approximately 2.5 GB to 3 GB).

By the way, is it possible to run a kind of performance maintenance on the database at night?

For example, check if there are any orphaned data and delete them (those with no associated sensor)?

Zigbee

I saw several events from Gladys warning that the MQTT connection was lost, then found, then lost again, etc.

Since the restart, it has returned to normal.

However, even now, Gladys is not receiving events from my devices and is no longer executing the associated scenes. Yet, the Zigbee2Mqtt interface still allows me to control my devices.

This morning, same problem.

Symptoms

  • my scenes are not working
  • zigbee2mqtt is still controlling the equipment

Gladys Logs

MQTT connection error in loop.

CPU, RAM, Disk Resources

Everything is normal according to Netdata. The peak at 00:00 corresponds to my Restic backup to backblaze.

Temporary Solution

Restart Gladys.

Hello,

I’m jumping on the topic, especially about the database. If delete operations are too large and costly, why not do several deletes? We divide the operation if there is a certain number of lines? At work, we do that to delete entries, otherwise we block the entire site. Are there improvements to be made on the database side with indexes? We do deletes on something that is perhaps not indexed? That could be a problem.

For the SD card question, I find this approach a bit strange @pierre-gilles, the V4 was designed to always run on a Raspberry Pi and be powerful and fast. The speech is not the same if we have to take an SSD, etc.

It’s a bit of a « firefighter » solution that remains legitimate, for my part I have no problem on my instance but I think that Gladys should work correctly on a Raspberry with an SD card.

Surely new needs, different uses, there must be a lot of optimizations to be made in my opinion.

Ajout des logs réseau

Mon hypothèse de départ pourrait se confirmer @pierre-gilles et @cicoub13. On dirait que l’erreur « non géré » fait planter le service zigbee2mqtt, contrairement à d’habitude, ce n’est pas un log d’avertissement mais un plantage nodejs.

  • Démarrage de Gladys : 07:07:44
  • Première erreur : 07:36:35
    Depuis, plus rien ne fonctionne à nouveau.
Premiers logs d'erreur
2022-02-03T07:36:35+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurSalleaManger, feature boost_heating not configured in Gladys.
2022-02-03T07:36:35+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurSalleaManger, feature boost_heating_countdown not configured in Gladys.
2022-02-03T07:36:35+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurSalleaManger, feature boost_heating_countdown_time_set not configured in Gladys.
2022-02-03T07:36:35+0100 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2022-02-03T07:36:35+0100 <error> index.js:21 (process.<anonymous>) Error: Zigbee2mqqt don't handle value "LOCK" for feature "mode".
    at convertValue (/src/server/services/zigbee2mqtt/utils/convertValue.js:55:17)
    at /src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:92:24
    at Array.forEach (<anonymous>)
    at Zigbee2mqttManager.handleMqttMessage (/src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:86:41)
    at MqttClient.<anonymous> (/src/server/services/zigbee2mqtt/lib/connect.js:53:12)
    at MqttClient.emit (events.js:400:28)
    at MqttClient._handlePublish (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:410:12)
    at work (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:321:12)
    at Writable.writable._write (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:335:5)
    at doWrite (/src/server/services/zigbee2mqtt/node_modules/readable-stream/lib/_stream_writable.js:409:139)
    at writeOrBuffer (/src/server/services/zigbee2mqtt/node_modules/readable-stream/lib/_stream_writable.js:398:5)
    at Writable.write (/src/server/services/zigbee2mqtt/node_modules/readable-stream/lib/_stream_writable.js:307:11)
    at Socket.ondata (internal/streams/readable.js:731:22)
    at Socket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9)
    at Socket.Readable.push (internal/streams/readable.js:206:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
2022-02-03T07:37:48+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar [redacted]@gmail.com
2022-02-03T07:37:48+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar [redacted]@gmail.com
2022-02-03T07:37:48+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Contacts
2022-02-03T07:37:48+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar PERSO
2022-02-03T07:37:48+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Jours fériés en France
2022-02-03T07:37:48+0100 <info> calendar.syncUserCalendars.js:38 (CalDAVHandler.syncUserCalendars) CalDAV : Found 5 calendars.
2022-02-03T07:38:11+0100 <warn> connect.js:44 (MqttClient.<anonymous>) Disconnected from MQTT server
2022-02-03T07:38:16+0100 <info> connect.js:24 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2022-02-03T07:38:16+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2022-02-03T07:38:16+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating not configured in Gladys.
2022-02-03T07:38:16+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating_countdown not configured in Gladys.
2022-02-03T07:38:16+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating_countdown_time_set not configured in Gladys.
2022-02-03T07:38:16+0100 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2022-02-03T07:38:16+0100 <error> index.js:21 (process.<anonymous>) Error: Zigbee2mqqt don't handle value "LOCK" for feature "mode".
    at convertValue (/src/server/services/zigbee2mqtt/utils/convertValue.js:55:17)
    at /src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:92:24
    at Array.forEach (<anonymous>)
    at Zigbee2mqttManager.handleMqttMessage (/src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:86:41)
    at MqttClient.<anonymous> (/src/server/services/zigbee2mqtt/lib/connect.js:53:12)
    at MqttClient.emit (events.js:400:28)
    at MqttClient._handlePublish (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:410:12)
    at work (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:321:12)
    at processTicksAndRejections (internal/process/task_queues.js:77:11)
2022-02-03T07:40:16+0100 <warn> connect.js:44 (MqttClient.<anonymous>) Disconnected from MQTT server
2022-02-03T07:40:21+0100 <info> connect.js:24 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2022-02-03T07:40:21+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#

Logs Gladys de 7h à 9h
> gladys-server@ start:prod /src/server
> cross-env NODE_ENV=production node index.js

2022-02-03T07:07:44+0100 <info> job.purge.js:17 (Job.purge) Deleting all background jobs created before = Thu Jan 27 2022 07:07:44 GMT+0100 (Central European Standard Time)
Initialising OpenZWave 1.6.0 binary addon for Node.JS.
        OpenZWave Security API is ENABLED
        ZWave device db    : /usr/local/etc/openzwave
        User settings path : /src/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
        Option Overrides : --Logging false --ConsoleOutput false --SaveConfiguration true
2022-02-03T07:07:48+0100 <info> service.startAll.js:30 () Service example was manually stopped, so it is ignored at startup
2022-02-03T07:07:48+0100 <info> service.startAll.js:30 () Service rtsp-camera was manually stopped, so it is ignored at startup
2022-02-03T07:07:48+0100 <info> service.startAll.js:30 () Service xiaomi was manually stopped, so it is ignored at startup
2022-02-03T07:07:48+0100 <info> service.startAll.js:30 () Service zwave was manually stopped, so it is ignored at startup
2022-02-03T07:07:48+0100 <info> service.startAll.js:30 () Service tasmota was manually stopped, so it is ignored at startup
2022-02-03T07:07:48+0100 <info> service.startAll.js:30 () Service bluetooth was manually stopped, so it is ignored at startup
2022-02-03T07:07:48+0100 <info> service.startAll.js:30 () Service ewelink was manually stopped, so it is ignored at startup
2022-02-03T07:07:48+0100 <info> service.startAll.js:30 () Service tp-link was manually stopped, so it is ignored at startup
2022-02-03T07:07:48+0100 <info> service.startAll.js:30 () Service google-actions was manually stopped, so it is ignored at startup
2022-02-03T07:07:48+0100 <info> service.startAll.js:30 () Service philips-hue was manually stopped, so it is ignored at startup
2022-02-03T07:07:48+0100 <info> index.js:64 (Object.start) Starting CalDAV service
2022-02-03T07:07:48+0100 <info> index.js:20 (Object.start) Starting Open Weather service
2022-02-03T07:07:48+0100 <info> index.js:19 (Object.start) Starting Telegram service
2022-02-03T07:07:48+0100 <info> init.js:47 () Zigbee2mqtt USB dongle attached to /dev/ttyUSB0
2022-02-03T07:07:48+0100 <info> installMqttContainer.js:103 (Zigbee2mqttManager.installMqttContainer) MQTT broker container successfully started
2022-02-03T07:07:48+0100 <info> installZ2mContainer.js:71 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt container successfully started
2022-02-03T07:07:48+0100 <info> connect.js:24 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2022-02-03T07:07:48+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2022-02-03T07:07:48+0100 <warn> handleMqttMessage.js:100 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt device RadiateurChEnfants not configured in Gladys.
2022-02-03T07:07:48+0100 <warn> handleMqttMessage.js:100 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt device RadiateurChParents not configured in Gladys.
2022-02-03T07:07:48+0100 <info> index.js:13 (Object.start) Starting usb service
2022-02-03T07:07:48+0100 <info> index.js:16 (Object.start) Starting MQTT service
2022-02-03T07:07:48+0100 <info> updateContainer.js:13 (MqttHandler.updateContainer) MQTT: checking for required changes...
2022-02-03T07:07:49+0100 <info> connect.js:38 (MqttClient.<anonymous>) Connected to MQTT server mqtt://localhost
2022-02-03T07:07:49+0100 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic gladys/master/#
2022-02-03T07:07:49+0100 <info> scene.dailyUpdate.js:58 () Sunrise today is at 8:20 today, in your timezone = Europe/Paris
2022-02-03T07:07:49+0100 <info> scene.dailyUpdate.js:59 () Sunset today is at 17:51 today, in your timezone = Europe/Paris
2022-02-03T07:07:49+0100 <info> scene.dailyUpdate.js:67 () Sunrise is scheduled, in an hour.
2022-02-03T07:07:49+0100 <info> scene.dailyUpdate.js:81 () Sunset is scheduled, in 11 hours.
2022-02-03T07:07:49+0100 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval hourly
2022-02-03T07:07:49+0100 <info> index.js:63 (Server.<anonymous>) Server listening on port 80
2022-02-03T07:07:50+0100 <info> index.js:801 (Socket.<anonymous>) Gladys Gateway: connected in websockets
2022-02-03T07:07:50+0100 <info> gateway.checkIfBackupNeeded.js:27 (Gateway.checkIfBackupNeeded) Not backing up instance to Gladys Gateway, last backup is recent.
2022-02-03T07:07:53+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurMouvementEntree, feature illuminance_lux not configured in Gladys.
2022-02-03T07:07:53+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurMouvementEntree, feature linkquality not configured in Gladys.
2022-02-03T07:08:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseBureau, feature linkquality not configured in Gladys.
2022-02-03T07:08:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseBureau, feature power_outage_memory not configured in Gladys.
2022-02-03T07:08:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature linkquality not configured in Gladys.
2022-02-03T07:08:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature power_outage_memory not configured in Gladys.
2022-02-03T07:08:04+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device InterrupteurSansFil, feature linkquality not configured in Gladys.
2022-02-03T07:08:05+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature linkquality not configured in Gladys.
2022-02-03T07:08:05+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature power_on_behavior not configured in Gladys.
2022-02-03T07:08:05+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature update not configured in Gladys.
2022-02-03T07:08:05+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature update_available not configured in Gladys.
2022-02-03T07:08:08+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device InterrupteurSansFil, feature linkquality not configured in Gladys.
2022-02-03T07:08:09+0100 <warn> handleMqttMessage.js:100 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt device guirlandes not configured in Gladys.
2022-02-03T07:08:09+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature linkquality not configured in Gladys.
2022-02-03T07:08:09+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature power_on_behavior not configured in Gladys.
2022-02-03T07:08:09+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature update not configured in Gladys.
2022-02-03T07:08:09+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature update_available not configured in Gladys.
2022-02-03T07:08:09+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature linkquality not configured in Gladys.
2022-02-03T07:08:09+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature power_on_behavior not configured in Gladys.
2022-02-03T07:08:09+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature update not configured in Gladys.
2022-02-03T07:08:09+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature update_available not configured in Gladys.
2022-02-03T07:08:11+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device InterrupteurSansFil, feature linkquality not configured in Gladys.
2022-02-03T07:08:11+0100 <warn> handleMqttMessage.js:100 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt device guirlandes not configured in Gladys.
2022-02-03T07:08:11+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature linkquality not configured in Gladys.
2022-02-03T07:08:11+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature power_on_behavior not configured in Gladys.
2022-02-03T07:08:11+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature update not configured in Gladys.
2022-02-03T07:08:11+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature update_available not configured in Gladys.
2022-02-03T07:08:11+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature linkquality not configured in Gladys.
2022-02-03T07:08:11+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature power_on_behavior not configured in Gladys.
2022-02-03T07:08:11+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature update not configured in Gladys.
2022-02-03T07:08:11+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSalon, feature update_available not configured in Gladys.

[same logs for minutes - I have to reduce the amount of text for discourse to accept my message]

2022-02-03T07:33:17+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurTempCongel, feature linkquality not configured in Gladys.
2022-02-03T07:33:17+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurTempCongel, feature linkquality not configured in Gladys.
2022-02-03T07:33:17+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurTempCongel, feature linkquality not configured in Gladys.
2022-02-03T07:33:32+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurMouvementSalleAManger, feature illuminance_lux not configured in Gladys.
2022-02-03T07:33:32+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurMouvementSalleAManger, feature linkquality not configured in Gladys.
2022-02-03T07:33:32+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurMouvementSalleAManger, feature illuminance_lux not configured in Gladys.
2022-02-03T07:33:32+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurMouvementSalleAManger, feature linkquality not configured in Gladys.
2022-02-03T07:33:41+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature linkquality not configured in Gladys.
2022-02-03T07:33:41+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature power_outage_memory not configured in Gladys.
2022-02-03T07:34:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature linkquality not configured in Gladys.
2022-02-03T07:34:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature power_outage_memory not configured in Gladys.
2022-02-03T07:34:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseBureau, feature linkquality not configured in Gladys.
2022-02-03T07:34:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseBureau, feature power_outage_memory not configured in Gladys.
2022-02-03T07:34:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseBureau, feature linkquality not configured in Gladys.
2022-02-03T07:34:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseBureau, feature power_outage_memory not configured in Gladys.
2022-02-03T07:34:26+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurTempFrigo, feature linkquality not configured in Gladys.
2022-02-03T07:34:26+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurTempFrigo, feature linkquality not configured in Gladys.
2022-02-03T07:34:26+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurTempFrigo, feature linkquality not configured in Gladys.
2022-02-03T07:35:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseBureau, feature linkquality not configured in Gladys.
2022-02-03T07:35:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseBureau, feature power_outage_memory not configured in Gladys.
2022-02-03T07:35:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature linkquality not configured in Gladys.
2022-02-03T07:35:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature power_outage_memory not configured in Gladys.
2022-02-03T07:35:02+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurMouvementSalleAManger, feature illuminance_lux not configured in Gladys.
2022-02-03T07:35:02+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device CapteurMouvementSalleAManger, feature linkquality not configured in Gladys.
2022-02-03T07:36:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseBureau, feature linkquality not configured in Gladys.
2022-02-03T07:36:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseBureau, feature power_outage_memory not configured in Gladys.
2022-02-03T07:36:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature linkquality not configured in Gladys.
2022-02-03T07:36:01+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature power_outage_memory not configured in Gladys.
2022-02-03T07:36:24+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature linkquality not configured in Gladys.
2022-02-03T07:36:24+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device PriseSupp, feature power_outage_memory not configured in Gladys.
2022-02-03T07:36:35+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurSalleaManger, feature boost_heating not configured in Gladys.
2022-02-03T07:36:35+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurSalleaManger, feature boost_heating_countdown not configured in Gladys.
2022-02-03T07:36:35+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurSalleaManger, feature boost_heating_countdown_time_set not configured in Gladys.
2022-02-03T07:36:35+0100 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2022-02-03T07:36:35+0100 <error> index.js:21 (process.<anonymous>) Error: Zigbee2mqqt don't handle value "LOCK" for feature "mode".
    at convertValue (/src/server/services/zigbee2mqtt/utils/convertValue.js:55:17)
    at /src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:92:24
    at Array.forEach (<anonymous>)
    at Zigbee2mqttManager.handleMqttMessage (/src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:86:41)
    at MqttClient.<anonymous> (/src/server/services/zigbee2mqtt/lib/connect.js:53:12)
    at MqttClient.emit (events.js:400:28)
    at MqttClient._handlePublish (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:410:12)
    at work (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:321:12)
    at Writable.writable._write (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:335:5)
    at doWrite (/src/server/services/zigbee2mqtt/node_modules/readable-stream/lib/_stream_writable.js:409:139)
    at writeOrBuffer (/src/server/services/zigbee2mqtt/node_modules/readable-stream/lib/_stream_writable.js:398:5)
    at Writable.write (/src/server/services/zigbee2mqtt/node_modules/readable-stream/lib/_stream_writable.js:307:11)
    at Socket.ondata (internal/streams/readable.js:731:22)
    at Socket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9)
    at Socket.Readable.push (internal/streams/readable.js:206:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
2022-02-03T07:37:48+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar [redacted]@gmail.com
2022-02-03T07:37:48+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar [redacted]@gmail.com
2022-02-03T07:37:48+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Contacts
2022-02-03T07:37:48+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar PERSO
2022-02-03T07:37:48+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Jours fériés en France
2022-02-03T07:37:48+0100 <info> calendar.syncUserCalendars.js:38 (CalDAVHandler.syncUserCalendars) CalDAV : Found 5 calendars.
2022-02-03T07:38:11+0100 <warn> connect.js:44 (MqttClient.<anonymous>) Disconnected from MQTT server
2022-02-03T07:38:16+0100 <info> connect.js:24 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2022-02-03T07:38:16+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2022-02-03T07:38:16+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating not configured in Gladys.
2022-02-03T07:38:16+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating_countdown not configured in Gladys.
2022-02-03T07:38:16+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating_countdown_time_set not configured in Gladys.
2022-02-03T07:38:16+0100 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2022-02-03T07:38:16+0100 <error> index.js:21 (process.<anonymous>) Error: Zigbee2mqqt don't handle value "LOCK" for feature "mode".
    at convertValue (/src/server/services/zigbee2mqtt/utils/convertValue.js:55:17)
    at /src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:92:24
    at Array.forEach (<anonymous>)
    at Zigbee2mqttManager.handleMqttMessage (/src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:86:41)
    at MqttClient.<anonymous> (/src/server/services/zigbee2mqtt/lib/connect.js:53:12)
    at MqttClient.emit (events.js:400:28)
    at MqttClient._handlePublish (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:410:12)
    at work (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:321:12)
    at processTicksAndRejections (internal/process/task_queues.js:77:11)
2022-02-03T07:40:16+0100 <warn> connect.js:44 (MqttClient.<anonymous>) Disconnected from MQTT server
2022-02-03T07:40:21+0100 <info> connect.js:24 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2022-02-03T07:40:21+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2022-02-03T07:40:21+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating not configured in Gladys.
2022-02-03T07:40:21+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating_countdown not configured in Gladys.
2022-02-03T07:40:21+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating_countdown_time_set not configured in Gladys.
2022-02-03T07:40:21+0100 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2022-02-03T07:40:21+0100 <error> index.js:21 (process.<anonymous>) Error: Zigbee2mqqt don't handle value "LOCK" for feature "mode".
    at convertValue (/src/server/services/zigbee2mqtt/utils/convertValue.js:55:17)
    at /src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:92:24
    at Array.forEach (<anonymous>)
    at Zigbee2mqttManager.handleMqttMessage (/src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:86:41)
    at MqttClient.<anonymous> (/src/server/services/zigbee2mqtt/lib/connect.js:53:12)
    at MqttClient.emit (events.js:400:28)
    at MqttClient._handlePublish (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:410:12)
    at work (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:321:12)
    at processTicksAndRejections (internal/process/task_queues.js:77:11)
2022-02-03T07:42:21+0100 <warn> connect.js:44 (MqttClient.<anonymous>) Disconnected from MQTT server
2022-02-03T07:42:26+0100 <info> connect.js:24 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2022-02-03T07:42:26+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2022-02-03T07:42:26+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating not configured in Gladys.
2022-02-03T07:42:26+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating_countdown not configured in Gladys.
2022-02-03T07:42:26+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating_countdown_time_set not configured in Gladys.
2022-02-03T07:42:26+0100 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2022-02-03T07:42:26+0100 <error> index.js:21 (process.<anonymous>) Error: Zigbee2mqqt don't handle value "LOCK" for feature "mode".
    at convertValue (/src/server/services/zigbee2mqtt/utils/convertValue.js:55:17)
    at /src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:92:24
    at Array.forEach (<anonymous>)
    at Zigbee2mqttManager.handleMqttMessage (/src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:86:41)
    at MqttClient.<anonymous> (/src/server/services/zigbee2mqtt/lib/connect.js:53:12)
    at MqttClient.emit (events.js:400:28)
    at MqttClient._handlePublish (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:410:12)
    at work (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:321:12)
    at processTicksAndRejections (internal/process/task_queues.js:77:11)
2022-02-03T07:44:26+0100 <warn> connect.js:44 (MqttClient.<anonymous>) Disconnected from MQTT server
2022-02-03T07:44:31+0100 <info> connect.js:24 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2022-02-03T07:44:31+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2022-02-03T07:44:31+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating not configured in Gladys.
2022-02-03T07:44:31+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating_countdown not configured in Gladys.
2022-02-03T07:44:31+0100 <warn> handleMqttMessage.js:96 () Zigbee2mqtt device RadiateurChEnfants, feature boost_heating_countdown_time_set not configured in Gladys.
2022-02-03T07:44:31+0100 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2022-02-03T07:44:31+0100 <error> index.js:21 (process.<anonymous>) Error: Zigbee2mqqt don't handle value "LOCK" for feature "mode".
    at convertValue (/src/server/services/zigbee2mqtt/utils/convertValue.js:55:17)
    at /src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:92:24
    at Array.forEach (<anonymous>)
    at Zigbee2mqttManager.handleMqttMessage (/src/server/services/zigbee2mqtt/lib/handleMqttMessage.js:86:41)
    at MqttClient.<anonymous> (/src/server/services/zigbee2mqtt/lib/connect.js:53:12)
    at MqttClient.emit (events.js:400:28)
    at MqttClient._handlePublish (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:410:12)
    at work (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:321:12)
    at processTicksAndRejections (internal/process/task_queues.js:77:11)
2022-02-03T07:46:31+0100 <warn> connect.js:44 (MqttClient.<anonymous>) Disconnected from MQTT server

I will propose a fix this afternoon.

You confirm that an error is not handled and crashes the service?

Yes

PR to review here: Fix 1426: Fix critical bug in Zigbee2mqtt integration that could slow down the Gladys instance in case a message is not converted by cicoub13 · Pull Request #1427 · GladysAssistant/Gladys · GitHub

Thanks for your fix! I’ll test that on my gladys instance.

Gladys starts up and the Zigbee service works fine. If by tonight Gladys is still working, it means the fix solved my problem.

[EDIT] Gladys is still working, the fix has solved my problem!

Great job @cicoub13!

I prefer it to be a problem like this rather than a more general performance issue. Then we’ll see if it also resolves the issues at @VonOx.

@cicoub13’s PR was good for me, I merged and launched a Docker build on the dev tag.

I’m not available this weekend to monitor a release, so I’ll probably do a prod release early next week :slight_smile: