Network_key ignored in Zigbee2MQTT config

In an attempt to be more secure, I’ve generated and added a network_key to the Zigbee2MQTT config via both the YAML editor in the addon, and manually editing the config/zigbee2mqtt/configuration.yaml file via the terminal, and restarted, but it does not appear to be using the network key, as the existing devices can still connect and be controlled.

Is this a bug in Zigbee2MQTT, or am I doing something silly as a new user? :slight_smile:

Thanks for the help :slight_smile:

To try and debug this further, I’ve sniffed the pairing of a new device and extracted the key in use:

image

Which does not match the key I set in the config. I’m guessing there’s another config somewhere that’s overriding this or something. Would be interested to hear if anyone else has any idea where that could be?

I found a copy of the sniffed key (starting 2a09a64…) in config/zigbee2mqtt/coordinator_backup.json but couldn’t see it anywhere else, so still not sure where it’s getting it from, and why it’s not loaded from the config/zigbee2mqtt/configuration.yaml file

There’s a setting in Z2M (The UI) where you can place a network key. Verify it’s not populated.

Thanks @petro. I can confirm it’s empty in the Z2M UI

It stays empty in my frontend as well, even when I copy it from the configuration yaml to the UI field and press submit & restart. Why?