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

AddOn does not start after upgrade to 2.0.0-1 #688

Open
promofu opened this issue Jan 4, 2025 · 39 comments
Open

AddOn does not start after upgrade to 2.0.0-1 #688

promofu opened this issue Jan 4, 2025 · 39 comments

Comments

@promofu
Copy link

promofu commented Jan 4, 2025

Description of the issue

I upgraded as hinted by HomeAssistant ... now the addon does not start anymore - see log below

Addon version

2.0.0-1

Platform

Core 2025.1.0
Supervisor. 2024.12.3
Operating System. 14.1
Frontend. 20250103.0

Logs of the issue (if applicable)

[15:28:32] INFO: Preparing to start...
[15:28:33] INFO: Socat not enabled
[15:28:33] INFO: Enabled Zigbee2MQTT watchdog with value 'default'
[15:28:34] INFO: Starting Zigbee2MQTT...
node:internal/modules/run_main:91
const type = getNearestParentPackageJSONType(mainPath);
^
Error: Invalid package config /app/package.json.
at shouldUseESMLoader (node:internal/modules/run_main:91:16)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:163:20)
at node:internal/main/run_main_module:36:49 {
code: 'ERR_INVALID_PACKAGE_CONFIG'
}
Node.js v22.11.0

@copetogo
Copy link

copetogo commented Jan 4, 2025

Man i wish people actually start paying attention to atleast have a look at breaking changes section for once.
Koenkk/zigbee2mqtt#24198. Please go through this and follow instructions

@promofu
Copy link
Author

promofu commented Jan 4, 2025

I do not see any relation of those to a failed reading of the /app/package.json (apparently) included in the docker image.
But I will try to figure it out.

@copetogo
Copy link

copetogo commented Jan 4, 2025

I do not see any relation of those to a failed reading of the /app/package.json (apparently) included in the docker image. But I will try to figure it out.

Please close the issue once resolved by following instructions. If not then please post you zigbee2mqtt config.yaml file

@promofu
Copy link
Author

promofu commented Jan 4, 2025

I checked the recommended settings ("e.g. set xyz_legacy stuff to false") and found all in my current configuration.yaml

i then continued checking through the "Home Assistant" Section in the docs but all there apply to post upgrade-and-start issues that are not even reachable for me now.

I doubt that the issue is in my config but rather from what I see is that the package.json (which i assume is generated in the addon build and added into the image) is somehow broken (see error message in the log) and it does not at all start in the first place ... it just emits that error message and refuses to start

my config (redacted)

homeassistant: true
advanced:
  network_key:
    - XXX
    - ...
  pan_id: XXX
  ext_pan_id:
    - XXX
    - ...
  homeassistant_legacy_entity_attributes: false
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false
  log_level: info
  last_seen: ISO_8601_local
mqtt:
  server: mqtt://XXXXXXXXXXXXX
  user: XXXXXXXX
  password: XXXXXXXX
frontend:
  port: 8099
serial:
  port: /dev/ttyACM0
  baudrate: 115200
  rtscts: false
device_options:
  legacy: false
  homeassistant:
    last_seen:
      enabled_by_default: true
devices:
  ...
permit_join: true
availability: true

@giedriuskilcauskas
Copy link

Mine doesn't complain about anything, but log lists all devices, prints that state is online and stays there forever. No errors, but also doesn't work, seems like something stuck in starting frontend or so..

@ulli-us
Copy link

ulli-us commented Jan 4, 2025

The zigbee2mqtt add-on didn't start yesterday after the 2.x upgrade. I reverted back to 1.42.0 from backup and don't currently have the 2.0.0-1 log. I had 1 legacy config entry missing and added it right now: 'homeassistant_legacy_triggers: false'. I'm still running 1.42.0.' I'll update once I try the upgrade again.

/config/zigbee2mqtt/configuration.yaml (truncated)
(I noticed that devices I added more recently do not have the legacy: false attribute)

