danielwelch / hassio-zigbee2mqtt

Hass.io add-on for zigbee2mqtt
Apache License 2.0
565 stars 190 forks source link

addon does not start after update (1.17.0.1) #510

Closed biscuit-316 closed 3 years ago

biscuit-316 commented 3 years ago

zigbee2mqtt add-on version (if edge, please report commit hash):

Operating environment (HassOS, Virtual Machine, Device/platform running Home Assistant):

running a vm in proxmox HassOs: version 5.10 Supervisor: version 2020.12.7 zigbee2mqtt addon: version 1.17.0.1

Description of problem: after the update the add-on doesn't start.

I get the following error: Failed to start addon - configuration validation failed! Unknown secret network_key.

!secret network_key referce probebly to the line: network_key_string: '!secret network_key'

Your entire configuration from the frontend (with sensitive fields redacted):

data_path: /share/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://core-mosquitto'
  user: '!secret Z2M_MQTT_user'
  password: '!secret Z2M_MQTT_pass'
serial:
  port: >-
    /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018E29841-if00
  disable_led: true
advanced:
  log_level: info
  pan_id: 6754
  channel: 11
  network_key: []
  network_key_string: '!secret network_key'
  availability_blocklist: []
  availability_passlist: []
  availability_timeout: 60
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental:
  new_api: true
socat:
  enabled: false
  master: 'pty,raw,echo=0,link=/dev/ttyZ2M,mode=777'
  slave: 'tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5'
  restartdelay: 1
  initialdelay: 1
  options: '-d -d'
  log: false

Your logs from Home Assistant empty, the addon does not start. the error appears as a pop up.

ciotlosm commented 3 years ago

From which version were you updating?

biscuit-316 commented 3 years ago

I updated from version: 1.17.0

ciotlosm commented 3 years ago

Maybe you have some bad character there (hidden) like a new line or something.

biscuit-316 commented 3 years ago

the secrets.yml file reads one line per reference. so there will be no new line characters in it.

The plugin's documentation does not tell you what the string should look like. after much experimentation this turned out to work with the previous version:

network_key: [198, 217, 35, 2, 147, 217, 60, 55, 78, 3, 84, 0, 184, 23, 235, 129]

When the plugin works I will create a new string.

mikhail5555 commented 3 years ago

For your secret you need to provide it as a string, so in your case (in the secrets.yaml): network_key: '198,217,35,2,147,217,60,55,78,3,84,0,184,23,235,129'

biscuit-316 commented 3 years ago

It works.

Thank you.