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

"homeassistant: null" makes z2m fail to start #12340

Closed
okastl opened this issue May 1, 2022 · 13 comments
Closed

"homeassistant: null" makes z2m fail to start #12340

okastl opened this issue May 1, 2022 · 13 comments
Labels
problem Something isn't working

Comments

@okastl
Copy link

okastl commented May 1, 2022

What happened?

After updating from z2m 1.25 to 1.25.1 it fails to start:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            READ THIS CAREFULLY

Refusing to start because configuration is not valid, found the following errors:
- devices/0xb4e3f9fffe19f03b/homeassistant must be object
- devices/0x00124b00226babf1/homeassistant must be object

If you don't know how to solve this, read https://www.zigbee2mqtt.io/guide/configuration

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

The offending setting is homeassistant: null as described here: https://www.zigbee2mqtt.io/guide/configuration/devices-groups.html

Set homeassistant: null to skip discovery for this device

This no longer works.

What did you expect to happen?

"homeassistant: null" should continue to work.

How to reproduce it (minimal and precise)

Stop z2m.
Add homeassistant: null to a device.
Start z2m.

Zigbee2MQTT version

1.25.1

Adapter firmware version

20220219

Adapter

Slaesh

Debug log

No response

@okastl okastl added the problem Something isn't working label May 1, 2022
@65698888
Copy link

65698888 commented May 2, 2022

Zigbee2mqtt configuration - Save, click OK and restart the add-in to return to normal.

@okastl
Copy link
Author

okastl commented May 2, 2022

Zigbee2mqtt configuration - Save, click OK and restart the add-in to return to normal.

Thanks, but this won't make z2m 1.25.1 recognize homeassistant: null parameter.
https://www.zigbee2mqtt.io/guide/configuration/devices-groups.html#common-device-options

@mdehaas
Copy link

mdehaas commented May 2, 2022

Tried to replace 'null' with '{}' (an empty object) for the devices I do not want discovered in HA. This clears the error but the devices are discovered in HA.

@Koenkk
Copy link
Owner

Koenkk commented May 2, 2022

Can you provide your complete configuration.yaml?

@okastl
Copy link
Author

okastl commented May 2, 2022

Can you provide your complete configuration.yaml?

I made a simple example test installation.

configuration.zip

@Soyde
Copy link

Soyde commented May 2, 2022

Hi, same problem here.

I have fixed changing:
Before: homeassistant: null
After: homeassistant: {}

Complete device configuration after fix, like follows:

'0x00123c0001234d5f':
friendly_name: Salón Árbol Navidad
homeassistant: {}

Hope it helps anyone.
Regards!

@okastl
Copy link
Author

okastl commented May 2, 2022

I have fixed changing: Before: homeassistant: null After: homeassistant: {}

Unfortunately this isn't the same. homeassistant: {} will not skip adding the device to homeassistant discovery, as homeassistant: null did.

@Soyde
Copy link

Soyde commented May 2, 2022

I have fixed changing: Before: homeassistant: null After: homeassistant: {}

Unfortunately this isn't the same. homeassistant: {} will not skip adding the device to homeassistant discovery, as homeassistant: null did.

But at least it solves the problem, Zigbetomqtt starts, and everything works again.
Then, you can edit the device, and disable it at HomeAssistant.

image

@mdehaas
Copy link

mdehaas commented May 3, 2022

I have fixed changing: Before: homeassistant: null After: homeassistant: {}

Unfortunately this isn't the same. homeassistant: {} will not skip adding the device to homeassistant discovery, as homeassistant: null did.

That is indeed what I stated in the next sentence. It is a workaround to get Z2M to start. I could also have commented the line. The effect would be the same.

@mdehaas
Copy link

mdehaas commented May 3, 2022

Can you provide your complete configuration.yaml?

The issue is in the devices.yaml file as I think you have understood. Just to be sure.

external_converters: []
devices:
  - devices.yaml
groups:
  - groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  user: addons
  password: RemovedForPosting
  server: mqtt://core-mosquitto:1883
serial:
  port: >-
    /dev/serial/by-id/usb-Silicon_Labs_slae.sh_cc2652rb_stick_-_slaesh_s_iot_stuff_00_12_4B_00_23_93_26_AB-if00-port0
advanced:
  log_level: info
  pan_id: 6754
  channel: 11
  network_key:
    - removed
    - for
    - posting
  availability_blocklist: []
  availability_passlist: []
  ikea_ota_use_test_url: true
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental: {}
availability: false

@Koenkk
Copy link
Owner

Koenkk commented May 3, 2022

Fixed now.

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

@okastl
Copy link
Author

okastl commented May 3, 2022

Fixed now.

Thank you!

@okastl okastl closed this as completed May 3, 2022
@gado070707
Copy link

Fixed for me too !
Thank you.

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

No branches or pull requests

6 participants