homeassistant: true
mqtt:
server: mqtt://core-mosquitto:1883
user: xxx
password: xxx
serial:
port: /dev/ttyUSB1
frontend:
port: 8099
advanced:
homeassistant_legacy_entity_attributes: false
homeassistant_legacy_triggers: false
legacy_api: false
legacy_availability_payload: false
log_level: info
log_syslog:
app_name: Zigbee2MQTT
eol: /n
host: localhost
localhost: localhost
path: /dev/log
pid: process.pid
port: 514
protocol: udp4
type: '5424'
device_options:
legacy: false
devices:
devices:
'0x282c02bfffe8058b':
friendly_name: Motion Dinning Room
homeassistant:
name: ZBMotion1
icon: Motion
legacy: false
optimistic: true
...
[other devices]
...
'0x28dba7fffe60b8a9':
friendly_name: Basement Bath Leak
description: Basement bathroom water leak
groups: {}
ota:
ikea_ota_use_test_url: false
disable_automatic_update_check: false
permit_join: false

@ulli-us
Copy link

ulli-us commented Jan 4, 2025

I did a bit more research. (still on 1.42.0)
I use the Node Red add-on for all my automations!
As listed in the breaking changes:
'All click sensors have been removed (homeassistant.legacy_triggers setting). This means all sensor._click entities are removed. Use the MQTT device trigger instead.
All action sensors are now disabled by default (sensor.
_action entities). It's recommended to use the MQTT device trigger instead.'

So, with legacy triggers turned off my current event nodes will not fire anymore (i.e. entity 'Guest Bedroom Blind Button Action' is dead).

I can see these MQTT msg topics (sample button):
homeassistant/device_automation/0x3425b4fffef7250d/action_close/config
homeassistant/device_automation/0x3425b4fffef7250d/action_stop/config
homeassistant/device_automation/0x3425b4fffef7250d/action_open/config

a sample msg looks like this:
{
"automation_type": "trigger",
"device": {
"identifiers": [
"zigbee2mqtt_0x3425b4fffef7250d"
],
"manufacturer": "IKEA",
"model": "TRADFRI open/close remote (E1766)",
"name": "Guest Bedroom Blind Button",
"sw_version": "2.3.079",
"via_device": "zigbee2mqtt_bridge_0x00124b0026b807a4"
},
"origin": {
"name": "Zigbee2MQTT",
"sw": "1.35.3",
"url": "https://www.zigbee2mqtt.io"
},
"payload": "close",
"subtype": "close",
"topic": "zigbee2mqtt/Guest Bedroom Blind Button/action",
"type": "action"
}

Does that mean my only options is to listen to MQTT topic 'homeassistant/device_automation//*' to trigger actions in Node Red?

@promofu
Copy link
Author

promofu commented Jan 4, 2025

I went through downgrading to 1.42.0 from a backup and then re-upgraded to 2.0.0-1 and now it works... I did not change anything else on any config file.

so for me now this issue could be closed. the other cases that where added in the comments seem to address slightly different issues AFAIS ... mine originally was about some NodeJS tooling complaining about a seemingly defective package.json file... again: this does not happen anymore for me

thanks to all contributors to this thread and especially to the maintainers of this addon and zigbee2mqtt in general !

@jaredgisin
Copy link

jaredgisin commented Jan 5, 2025

Man i wish people actually start paying attention to atleast have a look at breaking changes section for once. Koenkk/zigbee2mqtt#24198. Please go through this and follow instructions

Have you looked at 24198? It's a complete long mess of over technical information and comments and nonsense. How about instead of pointing people a thread that spanned months you stop wasting everyone's time and extract the relevant information and actually put It in the release notes? Maybe if you provided clean, clear information SPECIFIC TO THE ADDON, then you'd have a legit reason to complain about people not reading a long-winded thread as much of the data there is not specific to the add-on.

@jaredgisin
Copy link

This is another report of this issue.

I am using Sonoff Usb 3 Dongle-E flashed to latest 7.4 firmware.

