-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Startup not completing? (Z2M UNUSABLE!) #24625
Comments
I thought this might be related to zigbee2mqtt/hassio-zigbee2mqtt#624 - however my Z2M is not 'functioning normally' (publishing to the MQTT server), and I don't have availability: true enabled. |
I know several users had issues when moving to that broker and quickly reverted (i.e. never got any answers...).
|
Can you try moving back to mosquitto? |
@Nerivec I noticed that it does get the MQTT error, disconnects, then connects the second time (I can verify from EMQX that zigbee2mqtt was connected). So there was definitely something weird about the connection then disconnection. HOWEVER, if it could not connect, I would expect it would shut down Z2M (which it does not). That is what happens if I have an incorrect passwrod or the MQTT server is not accessible at all. @Koenkk Changing back to mosquitto fixed it, and I see stuff publishing to the MQTT server again, and I see a UI. So from a base functionality perspective, I guess it's working. But from a usability perspective I don't see why EMQX would not work (as it DOES make a connection, and maintains it, otherwise Z2M would die due to no MQTT connection). I would ideally like to move to EMQX as it has much better management and monitoring capabilities. |
I figured out how to fix this. When I traced the connection from the EMQX side, I saw:
The max packet size was set to the default on EMQX, which was 1MB. So this yields two questions.
I guess now this is more a 'this is a bug, but no longer affecting me specifically' ticket. |
It must be something specific to your network that creates such a huge packet. |
Here is, the 4100 bytes it prints in the log, presumably truncated:
I have a lot (70? 80?) of Inovelli Blue switches, and I guess the description of them can be verbose once you factor in descriptions. And I have ~180 devices total. |
Indeed, lots of features per device (multi-function), larger payload.
Yes, from retained on startup. |
Presumably the size of that could be calculated before you send the max packet size. |
@Nerivec Unless I mistake the PR, even with the change, the max packet size would still need to be adjusted on the broker side to allow large packets - the Z2M setting is just the max packet size it will allow FROM the broker. At least, that's how the docs read. If that's the case, there should probably be a section in the website docs on 'Broker setup' for what options may need to be changed (more than just documenting the field exists as a notation on the maximum_packet_size setting). Or at least put it under the Zigbee2MQTT fails to start section. |
Like this? Koenkk/zigbee2mqtt.io#3233 😉 And about the behavior, yes that's how I interpret the docs too, but from the behaviors I've seen, I'd say it's not respected/enforced in all brokers (yet). Guessing v5 still needs better support overall 😅 |
@Nerivec OK .. so you read my mind. Damn you ;) Awesome :) |
What happened?
I migrated from TrueNAS 24.04 -> 24.10, which meant my container went from being Kubernetes to Docker (which actually gives me more control).
I also moved from Mosquitto to EMQX for an MQTT broker.
Since doing so, Z2M is not completing it's startup.
Specifically, the Ember driver is coming up, and detects all my zigbee devices.
I also see Z2M logged into the EMQX server, and subscribed to zigbee2mqtt/#
HOWEVER:
If I turn on debugging, I see communications with the Zigbee network, but nothing else.
What did you expect to happen?
I expected the Z2M UI to show up.
I expected it to publish the state of my devices.
How to reproduce it (minimal and precise)
Just start up the docker container. Here is my container config:
Any my configuration.yaml:
Zigbee2MQTT version
latest (1.41.0)
Adapter firmware version
8.0.2 [GA]
Adapter
Sonoff Dongle-E
Setup
Docker container in TrueNAS Scale
Debug log
log.log.gz
The text was updated successfully, but these errors were encountered: