#Zigbee2MQTT does not start

1 messages · Page 1 of 1 (latest)

rocky dune
#

What kind of coordinator are you using?

shadow sinew
#

Raspberry Pi4

rocky dune
#

No. Your Zigbee coordinator. The “dongle”?

shadow sinew
#

SONOFF Zigbee Gateway

rocky dune
#

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).

shadow sinew
#

I have just installed it

#

he is received everywhere?

rocky dune
#

Ah. Ok. I don’t think it’s going to work with that coordinator.

shadow sinew
#

I don't understand, everyone uses it and it's recommended in all the vidieos

rocky dune
#

You said the Sonoff gateway? Or did you mean the Dongle E-Plus/P/etc?

shadow sinew
#

E Plus

rocky dune
#

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.

shadow sinew
rocky dune
#

Ahhhhh, ok. Those are the MGM chips.

#

Paste your config using a code share site (dpaste.org etc)

shadow sinew
#

what?

rocky dune
#

Share your Z2M config file using a code sharing site.

mighty stratusBOT
#

Please use a code share site to share code or logs, for example:

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.

shadow sinew
#

i have and now?

rocky dune
#

Where? I don’t see a link. I just see the error log you posted.

shadow sinew
#

How do I post it?

rocky dune
#

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.

shadow sinew
#

should be correct

rocky dune
#

No. That’s not correct. There’s no MQTT settings and I think you need to add adapter: ember to your serial: portion.

shadow sinew
#

I do not understand

#

he is registered with serial

rocky dune
shadow sinew
#

no, i watched this on youtub

rocky dune
#

So first, read the docs FIRST. Then once you’ve done that, watch YT videos. Most YT videos are out of date.

shadow sinew
#

if i understand correctly, since i am using the broker, do i have to enter the user and pw?

rocky dune
#

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.

shadow sinew
#

error remains

#

mom

rocky dune
#

Try adding adapter: ember to your serial: section.

shadow sinew
#

so not port you mean?

rocky dune
#

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.

shadow sinew
#

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?

rocky dune
#
serial:
  port: <your port>
  adapter: ember
shadow sinew
#

nop does not work

rocky dune
#

Did you update the firmware on the dongle?

shadow sinew
rocky dune
#

You might need to update the firmware on that dongle.

shadow sinew
#

That doesn't work either

rocky dune
#

You updated the firmware that quickly? What version of the firmware are you on?

shadow sinew
#

I said no

#

my pc does not recognize it

rocky dune
#

Ah, ok. You need to fix that first. You should always have a way to update your firmware.

shadow sinew
#

especially as I also understand the sole opinion. It is quite complicated to update at all

#

good luck

rocky dune
shadow sinew
#

i can't figure out the whole thing

rocky dune
#

Out of curiosity, have you tried ZHA instead?

shadow sinew
#

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

rocky dune
#

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.

shadow sinew
#

the Pi4?

rocky dune
#

You mean the rPI 4?

#

I’m not sure what you mean.

mighty stratusBOT
rocky dune
#

That’s what I am referring to.

shadow sinew
#

The error can't be that difficult to fix, otherwise please suggest which dongel I should buy WITHOUT problems

rocky dune
#

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.

shadow sinew
#

I could update it, but first I would have to be told how

rocky dune
#

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/

shadow sinew
#

I can't change everything again, I've already bought the sensors and lamps that are supposed to run with Zigbee

rocky dune
#

Hold on, let me see if I can find the instructions on how to flash the firmware.

rocky dune
rocky dune
#

That’s NOT it.

#

Well, it is, but that’s not how we recommend to do it.

#

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.

shadow sinew
#

of course you only have to use chrome, my god

rocky dune
#

Yeah… hence why I have a lan-based coordinator. I don’t have to go through any of these steps.

shadow sinew
#

so, I'll update now

rocky dune
#

Ok. Let’s see how it does after that.

shadow sinew
#

hopefully better

#

I have changed this in the meantime

rocky dune
#

You might not need the socat: settings. I’m not sure, tbh.

shadow sinew
#