HEre's what I see in the add-on logs:

[20:07:02] INFO: Preparing to start...
[20:07:02] INFO: Socat not enabled
[20:07:03] INFO: Enabled Zigbee2MQTT watchdog with value 'default'
[20:07:04] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT with watchdog (2000,60000,300000,900000,1800000,3600000).
[2025-01-04 20:07:10] info: z2m: Logging to console, file (filename: log.log)
[2025-01-04 20:07:10] info: z2m: Starting Zigbee2MQTT version 2.0.0 (commit #unknown)
[2025-01-04 20:07:10] info: z2m: Starting zigbee-herdsman (3.2.1)
[2025-01-04 20:07:10] info: zh:ember: Using default stack config.
[2025-01-04 20:07:10] info: zh:ember: ======== Ember Adapter Starting ========
[2025-01-04 20:07:10] info: zh:ember:ezsp: ======== EZSP starting ========
[2025-01-04 20:07:10] info: zh:ember:uart:ash: ======== ASH Adapter reset ========
[2025-01-04 20:07:10] info: zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2025-01-04 20:07:10] info: zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2025-01-04 20:07:10] info: zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.

and the UI never starts, nothing happens after this, no errors, warnings nothing...

I have also tried every possible configuration that I can find to enable more log debug output from the add-on in the configuration yaml UI and nothing seems to work.

@dnlldl
Copy link

dnlldl commented Jan 5, 2025

Having issues as well, wondering how to revert back to the old version from HAOS UI.

@luckhy2882
Copy link

Also having issues and wondering how to revert to an older version from HAOS UI. But I will use the Zigbee2MQTT Edge version first and wait for the update.

@luckhy2882
Copy link

Zigbee2MQTT cannot be started with the following error message. It can start normally in the Zigbee2MQTTEdge version, waiting for the new version to solve it, thank you.

[12:28:55] INFO: Preparing to start...
[12:28:55] INFO: Socat not enabled
[12:28:55] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-01-05 12:28:58] debug: z2m: Removing old log directory '/config/zigbee2mqtt/log/2025-01-05.12-06-06'
[2025-01-05 12:28:58] info: z2m: Logging to console, file (filename: log.log)
[2025-01-05 12:28:58] debug: z2m: Loaded state from file /config/zigbee2mqtt/state.json
[2025-01-05 12:28:58] info: z2m: Starting Zigbee2MQTT version 2.0.0 (commit #unknown)
[2025-01-05 12:28:58] debug: z2m: sd-notify loaded
[2025-01-05 12:28:58] info: z2m: Starting zigbee-herdsman (3.2.1)
[2025-01-05 12:28:58] debug: z2m: Using zigbee-herdsman with settings: '"{"network":{"panID":60146,"extendedPanID":[64,95,66,165,62,127,12,171],"channelList":[11],"networkKey":"HIDDEN"},"databasePath":"/config/zigbee2mqtt/database.db","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","backupPath":"/config/zigbee2mqtt/coordinator_backup.json","serialPort":{"path":"tcp://192.168.1.13:6638"},"adapter":{"disableLED":false}}"'
[2025-01-05 12:28:58] error: z2m: Error while starting zigbee-herdsman
[2025-01-05 12:28:58] error: z2m: Failed to start zigbee-herdsman
[2025-01-05 12:28:58] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-01-05 12:28:58] error: z2m: Exiting...
[2025-01-05 12:28:58] error: z2m: Error: Cannot discover TCP adapters at this time. Specify valid 'adapter' and 'port' in your configuration.

@dnlldl
Copy link

dnlldl commented Jan 5, 2025

By default when updating an add-on a backup is created, I was able to revert to 1.42 that way and disabled auto-update. Add-on is working correctly for now.

@luckhy2882
Copy link

預設情況下,更新附加元件時會建立備份,我可以透過這種方式還原到 1.42 並停用自動更新。插件目前工作正常。

Sorry, I didn't back up the data

