zigbee2mqtt error message

I feel like we’ve already had this discussion, that the Sonoff dongle had issues, but that it works very well with your other dongle.

It’s true, I confirm what I said in other posts, but I would like to know if I’m the only one in this case, I haven’t seen any other messages to that effect.

Thanks for your feedback @jparbel :slight_smile: I’m waiting for feedback from other Zigbee2mqtt users and I will deploy an update with this development.

@lmilcent if you have some time to test this build, especially since you are the creator of the GitHub issue!

I will re-test. I have the impression that the mapping of my Xiaomi wireless button is different because my scene allowing me to turn on/off my lamp was no longer working.

I will try again to check and investigate as soon as I have some time and I will keep you informed!

Hi @lmilcent, have you been able to re-test since? :slight_smile:

Sorry for the big delay, it’s quite busy at work. I’m also in the process of reinstalling a https://www.ldlc.com/fiche/PB00276535.html that I was able to get for free to make my home automation server (Gladys, VPN and other services), of course I forgot to test the dev build again :sweat_smile:

Come on, I’ll try to do this as soon as possible :slight_smile:

I confirm @pierre-gilles, there are changes that break my installation.

What’s broken (at first glance)

  1. I have errors related to Gladys Plus (subscription removed) that occur regularly.
Logs
2022-04-14T10:07:09+0200 <warn>handleMqttMessage.js:100 () Zigbee2mqtt device PriseSupp, feature power_outage_memory not configured in Gladys.
2022-04-14T10:07:12+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementEntree, feature illuminance_lux not configured in Gladys.
2022-04-14T10:07:12+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementEntree, feature linkquality not configured in Gladys.
2022-04-14T10:07:12+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementEntree, feature illuminance_lux not configured in Gladys.
2022-04-14T10:07:12+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementEntree, feature linkquality not configured in Gladys.
2022-04-14T10:07:16+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementSalon, feature illuminance_lux not configured in Gladys.
2022-04-14T10:07:16+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementSalon, feature linkquality not configured in Gladys.
2022-04-14T10:07:17+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementSalon, feature illuminance_lux not configured in Gladys.
2022-04-14T10:07:17+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementSalon, feature linkquality not configured in Gladys.
2022-04-14T10:07:46+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementSalleAManger, feature illuminance_lux not configured in Gladys.
2022-04-14T10:07:46+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementSalleAManger, feature linkquality not configured in Gladys.
2022-04-14T10:08:00+0200 <info> scene.checkCalendarTriggers.js:24 (SceneManager.checkCalendarTriggers) Checking calendar triggers at Thu, 14 Apr 2022 08:08:00 GMT
2022-04-14T10:08:09+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device PriseBureau, feature linkquality not configured in Gladys.
2022-04-14T10:08:09+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device PriseBureau, feature power_outage_memory not configured in Gladys.
2022-04-14T10:08:09+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device PriseSupp, feature linkquality not configured in Gladys.
2022-04-14T10:08:09+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device PriseSupp, feature power_outage_memory not configured in Gladys.
2022-04-14T10:08:23+0200 <warn> index.js:828 (Socket.<anonymous>) Socket disconnected by the server. Trying to reconnect...
2022-04-14T10:08:23+0200 <warn> index.js:794 (Socket.<anonymous>) Gladys Gateway: Unable to get new access token or refresh user list.
2022-04-14T10:08:23+0200 <warn> index.js:795 (Socket.<anonymous>) Error: Request failed with status code 403
    at createError (/src/server/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/src/server/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/src/server/node_modules/axios/lib/adapters/http.js:269:11)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  config: {
    url: 'https://api.gladysgateway.com/instances/access-token',
    method: 'get',
    headers: {
      Accept: 'application/json, text/plain, */*',
      authorization: 'xxxxxxxxxxxxxx',
      'User-Agent': 'axios/0.21.4'
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    data: undefined
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'api.gladysgateway.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'api.gladysgateway.com',
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 14971,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object],
      [Symbol(RequestTimeout)]: undefined
    },
    _header: 'GET /instances/access-token HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'authorization: xxxxxxxxxxxxxxxxxxxxxxx1Z1yLZZRvktInSYpXxNRoDcQx3vYNIviy7b9M\r\n' +
      'User-Agent: axios/0.21.4\r\n' +
      'Host: api.gladysgateway.com\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object],
      requests: {},
      sockets: [Object],
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/instances/access-token',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      socket: [TLSSocket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      headers: [Object],
      rawHeaders: [Array],
      trailers: {},
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 403,
      statusMessage: 'Forbidden',
      client: [TLSSocket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'https://api.gladysgateway.com/instances/access-token',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(RequestTimeout)]: undefined
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'api.gladysgateway.com',
    protocol: 'https:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'https://api.gladysgateway.com/instances/access-token',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      authorization: [Array],
      'user-agent': [Array],
      host: [Array]
    }
  },
  response: {
    status: 403,
    statusText: 'Forbidden',
    headers: {
      server: 'nginx/1.19.3',
      date: 'Thu, 14 Apr 2022 08:08:23 GMT',
      'content-type': 'application/json; charset=utf-8',
      'content-length': '67',
      connection: 'close',
      'x-powered-by': 'Express',
      'access-control-allow-origin': '*',
      'access-control-allow-methods': 'GET,PUT,POST,PATCH,DELETE,OPTIONS',
      'access-control-allow-headers': 'Content-Type, Authorization, Content-Length, X-Requested-With',
      etag: 'W/"43-cmA3lePMVRz8mAO0r30P2lM8MEc"',
      'strict-transport-security': 'max-age=31536000'
    },
    config: {
      url: 'https://api.gladysgateway.com/instances/access-token',
      method: 'get',
      headers: [Object],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 0,
      adapter: [Function: httpAdapter],
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      validateStatus: [Function: validateStatus],
      transitional: [Object],
      data: undefined
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      socket: [TLSSocket],
      _header: 'GET /instances/access-token HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'authorization: xxxx xxxxxxxxxxxx xx xxxRvktInSYpXxNRoDcQx3vYNIviy7b9M\r\n' +
        'User-Agent: axios/0.21.4\r\n' +
        'Host: api.gladysgateway.com\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/instances/access-token',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'api.gladysgateway.com',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    data: {
      status: 403,
      error_code: 'FORBIDDEN',
      error_message: 'Forbidden'
    }
  },
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
2022-04-14T10:08:28+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementSalon, feature illuminance_lux not configured in Gladys.
2022-04-14T10:08:28+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementSalon, feature linkquality not configured in Gladys.
2022-04-14T10:08:28+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementSalon, feature illuminance_lux not configured in Gladys.
2022-04-14T10:08:28+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device CapteurMouvementSalon, feature linkquality not configured in Gladys.
  1. When I click on my wireless switch, I get two warnings and my switch does not work, so my scene does not run.
2022-04-14T10:09:02+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device InterrupteurSansFil, feature linkquality not configured in Gladys.
2022-04-14T10:09:02+0200 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device InterrupteurSansFil, feature temperature not configured in Gladys.

Investigations

  • However, the button is well detected:

  • By deleting / re-creating the wireless button (which has very very strongly slowed down the system of my Raspberry Pi):

    • We see that it is well node that uses the majority of the disk (and the monitoring agent netdata which adds to it, but that is personal, outside of gladys)

Solution

I think my previous tests did not change anything. What happened is that the simple click is no longer equal to 1, but equal to 0 now.
My scene used the 1, which mechanically made it obsolete.

By changing the value of my scene to = 0 then it is functional again. You have to be careful here, because this risks breaking a lot of scenes, on the different types of clicks (single, double, long)

MOD Edit :
I took the liberty of editing your post to remove the authorization tokens… you never know!!

Thanks for your feedback @lmilcent!

Ok, I see, that’s not great.

On the other hand, I didn’t understand if this PR solved your problems. Can you discuss with @AlexTrovato to see how we could make this PR work?

Well, the conclusion is that I was too quick, I merged this PR too early on master, and now we have a master that is no longer deployable. I would revert the PR if needed if I want to deploy the other fixes first, I haven’t done a release of Gladys for 2 weeks now :sweat_smile:

I’ll reply to your other comments, but they are not related to this PR:

This is a known limitation of the current implementation of device deletion, which cascade deletes all states, saturating the disk bandwidth until everything is deleted :wink:

See:

Have you disconnected Gladys Plus in the settings?

Ok indeed, I see that I was a bit hasty on the « button click ».
I correct the mapping to match Gladys’s click mapping.

Regarding the warning logs:

  • linkquality concerns the signal quality, not yet mapped
  • temperature should generate a feature on your concerned device, although I am quite surprised to see this kind of feature on a switch

@lmilcent do you know which docker image (Gladys version) you are using?
I am generating a new image (up-to-date on the Gladys trunk) containing the mapping fix: atrovato/gladys:zigbee2mqtt (available in 2 hours).
You will therefore have to put your scene back as it was before, in order to test that it is not more broken.

@pierre-gilles the fix is quite simple, as the code is isolated.

If you notice other things, I am on the alert!
I think these changes are necessary for z2m, we must not let go!!!

Thanks :slight_smile:

If you notice anything else, I’m on high alert!
I think these changes are necessary for z2m, we must not give up!!!

Thank you :slight_smile:
Hello @AlexTrovato
I take advantage of your offer, I don’t know if my request falls within the scope of your proposal, but if you can look at the Xiaomi LLKZMK11LM (double relay) issue

I thank you in advance

@Psoy which version are you currently on? Because I see two things for your problem:

  1. Originally (before my changes) only the first switch (state) was managed as an actuator in Gladys
  2. The display and management of the multi-switch for a device on the dashboard which concerns another more global point that I will not address here

Which version are you currently on? Because I see two things for your problem:
Gladys version 4.8.3 (Pierre-Gilles image installation).
For me, the problem is still the same, no evolution.

Indeed, the first switch works normally

Too bad, I will wait, I thank you for answering
Have a good day

Ok it works! :slight_smile: I had the impression with the message from @lmilcent that it was more serious, if it’s just PR end details, all the better :wink:

Yes I think so too! Thanks again for your availability and for this PR!! :slight_smile:

For the Gladys Plus part @pierre-gilles, I’ve disconnected everything to my knowledge!

And for the container version, it was the latest :dev when I tested. I always do a pull before creating the container.

Otherwise, the rest seems functional, I haven’t noticed anything else.

@lmilcent does the PR from @AlexTrovato correctly fix the issue?

The others on Zigbee2mqtt, does this image work well for you?

It’s been a week now since it’s been running and I haven’t noticed anything else. My scenes still work (after the mentioned modifications).
And no more error messages, except those related to Gladys Plus.

Exactly, normally @AlexTrovato’s PR is supposed to prevent having to make modifications, is that the case?

I realize that my current image is the dev tag of Gladys, not the one from @AlexTrovato. I’ll launch it and keep you posted!

I just realized that I had to restore a backup during testing, as Gladys Plus was no longer « disconnected. » That’s why I had errors in the logs.

Thanks to the current offer, I just got Gladys Plus, which will allow me to test the restoration of all my scenes, Zigbee service, and dashboard. I will give you feedback in a dedicated post.

2 Likes