I can still take it out

rocky dune
#

Let’s see what it does after the firmware update and then figure it out. Small steps…

shadow sinew
#

update is complete

rocky dune
#

Ok

shadow sinew
#

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)

rocky dune
#

Ok, cut out the socat: section (but keep a backup of it just in case)

shadow sinew
#

socat?

rocky dune
#

Yeah, you have a socat: section in your config. Remove it.

shadow sinew
#

you mean at mqtt?

rocky dune
#

Nope.

shadow sinew
#

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

rocky dune
#

Yeah, remove all that (or comment it out, either way works).

shadow sinew
#

no, it rewrites them as soon as I save

#

maybe take the adapter out again

rocky dune
#

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.

shadow sinew
#

again not

rocky dune
#

Same error?

shadow sinew
#

[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

rocky dune
#

Which firmware version did you flash on the adapter?

shadow sinew
#

the latest

#

the newest

rocky dune
#

Which version number… I don’t know what the latest is.

shadow sinew
rocky dune
#

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)

shadow sinew
#

for Pi4 yes

rocky dune
#

Move it to one of the USB2 ports.

#

(The black ones)

#

You may have to adjust the serial: config after that.

shadow sinew
#

sry, is in a 2.0

rocky dune
#

Crap. lol Well, there goes that idea.

#

In HA, do you have ZHA enabled by chance?

#

(Settings > Devices and Services > Integrations > Zigbee Home Automation)

shadow sinew
#

no

rocky dune
#

It is there at the end.

#

Try disabling that.

shadow sinew
#

yes 😅

#

how?

#

mom

#

yes, it should be off

#

start Z2M again?

rocky dune
#

Yeah, but make sure that ZHA is really disabled.

shadow sinew
rocky dune
#

Better. Ok, try Z2M again. If it errors out, add in the adapter: ember and try it again.

shadow sinew
#

wtf

rocky dune
#

???

shadow sinew
rocky dune
#

I’m really hoping that a good “wtf”. lol

#

Nice. That’s good!

shadow sinew
#

so it was just a conflict between ZHA and Z2M

rocky dune
#

Well, that and probably needing updated firmware, yeah.

shadow sinew
#

it did not work with the firmware either?

rocky dune
#

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.

shadow sinew
#

and the problem was always the Firmware?

rocky dune
#

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”.

shadow sinew
#

thank you very much for that

#

now I just have to learn to automate what I have bought

rocky dune
#

You are most welcome.

shadow sinew
#

before I post again, it's quicker to use a Luxs sensor. Recommended or is it possible without?

rocky dune
#

What do you mean by “quicker”? As in, does lux change faster than a motion sensor?

shadow sinew
#

only works for me for day / night setting for the light

rocky dune
#

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?

shadow sinew
#

yes. it is logical that no light should go on during the day when it is bright

rocky dune
#

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.

shadow sinew
#

for me it would be just that. question is, do i have to buy a luxs sensor for this type of control?

rocky dune
#

Yeah. Although most motion sensors include a lux sensor as well.

limpid junco
#

Depends. If you have smart lights you can simply check them for example.

rocky dune
#

Check smart lights for outdoor lux?

limpid junco
#

Check if they're on I mean but yeah that didn't make sense here.

rocky dune
#

lol I was wondering what you meant there 🤣

shadow sinew
#

i have SONOFF SNZB-03P ZigBee Smart

rocky dune
#

How accurate it is, I have no idea. But it should be good enough determine general light levels indoors.

shadow sinew
#

wo

rocky dune
#

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.

shadow sinew
#

i see no lux value in the data

rocky dune
#

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.

shadow sinew
rocky dune
#

Ah, is it already connected?

shadow sinew
rocky dune
#

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.

shadow sinew
#

it's enough whether it's light or dark. that's all I need, isn't it?

rocky dune
#

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.

shadow sinew
#

yes i think so too. i have large windows. even in the rain and dark clouds it should work well

rocky dune
#

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.

shadow sinew
#

Thank you very much. I will reinfuxen me there times in rest and test how I get the right automatiesiert^^