@m0wlheld
Copy link
Contributor

m0wlheld commented Jan 5, 2025

Have you looked at 24198? It's a complete long mess of over technical information and comments and nonsense. How about instead of pointing people a thread that spanned months you stop wasting everyone's time and extract the relevant information and actually put It in the release notes? Maybe if you provided clean, clear information SPECIFIC TO THE ADDON, then you'd have a legit reason to complain about people not reading a long-winded thread as much of the data there is not specific to the add-on.

The add-on is just a wrapper for the "plain" Zigbee2MQTT project. That underlying project went from release 1.42.0 to 2.0.0 which introduced some major changes, including some breaking changes that require actions to be taken before upgrading. Both - this issue list and Zigbee2MQTT's issue list - are currently flooded with "issues" that could have been avoided by just reading the release notes.

The same should be done before upgrading Home Assistant itself.

@m0wlheld
Copy link
Contributor

m0wlheld commented Jan 5, 2025

Zigbee2MQTT cannot be started with the following error message. It can start normally in the Zigbee2MQTTEdge version, waiting for the new version to solve it, thank you.

Specify valid 'adapter' and 'port' in your configuration.

Read Koenkk/zigbee2mqtt#24198, add one line to your configuration.

@copetogo
Copy link

copetogo commented Jan 5, 2025

Man i wish people actually start paying attention to atleast have a look at breaking changes section for once. Koenkk/zigbee2mqtt#24198. Please go through this and follow instructions

Have you looked at 24198? It's a complete long mess of over technical information and comments and nonsense. How about instead of pointing people a thread that spanned months you stop wasting everyone's time and extract the relevant information and actually put It in the release notes? Maybe if you provided clean, clear information SPECIFIC TO THE ADDON, then you'd have a legit reason to complain about people not reading a long-winded thread as much of the data there is not specific to the add-on.

So let me get this straight you are not ready to read the so called long document which it isn’t out of sheer laziness .and all the important changes to made before updating has been highlighted right at the start . I don’t know how more concise @Koenkk could have been with the documentation

@copetogo
Copy link

copetogo commented Jan 5, 2025

Have you looked at 24198? It's a complete long mess of over technical information and comments and nonsense. How about instead of pointing people a thread that spanned months you stop wasting everyone's time and extract the relevant information and actually put It in the release notes? Maybe if you provided clean, clear information SPECIFIC TO THE ADDON, then you'd have a legit reason to complain about people not reading a long-winded thread as much of the data there is not specific to the add-on.

The add-on is just a wrapper for the "plain" Zigbee2MQTT project. That underlying project went from release 1.42.0 to 2.0.0 which introduced some major changes, including some breaking changes that require actions to be taken before upgrading. Both - this issue list and Zigbee2MQTT's issue list - are currently flooded with "issues" that could have been avoided by just reading the release notes.

The same should be done before upgrading Home Assistant itself.

Yeah but apparently that is too much to expect I guess . That being said apart from the adapter and legacy config commands some people have still not got the addon to work which would require a separate thread as someone mentioned they rolled back the add on and updated and it started working

@m0wlheld
Copy link
Contributor

m0wlheld commented Jan 5, 2025

The zigbee2mqtt add-on didn't start yesterday after the 2.x upgrade. I reverted back to 1.42.0 from backup and don't currently have the 2.0.0-1 log. I had 1 legacy config entry missing and added it right now: 'homeassistant_legacy_triggers: false'. I'm still running 1.42.0.' I'll update once I try the upgrade again.

Hard to read, because you didn't use code formatting when copying your configuration.yaml, but at the serial: section the adapter: keyword with an appropriate value (zstack, ember, deconz) is missing. This might be the reason for your issue, although it should report this very clearly in the logs (like #688 (comment)).

@promofu This could also be the cause for you.

@gazsoimi
Copy link

gazsoimi commented Jan 5, 2025

The zigbee2mqtt add-on didn't start yesterday after the 2.x upgrade. I reverted back to 1.42.0 from backup and don't currently have the 2.0.0-1 log. I had 1 legacy config entry missing and added it right now: 'homeassistant_legacy_triggers: false'. I'm still running 1.42.0.' I'll update once I try the upgrade again.

Hard to read, because you didn't use code formatting when copying your configuration.yaml, but at the serial: section the adapter: keyword with an appropriate value (zstack, ember, deconz) is missing. This might be the reason for your issue, although it should report this very clearly in the logs (like #688 (comment)).

@promofu This could also be the cause for you.

yeah, i had the same error in the morning.

i only had

port: tcp://x.x.x.x:6638

configured till now.
i searched for half an hour the documentation but was unable to find what else should i configure there.
finally found a video with

adapter: zstack

in it, and now it works.

@m0wlheld
Copy link
Contributor

m0wlheld commented Jan 5, 2025

i searched for half an hour the documentation but was unable to find what else should i configure there.
finally found a video with

Someone is making money by going through the release notes on video, what a crazy world ...

@ujhede
Copy link

ujhede commented Jan 5, 2025

Mine doesn't complain about anything, but log lists all devices, prints that state is online and stays there forever. No errors, but also doesn't work, seems like something stuck in starting frontend or so..

Did you manage to solve this ? I have what looks like the same problem, and none of the fixes i have seen so far seems to solve the problem.

@thecockneymanc
Copy link

Mine doesn't complain about anything, but log lists all devices, prints that state is online and stays there forever. No errors, but also doesn't work, seems like something stuck in starting frontend or so..

I also appear to be in this position. No errors in log (info level), all devices listed, with debug level log I can see data eg. Temps from sensors, but web gui will not start. Same with edge. Hoping for some ideas!

@giedriuskilcauskas
Copy link

Mine doesn't complain about anything, but log lists all devices, prints that state is online and stays there forever. No errors, but also doesn't work, seems like something stuck in starting frontend or so..

Did you manage to solve this ? I have what looks like the same problem, and none of the fixes i have seen so far seems to solve the problem.

Unfortunately, I didn't.. tried cleaning config, adding legacy disablements, moving files to different location.. to no success. Tried multiple times going back and forth with the same result.

@ujhede
Copy link

ujhede commented Jan 5, 2025

Mine doesn't complain about anything, but log lists all devices, prints that state is online and stays there forever. No errors, but also doesn't work, seems like something stuck in starting frontend or so..

Did you manage to solve this ? I have what looks like the same problem, and none of the fixes i have seen so far seems to solve the problem.

Unfortunately, I didn't.. tried cleaning config, adding legacy disablements, moving files to different location.. to no success. Tried multiple times going back and forth with the same result.

I read somewhere else that you are supposed to add the legacy config in 1.4.2 and check if it everything works there. The configuration migration procedure will automatically remove the legacy settings as part of the v1 -> v2 migration. This makes kind of sense as the functionality is completely removed form 2.0.0

I tried restoring a backup of 1.4.2-1, which naturally worked, then i added the legacy settings which completely broke the HA integration (all sensors became unavailable). Removing the settings again (still runnign 1.4.2) brought functionality back. So i think the problem is that my config is using some of the legacy functionality, that is completely removed in 2.0.0. The odd thing is that i did not have any .legacy = true settings enabled in my 1.4.2 config.

I have no idea how to figure out what cause everything break.

@ulli-us
Copy link

ulli-us commented Jan 5, 2025

You got to be kidding me. Tried another 2.x update. The add-on is not starting..
the log tells me that all my icon setting are failing. Just to be clear ; I didn't manually create the devices in the configuration.yaml - all Zigbee devices were added via the Zigbee2MQTT add-on UI and working fine pre 2.x
So, I'll try and fix all my 57 devices. Will report back and btw: the https://www.zigbee2mqtt.io/guide/configuration page doesn't tell you anything about changing naming conventions!

[16:48:45] INFO: Preparing to start...
[16:48:45] INFO: Socat not enabled
[16:48:46] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
READ THIS CAREFULLY
Refusing to start because configuration is not valid, found the following errors:

  • Device icon of 'Motion Dinning Room' should start with 'device_icons/', got 'Motion'
  • Device icon of 'Motion Basement' should start with 'device_icons/', got 'Motion'
  • Device icon of 'Leak Basement' should start with 'device_icons/', got 'Leak'
  • Device icon of 'Open-Close Front Door' should start with 'device_icons/', got 'Door'
  • Device icon of 'Open-Close Kitchen Door' should start with 'device_icons/', got 'Door'
  • Device icon of 'Open-Close Dinning Room Door' should start with 'device_icons/', got 'Door'
  • Device icon of 'Call Indicator' should start with 'device_icons/', got 'Switch'
  • Device icon of 'Aux Repeater2' should start with 'device_icons/', got 'Router'
  • Device icon of 'Button1' should start with 'device_icons/', got 'Button'
  • Device icon of 'Motion Hallway' should start with 'device_icons/', got '
  • ...
    If you don't know how to solve this, read https://www.zigbee2mqtt.io/guide/configuration
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@ulli-us
Copy link

ulli-us commented Jan 5, 2025

Modified all the icon setting to 'device_icons/' and it finally started in version 2.0.0-1. Nowhere in Koenkk/zigbee2mqtt#24198 did I find anything about the icon setting.

@jaredgisin
Copy link

Man i wish people actually start paying attention to atleast have a look at breaking changes section for once. Koenkk/zigbee2mqtt#24198. Please go through this and follow instructions

Have you looked at 24198? It's a complete long mess of over technical information and comments and nonsense. How about instead of pointing people a thread that spanned months you stop wasting everyone's time and extract the relevant information and actually put It in the release notes? Maybe if you provided clean, clear information SPECIFIC TO THE ADDON, then you'd have a legit reason to complain about people not reading a long-winded thread as much of the data there is not specific to the add-on.

So let me get this straight you are not ready to read the so called long document which it isn’t out of sheer laziness .and all the important changes to made before updating has been highlighted right at the start . I don’t know how more concise @Koenkk could have been with the documentation

Simply, it's not concise at all.

This really isn't a good use of time to rathole on this topic right here, but since we're here and clearly people are having issues with 2.0.0, including myself, let's take a closer look at what the actual situation is here. To be clear, I read 21498. That's how I know it's a mess. Here's some constructive criticism.

It's very simplistic to say that if people would read the release notes they wouldn't have all of these issue. That assume a lot about the ability for that document to convey the most important information easily, which, it doesn't clearly, for if it would then you'd have less issues here.

The issue is that it's a poorly written document that fails to clearly communicate in a way that casual users can understand. It It's not a matter of being lazy, it's a matter of how information is organized and presented. It suffers from a classic problem that arises when a developer who literally knows everything about a product writes a document for people who don't- it's often overly technical, leave out a ton of basic information and is not well organized.

Just look at the comments here on this thread to prove the point. There are multiple complaints of missing information, or not being able to figure out what to do. I wasted over 2 hours yesterday trying to get the upgrade to work to no avail and that's after I read the documents several times. Eventually, I gave up and reverted to 1.4.x as many other people here also did.

Let's take for another example the confusion around the serial.adapter setting.

Yes, the document says, "It is recommended to explicitly add a serial.adatper to your configuration...." Yet, under "General" further down, it says, "Improved adapter discovery. ..... stack is no longer the default for adapter setting. If Z2M fails to start saying the adapter could not be discovered...... make sure to specify the adapter setting if that's the case."

This is sending mixed messages... on the one hand it says it's recommended, which means that I can ignore it, yet further down it says that if it fails, I need it. This information should not be spread all over the document, and the entire sentence around "it is recommended" clearly is not true and should have been left out. Period. It's absolutely REQUIRED to add it if if automatic adapter discovery fails. That's what it should say in one simple clean way that can't be missed.

