danielwelch / hassio-zigbee2mqtt

Hass.io add-on for zigbee2mqtt
Apache License 2.0
566 stars 189 forks source link

Failed to save addon configuration - missing option adapter: zigate #498

Closed kbouh320 closed 3 years ago

kbouh320 commented 3 years ago

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

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

Description of problem: Hello, I simply try to setup the addon with the adapter: zigate option according to https://www.zigbee2mqtt.io/information/supported_adapters.html#zigate-usb-ttl . When i do so, I get the folowing error when saving the config:

Failed to save addon configuration, not a valid value for dictionary value @ data['options']. Got {'data_path': '/share/zigbee2mqtt', 'external_converters': [], 'devices': 'devices.yaml', 'groups': 'groups.yaml', 'homeassistant': True, 'permit_join': False, 'mqtt': {'base_topic': 'zigbee2mqtt', 'server': 'mqtt://127.0.0.1:1883', 'user': 'broker', 'password': 'XXXXXX'}, 'serial': {'adapter': 'zigate', 'port': '/dev/serial/by-id/usb-Silicon_Labs_ZiGate_0001-if00-port0', 'baudrate': 115200}, 'advanced': {'log_level': 'info', 'pan_id': 6754, 'channel': 11, 'network_key': [1, 3, 5, 7, 9, ...

I guess that the zigate option is not yet implemented in the module ? Just for the sake of trying, with the adapter: deconz, the configuration will save correctly thanks

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://127.0.0.1:1883'
  user: broker
  password: x
serial:
  adapter: zigate
  port: /dev/serial/by-id/usb-Silicon_Labs_ZiGate_0001-if00-port0
  baudrate: 115200
advanced:
  log_level: info
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
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

ciotlosm commented 3 years ago

@kbouh320 Seems this option is missing:

https://github.com/danielwelch/hassio-zigbee2mqtt/blob/master/zigbee2mqtt/config.json#L103

This will have to be corrected with a new release. I will try to include this together with https://github.com/danielwelch/hassio-zigbee2mqtt/issues/499

kbouh320 commented 3 years ago

@ciotlosm great thank you

ciotlosm commented 3 years ago

This is now part of https://github.com/zigbee2mqtt/hassio-zigbee2mqtt 1.17.0 I'll also accept the PR on this as soon as I get sometime to rebase it for 1.17.0