#Zigbee2MQTT does not start
1 messages · Page 1 of 1 (latest)
Raspberry Pi4
No. Your Zigbee coordinator. The “dongle”?
SONOFF Zigbee Gateway
Did you just install Z2M or is this an existing installation? Also, are you running it as an addon or standalone?
That error seems to indicate that the coordinator isn’t supported due to an old chipset (I’m guessing).
Ah. Ok. I don’t think it’s going to work with that coordinator.
I don't understand, everyone uses it and it's recommended in all the vidieos
You said the Sonoff gateway? Or did you mean the Dongle E-Plus/P/etc?
E Plus
If it’s the actual dongle, you’ll have to probably update the firmware on it. What’s interesting is that it’s reporting as a CC2530/CC2531.
Ahhhhh, ok. Those are the MGM chips.
Paste your config using a code share site (dpaste.org etc)
what?
Share your Z2M config file using a code sharing site.
Please use a code share site to share code or logs, for example:
- https://dpaste.org/ (select YAML for the language, and consider picking a longer expiry)
- http://pastie.org/ (select YAML for the language)
- https://paste.debian.net/ (you guessed it, select YAML as the language)
Please don't use Pastebin, since it can randomly add spaces to the main view. Please also don't share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.
i have and now?
Where? I don’t see a link. I just see the error log you posted.
How do I post it?
See the bot message I just posted. You copy the config file contents to your clipboard and then you paste that into something like dpaste.org and then you share it and copy the link here.
No. That’s not correct. There’s no MQTT settings and I think you need to add adapter: ember to your serial: portion.
Did you read through the installation instructions? https://github.com/zigbee2mqtt/hassio-zigbee2mqtt#installation
no, i watched this on youtub
So first, read the docs FIRST. Then once you’ve done that, watch YT videos. Most YT videos are out of date.
if i understand correctly, since i am using the broker, do i have to enter the user and pw?
Duh. Sorry… misread your question.
No, you don’t have to enter in the user/pass for MQTT when the broker is running as an addon in the same HA instance.
Try adding adapter: ember to your serial: section.
so not port you mean?
No, you need port as well. This would be another property under that.
My guess is that Z2M isn’t reading the adapter type properly.
sry i don't understand you, i can only work with translator. so it's hard for me to understand what you're trying to tell me
which adapter? The dongle?
serial:
port: <your port>
adapter: ember
nop does not work
Did you update the firmware on the dongle?
You might need to update the firmware on that dongle.
That doesn't work either
You updated the firmware that quickly? What version of the firmware are you on?
Ah, ok. You need to fix that first. You should always have a way to update your firmware.
especially as I also understand the sole opinion. It is quite complicated to update at all
good luck
I agree. There’s a lot to deal with unfortunately
i can't figure out the whole thing
Out of curiosity, have you tried ZHA instead?
i just wanted to control zigbee devices and not learn IT
i just don't want any problems with communication so i decided to go for it
I would suggest trying to go with ZHA. Z2M is much more advanced and not really intended for first time users.
Communication problems are not because of the software controller, but the devices you choose and have.
the Pi4?
That’s what I am referring to.
The error can't be that difficult to fix, otherwise please suggest which dongel I should buy WITHOUT problems
It’s not a matter of difficult to fix. I suspect this is due to old firmware on the dongle. If you can’t update the firmware, then you’re not going to be able to make it work with Z2M. Plus, if you can’t update the firmware, you’re missing out on critical security updates and features as well.
I could update it, but first I would have to be told how
BUT, for a coordinator without many problems, I’d suggest a lan based coordinator like the SLZB-06 which isn’t a “dongle”, but attaches to your network and is separate from your HA instance. https://smlight.tech/product/slzb-06/
I can't change everything again, I've already bought the sensors and lamps that are supposed to run with Zigbee
Hold on, let me see if I can find the instructions on how to flash the firmware.
You aren’t. This would just be replacing the Sonoff Dongle.
That’s NOT it.
Well, it is, but that’s not how we recommend to do it.
Web based flasher for ZB-GW04 and ZBDongle-E. MultiPAN RCP firmware enables these devices to be used with Silabs Multiprotocol Addon in Home Assistant. Allow Zigbee and Thread to co-exist on the same dongle. Get ahead of the tech an experiment with Matter!
But first, you’ll need to install the drivers on your Windows machine. I don’t know how to do that as I don’t use Windows.
of course you only have to use chrome, my god
Yeah… hence why I have a lan-based coordinator. I don’t have to go through any of these steps.
so, I'll update now
Ok. Let’s see how it does after that.
You might not need the socat: settings. I’m not sure, tbh.
I can still take it out
Let’s see what it does after the firmware update and then figure it out. Small steps…
update is complete
Ok
nop
[2024-09-21 15:05:56] error: zh:ember:ezsp: ERROR Transaction failure; status=ASH_ERROR_TIMEOUTS. Last Frame: [FRAME: ID=0:"VERSION" Seq=0 Len=0].
[2024-09-21 15:05:56] error: zh:ember: Adapter fatal error: ASH_ERROR_TIMEOUTS
[2024-09-21 15:05:56] error: z2m: Error while starting zigbee-herdsman
[2024-09-21 15:05:56] error: z2m: Failed to start zigbee
[2024-09-21 15:05:56] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-09-21 15:05:56] error: z2m: Exiting...
[2024-09-21 15:05:56] error: z2m: Error: ASH_ERROR_TIMEOUTS
at Ezsp.ezspVersion (/app/node_modules/zigbee-herdsman/src/adapter/ember/ezsp/ezsp.ts:1361:19)
at EmberAdapter.emberVersion (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1414:63)
at EmberAdapter.initEzsp (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:705:9)
at EmberAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1708:24)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:138:29)
at Zigbee.start (/app/lib/zigbee.ts:64:27)
at Controller.start (/app/lib/controller.ts:140:27)
at start (/app/index.js:154:5)
Ok, cut out the socat: section (but keep a backup of it just in case)
socat?
Yeah, you have a socat: section in your config. Remove it.
you mean at mqtt?
Nope.
ah
enabled: false
master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
options: "-d -d"
log: false
Yeah, remove all that (or comment it out, either way works).
Oh right… you’re using the addon, right? Those are settings in the addon, so yeah.
Yeah, try it without the adapter line.
What we need to do is get the config to the bare minimum where Z2M will start.
again not
Same error?
[2024-09-21 15:11:16] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2024-09-21 15:11:16] error: z2m: Error while starting zigbee-herdsman
[2024-09-21 15:11:16] error: z2m: Failed to start zigbee
[2024-09-21 15:11:16] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-09-21 15:11:16] error: z2m: Exiting...
[2024-09-21 15:11:16] error: z2m: Error: Error: Not supported, cannot set
/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264
var er = new ERR_STREAM_WRITE_AFTER_END();
^
Error: write after end
at writeAfterEnd (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264:12)
at DerivedLogger.Writable.write (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:300:21)
at DerivedLogger.log (/app/node_modules/winston/lib/winston/logger.js:231:12)
at Logger.log (/app/lib/util/logger.ts:189:25)
at Logger.info (/app/lib/util/logger.ts:202:14)
at Znp.onPortClose (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:108:16)
at Object.onceWrapper (node:events:632:26)
at SerialPort.emit (node:events:529:35)
at port.close.then.closing (/app/node_modules/@serialport/stream/dist/index.js:242:18
Which firmware version did you flash on the adapter?
Which version number… I don’t know what the latest is.
Ok. That helps. So adapter: ember is required for that. Is the dongle plugged into a USB3 port by chance?
(One of the blue ports on the rPI)
for Pi4 yes
Move it to one of the USB2 ports.
(The black ones)
You may have to adjust the serial: config after that.
sry, is in a 2.0
Crap. lol Well, there goes that idea.
In HA, do you have ZHA enabled by chance?
(Settings > Devices and Services > Integrations > Zigbee Home Automation)
Yeah, but make sure that ZHA is really disabled.
Better. Ok, try Z2M again. If it errors out, add in the adapter: ember and try it again.
wtf
???
so it was just a conflict between ZHA and Z2M
Well, that and probably needing updated firmware, yeah.
it did not work with the firmware either?
I doubt it would have. We have had LOTS of questions and issues with Z2M/ZHA and older firmware on the Sonoff dongles.
In the old zigbee channel, I’d guess it was at least one a day, if not more.
and the problem was always the Firmware?
It was usually the first problem. Earlier this year, Z2M made some changes to how the software interacts with the hardware and that required newer firmware versions.
The conflict with ZHA and Z2M has been around forever, but to be honest, I often forget to check that as part of my “first troubleshooting steps”.
thank you very much for that
now I just have to learn to automate what I have bought
You are most welcome.
lol make lots of posts in #1284980040940912641 It’s not hard once you get the hang of it.
before I post again, it's quicker to use a Luxs sensor. Recommended or is it possible without?
What do you mean by “quicker”? As in, does lux change faster than a motion sensor?
only works for me for day / night setting for the light
I use lux in very few of my automations. I primarily use motion and presence. I only use lux as a condition to determine if a light should come on or not.
That’s just a matter of tuning and using the right values in your conditions or triggers.
So, for instance, if a motion sensor triggers, the condition looks to see if the lux is “low” (like less than 500). If it is, then the light will turn on. Otherwise, it’s left off. Does that make sense?
yes. it is logical that no light should go on during the day when it is bright
Exactly. That’s really all that I use lux for. Other people use the AdaptiveLighting integration to control things like that, but I never had the need for it.
for me it would be just that. question is, do i have to buy a luxs sensor for this type of control?
Yeah. Although most motion sensors include a lux sensor as well.
Depends. If you have smart lights you can simply check them for example.
Check smart lights for outdoor lux?
Check if they're on I mean but yeah that didn't make sense here.
lol I was wondering what you meant there 🤣
i have SONOFF SNZB-03P ZigBee Smart
Yup. That one has a lux sensor: https://www.zigbee2mqtt.io/devices/SNZB-03P.html
How accurate it is, I have no idea. But it should be good enough determine general light levels indoors.
wo
You could get creative with one and put it outside in a protected location (and maybe a bit of silicon around the seams) and get outside light levels too.
I do that with some of my motion sensors so that I have both inside and outside lux readings.
i see no lux value in the data
Are you sure it’s the P and not just the SNZB-03?
In Z2M, click on the device from the devices list and look at the about tab.
Ah, is it already connected?
Oh, I see what you mean… it just says “bright”. LOL, well, that’s helpful…
Personally, I don’t use Sonoff gear at all. This is what I get from my Aqara P1 motion sensors.
I get an actual lux value.
BUT… you could use “bright” in your automations. It just won’t be as accurate.
it's enough whether it's light or dark. that's all I need, isn't it?
It should be. It looks like it uses “dim” and “bright” as values. So, I’m guessing “dim” is dark and “bright” is not dark. That should be fine for what you want to do.
As you get more into it, you’ll probably want to get sensors that report actual values though.
yes i think so too. i have large windows. even in the rain and dark clouds it should work well
Yup! You should be good there.
This is basically all I use lux for:
So, the lights only get triggered if someone is home, the lux is less than 350, no one is in bed or if the lights are already on.
Thank you very much. I will reinfuxen me there times in rest and test how I get the right automatiesiert^^