So yeah, give the users a terrible user experience (such as confusing, incomplete documentation), but then don't complain if people can't figure out what they're supposed to do.

Oh, and another thing that is highly confusing about it.... all of the settings that have the word "legacy" in them are recommended to be false. This is absolutely counterintuitive. If a system is updated that is not backward compatible, it would make logical sense that I should set the settings for legacy behavior to TRUE, not false. Then, further down, it says "only breaking with legacy is enabled" ... when legacy WHAT is enabled? There only half a dozen settings with the word "legacy" in them, so which one is it, or is it just "device_optiosn.legacy"... it's not clear. Now maybe, there are historical reasons for these wacky names, but the people who use this are largely not deeply involved developers who have that history and know the depths of the product. Mostly, they just install it and it works out of the box (as it has for me for years), so it's a bit much to presume people will understand illogically named settings and things like "legacy enabled" when they've literally never had to deal with that before.

I could go on.... but the bottom line is that I did read the document found it highly confusing and not clear for a casual users. Yes, I have a long background in professional software engineering, so I'm not an idiot and I know what I"m talking about, but I shouldn't have to read the source code to figure out how to use something. I know enough to know that when I prepare documentation for the public for software products, how it's written matters a lot.

@jaredgisin
Copy link

i searched for half an hour the documentation but was unable to find what else should i configure there.
finally found a video with

Someone is making money by going through the release notes on video, what a crazy world ...

Not surprising given the poor quality of the release notes. :)

@bytebility
Copy link

On the zigbee2mqtt configuration page, find the 'serial' section and add a new line as below

adapter: zstack

let the new contents above your original line as below
port: tcp://192.168.1.xxx:5000

Save and restart zigbee2mqtt. It works.

@copetogo
Copy link

copetogo commented Jan 6, 2025

Man i wish people actually start paying attention to atleast have a look at breaking changes section for once. Koenkk/zigbee2mqtt#24198. Please go through this and follow instructions

Have you looked at 24198? It's a complete long mess of over technical information and comments and nonsense. How about instead of pointing people a thread that spanned months you stop wasting everyone's time and extract the relevant information and actually put It in the release notes? Maybe if you provided clean, clear information SPECIFIC TO THE ADDON, then you'd have a legit reason to complain about people not reading a long-winded thread as much of the data there is not specific to the add-on.

So let me get this straight you are not ready to read the so called long document which it isn’t out of sheer laziness .and all the important changes to made before updating has been highlighted right at the start . I don’t know how more concise @Koenkk could have been with the documentation

Simply, it's not concise at all.

This really isn't a good use of time to rathole on this topic right here, but since we're here and clearly people are having issues with 2.0.0, including myself, let's take a closer look at what the actual situation is here. To be clear, I read 21498. That's how I know it's a mess. Here's some constructive criticism.

It's very simplistic to say that if people would read the release notes they wouldn't have all of these issue. That assume a lot about the ability for that document to convey the most important information easily, which, it doesn't clearly, for if it would then you'd have less issues here.

The issue is that it's a poorly written document that fails to clearly communicate in a way that casual users can understand. It It's not a matter of being lazy, it's a matter of how information is organized and presented. It suffers from a classic problem that arises when a developer who literally knows everything about a product writes a document for people who don't- it's often overly technical, leave out a ton of basic information and is not well organized.

Just look at the comments here on this thread to prove the point. There are multiple complaints of missing information, or not being able to figure out what to do. I wasted over 2 hours yesterday trying to get the upgrade to work to no avail and that's after I read the documents several times. Eventually, I gave up and reverted to 1.4.x as many other people here also did.

Let's take for another example the confusion around the serial.adapter setting.

Yes, the document says, "It is recommended to explicitly add a serial.adatper to your configuration...." Yet, under "General" further down, it says, "Improved adapter discovery. ..... stack is no longer the default for adapter setting. If Z2M fails to start saying the adapter could not be discovered...... make sure to specify the adapter setting if that's the case."

This is sending mixed messages... on the one hand it says it's recommended, which means that I can ignore it, yet further down it says that if it fails, I need it. This information should not be spread all over the document, and the entire sentence around "it is recommended" clearly is not true and should have been left out. Period. It's absolutely REQUIRED to add it if if automatic adapter discovery fails. That's what it should say in one simple clean way that can't be missed.

So yeah, give the users a terrible user experience (such as confusing, incomplete documentation), but then don't complain if people can't figure out what they're supposed to do.

Oh, and another thing that is highly confusing about it.... all of the settings that have the word "legacy" in them are recommended to be false. This is absolutely counterintuitive. If a system is updated that is not backward compatible, it would make logical sense that I should set the settings for legacy behavior to TRUE, not false. Then, further down, it says "only breaking with legacy is enabled" ... when legacy WHAT is enabled? There only half a dozen settings with the word "legacy" in them, so which one is it, or is it just "device_optiosn.legacy"... it's not clear. Now maybe, there are historical reasons for these wacky names, but the people who use this are largely not deeply involved developers who have that history and know the depths of the product. Mostly, they just install it and it works out of the box (as it has for me for years), so it's a bit much to presume people will understand illogically named settings and things like "legacy enabled" when they've literally never had to deal with that before.

I could go on.... but the bottom line is that I did read the document found it highly confusing and not clear for a casual users. Yes, I have a long background in professional software engineering, so I'm not an idiot and I know what I"m talking about, but I shouldn't have to read the source code to figure out how to use something. I know enough to know that when I prepare documentation for the public for software products, how it's written matters a lot.

Good on you mate if you want a readymade solution to be spoon fed to you home assistant isn’t for you. I am done arguing

@mihaitaiosub
Copy link

mihaitaiosub commented Jan 16, 2025

Image

I am also facing the same problem discussed here. Zigbee2MQTT cannot be started. I also tried the solution with changing the port and the adapter name, but the problem remained.The last version that worked is 1.42.0-2.

After I correctly wrote the port for the coordinator in the Zigbee2MQTT configuration, I saw that the following error appeared in the log:''Refusing to start because configuration is not valid, found the following errors:
"Device icon of 'Calorifer dormitor Mihai' should start with 'device_icons/', got 'data:image/png;base64''. Can anyone help me with a solution?

Should it be written for each device instead of "data:image/png;base64", "device_icons/png;base64", or just "device_icons"?

@ulli-us
Copy link

ulli-us commented Jan 16, 2025

Go to your configuration.yaml at /config/zigbee2mqtt
and prepend 'device_icon/' to the icon key. (see sample below)
This worked for me with the out-of-the-box icon names.
Not sure about your image file references.
You can also just remove the icon key to get past the configuration validation error (not all my devices has an icon entry)

devices:
'0x282c02bfffe8058b':
friendly_name: Motion Dinning Room
homeassistant:
name: ZBMotion1
icon: device_icons/Motion
legacy: false
optimistic: true

@mihaitaiosub
Copy link

mihaitaiosub commented Jan 16, 2025

Thanks for the reply, can you please take a screenshot and post it? And shouldn't the path be /config/zigbee2mqtt/devices.yaml?

@ulli-us
Copy link

ulli-us commented Jan 16, 2025

The sample device definition in my earlier post is working with Zigbee2MQTT 2.0.0-2.
The devices are defined in /config/zigbee2mqtt/configuration.yaml.
You can also remove the icon key - The add-on does not complain about those devices
Not sure what screenshot you are looking for.

@mihaitaiosub
Copy link

I would like to see a screenshot of the page in the file editor where you have the devices configured.

@ulli-us
Copy link

ulli-us commented Jan 16, 2025

Image

@mihaitaiosub
Copy link

mihaitaiosub commented Jan 17, 2025

Thank you very much for your help!

After making the changes in the file editor, Zigbee2MQTT still did not start and now I get the following error:

500 internal server error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests