Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] only partial connection to z2m #404

Open
Zirafarafa opened this issue Sep 20, 2021 · 5 comments
Open

[BUG] only partial connection to z2m #404

Zirafarafa opened this issue Sep 20, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@Zirafarafa
Copy link

Describe the bug

z2ma appears to not fully connect to mqtt. I can see my device list, but

  • The version of Zigbee2Mqtt in the Status tab is blank,
  • Clicking the 'Allow devices to join' button does not send any message to z2m
  • No device shows its uptime in the Devices tab.

To Reproduce

This reproduces every time i create/recreate my z2ma docker container.

Steps I took to try resolve the problem

I have tried a few things:

  • Installed the latest version
  • Installed multiple previous versions (back to carldebilly/zigbee2mqttassistant:0.3.178-399-linux-arm32)
  • Tried different version of zigbee2mqtt (from 1.19.1 to 1.21.1)

Screenshots

  • image
  • image

Installation

  • Version of Zigbee2Mqtt: 1.19.1 and later
  • Version of Zigbee2MqttAssistant:0.3.178-399 and later
  • Installation type (HASS.IO, Docker...): docker
  • Docker version + CPU type (amd64, arm arm64...): docker 18.09.1, arm32 (raspberry pi)

Pertinent logs

I do not see any information in the zigbee2mqtt logs when pressing 'Allow devices to join'

z2ma startup logs:

zigbee2mqttAssistant    | Starting Zigbee2MqttAssistant v0.3.178+Branch.master.Sha.7b1877a40d9d37c5a18e33632ecf85e6eda09a95...
zigbee2mqttAssistant    | warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
zigbee2mqttAssistant    |       Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.
zigbee2mqttAssistant    | warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
zigbee2mqttAssistant    |       No XML encryptor configured. Key {86466ab2-dde7-487b-98b4-bc291cd92b28} may be persisted to storage in unencrypted form.
zigbee2mqttAssistant    | Hosting environment: Production
zigbee2mqttAssistant    | Content root path: /app
zigbee2mqttAssistant    | Now listening on: http://[::]:80
zigbee2mqttAssistant    | Application started. Press Ctrl+C to shut down.

After clicking the Status tab

zigbee2mqttAssistant    | fail: Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery[7]
zigbee2mqttAssistant    |       An exception was thrown while deserializing the token.
zigbee2mqttAssistant    | Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted.
zigbee2mqttAssistant    |  ---> System.Security.Cryptography.CryptographicException: The key {21511362-727d-4ecb-a0dc-482ee4c079c4} was not found in the key ring.
zigbee2mqttAssistant    |    at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)
zigbee2mqttAssistant    |    at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked)
zigbee2mqttAssistant    |    at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)
zigbee2mqttAssistant    |    at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
zigbee2mqttAssistant    |    --- End of inner exception stack trace ---
zigbee2mqttAssistant    |    at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
zigbee2mqttAssistant    |    at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)

Additional context

I have no issues between homeassistant and z2m

I can use an external mqtt client to successfully set zigbee2mqtt/bridge/request/permit_join to true or false. The z2m logs in this case look like:

zigbee2mqtt             | Zigbee2MQTT:info  2021-09-20 08:36:27: Zigbee: allowing new devices to join.
zigbee2mqtt             | Zigbee2MQTT:info  2021-09-20 08:36:27: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"value":true},"status":"ok"}'
zigbee2mqtt             | Zigbee2MQTT:info  2021-09-20 08:36:58: Zigbee: disabling joining new devices.
zigbee2mqtt             | Zigbee2MQTT:info  2021-09-20 08:36:59: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"value":false},"status":"ok"}'
@Zirafarafa Zirafarafa added the bug Something isn't working label Sep 20, 2021
@MrTheBarbarian
Copy link

Hello! In my case is the same. Did you find workaround?

@danmandle
Copy link

I am also experiencing this issue. When viewing the network tab in Chrome after any action that requires a POST, it shows (pending) and eventually times out. Same as OP, I've tried multiple z2mA versions and they all have the same behavior. I've tried on multiple machines and multiple browsers.

@Lefuneste83
Copy link

Same issue on a fresh install of this Add-on. It used to work until I reinstalled my Z2M raspberry pi (dedicated install) with latest Dev version. HA is running on Docker with no access to USB port (VM in TrueNas).

Not sure what is going on, but this add-on seems to be more or less abandoned with no updates nor reactions to issues and an increasing pile of bugs. This is quite disappointing.

@nakermann1973
Copy link

Since zigbee2mqtt now has a frontend (https://www.zigbee2mqtt.io/guide/configuration/frontend.html), I have stopped using zigbee2mqttassistant

@Lefuneste83
Copy link

Agreed. Much better UI and functionalities. Wish it could be integrated in HA though. It should be easy to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants