Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.94k stars 1.66k forks source link

Nortek z-stick not working #10178

Closed DJAMIRSAM closed 2 years ago

DJAMIRSAM commented 2 years ago

What happened

when i press the open in WebUI button i get a 502 Bad Gateway error and a error on logs Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'

i also get this error in HA logs 21-11-02 21:33:29 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.33.4:8099 ssl:default [Connect call failed ('172.30.33.4', 8099)]

its trying to connect to 172.30.33.4 except my IP range is 192.168.1.XXX

What did you expect to happen

what open a ui

How to reproduce it (minimal and precise)

install the plugin

Debug info

Zigbee2MQTT version: 1.18.1-1 Adapter hardware: Norteck z-stick Adapter firmware version: Dont Know

Please Help

Twit123 commented 2 years ago

Hi,

That sounds like..

1 - Something else is already using the Z-stick (ZHA perhaps) - I presume you tried a reboot. 2 - I presume you are running in a Docker container (or other container) hence the IP beginning with 172? 3 - The WEBUI doesn't work because Z2M has failed to start due to the Z-Stick that is in use.

Simon.

DJAMIRSAM commented 2 years ago

It still no work i tried the ZHA removal, and I don't understand the others

`[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] socat.sh: executing... [10:45:08] INFO: Socat not enabled, marking service as down [cont-init.d] socat.sh: exited 0. [cont-init.d] zigbee2mqtt.sh: executing... [10:45:08] INFO: MQTT available, fetching server detail ... [10:45:09] INFO: MQTT server settings not configured, trying to auto-discovering ... [10:45:09] INFO: Configuring 'mqtt://core-mosquitto:1883' mqtt server [10:45:10] INFO: MQTT credentials not configured, trying to auto-discovering ... [10:45:10] INFO: Configuring'addons' mqtt user [10:45:10] INFO: Previous config file found, checking backup [10:45:10] INFO: Creating backup config in '/config/zigbee2mqtt/.configuration.yaml.bk' [10:45:10] INFO: Adjusting Zigbee2mqtt core yaml config with add-on quirks ... [cont-init.d] zigbee2mqtt.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [10:45:11] INFO: Handing over control to Zigbee2mqtt Core ...

zigbee2mqtt@1.22.1 start node index.js Zigbee2MQTT:error 2021-12-14 10:45:35: Error while starting zigbee-herdsman Zigbee2MQTT:error 2021-12-14 10:45:35: Failed to start zigbee Zigbee2MQTT:error 2021-12-14 10:45:35: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions Zigbee2MQTT:error 2021-12-14 10:45:35: Exiting... Zigbee2MQTT:error 2021-12-14 10:45:35: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms) at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:102:27) at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29) at Zigbee.start (/app/lib/zigbee.ts:58:27) at Controller.start (/app/lib/controller.ts:100:27) at start (/app/index.js:97:5) [10:45:36] INFO: Handing over control to Zigbee2mqtt Core ... zigbee2mqtt@1.22.1 start node index.js Zigbee2MQTT:error 2021-12-14 10:46:00: Error while starting zigbee-herdsman Zigbee2MQTT:error 2021-12-14 10:46:00: Failed to start zigbee Zigbee2MQTT:error 2021-12-14 10:46:00: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions Zigbee2MQTT:error 2021-12-14 10:46:00: Exiting... Zigbee2MQTT:error 2021-12-14 10:46:00: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms) at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:102:27) at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29) at Zigbee.start (/app/lib/zigbee.ts:58:27) at Controller.start (/app/lib/controller.ts:100:27) at start (/app/index.js:97:5) [10:46:01] INFO: Handing over control to Zigbee2mqtt Core ... zigbee2mqtt@1.22.1 start node index.js Zigbee2MQTT:error 2021-12-14 10:46:25: Error while starting zigbee-herdsman Zigbee2MQTT:error 2021-12-14 10:46:25: Failed to start zigbee Zigbee2MQTT:error 2021-12-14 10:46:25: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions Zigbee2MQTT:error 2021-12-14 10:46:25: Exiting... Zigbee2MQTT:error 2021-12-14 10:46:25: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms) at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:102:27) at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29) at Zigbee.start (/app/lib/zigbee.ts:58:27) at Controller.start (/app/lib/controller.ts:100:27) at start (/app/index.js:97:5) [10:46:26] INFO: Handing over control to Zigbee2mqtt Core ... zigbee2mqtt@1.22.1 start node index.js Zigbee2MQTT:error 2021-12-14 10:46:50: Error while starting zigbee-herdsman Zigbee2MQTT:error 2021-12-14 10:46:50: Failed to start zigbee Zigbee2MQTT:error 2021-12-14 10:46:50: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions Zigbee2MQTT:error 2021-12-14 10:46:50: Exiting... Zigbee2MQTT:error 2021-12-14 10:46:51: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms) at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:102:27) at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29) at Zigbee.start (/app/lib/zigbee.ts:58:27) at Controller.start (/app/lib/controller.ts:100:27) at start (/app/index.js:97:5) [10:46:51] INFO: Handing over control to Zigbee2mqtt Core ... zigbee2mqtt@1.22.1 start node index.js`

DJAMIRSAM commented 2 years ago

I thinks its my dongle https://www.amazon.ca/GoControl-CECOMINOD016164-Linear-HUSBZB-1/dp/B01GJ826F8/ref=asc_df_B01GJ826F8/?tag=googleshopc0c-20&linkCode=df0&hvadid=292939046378&hvpos=&hvnetw=g&hvrand=10033120608258962695&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9001490&hvtargid=pla-312424172362&psc=1

Twit123 commented 2 years ago

What port have you put in the configuration for the USB stick? It looks like Z2M can't find it.

Go into supervisor then click system at the top and in the bottom corner of the host box is 3 small dots, If you click that, then hardware, it will list all your hardware, Scroll down untill you find your z-stick (usually ttyACM or ttyUSB), copy what is under that and put that in your configuration.

Mine looks like this (yours wont be the same as we have different sticks.

image

I then enter the below in my configuration:

serial: port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

Si

Koenkk commented 2 years ago

This stick is not supported by zigbee2mqtt: https://www.zigbee2mqtt.io/guide/adapters/#recommended

Twit123 commented 2 years ago

Well that would explain it then.

Si

MattWestb commented 2 years ago

If updating its firmware it shall being possible running in EZSP V8 mode.

vandad51 commented 2 years ago

I've updated my firmware on the HUSBZB-1 stick with walthowd's guide. I'm now at version 6.7.8 using the ezsp adapter setting in Z2M. It works for me, half the time. I'm using hassos inside vbox on a Windows 10 pc. It didn't work before I updated it, so flashing the stick helped. I can get it to pair with an Aqara water leak sensor after a few attempts. Everything reads and gets sent into HA as it should. Only thing is, I have to re-pair it every few days so I set up a link quality automation to alert me when it drops to "None". What logs would you need to see to find out what's happening? I don't get any errors in Z2M, and with herdsman debug on. It just all of a sudden stops reporting, all the while sending "Assertion Failed" I think every hour, regardless if the sensor reported.

DJAMIRSAM commented 2 years ago

I've updated my firmware on the HUSBZB-1 stick with walthowd's guide. I'm now at version 6.7.8 using the ezsp adapter setting in Z2M. It works for me, half the time. I'm using hassos inside vbox on a Windows 10 pc. It didn't work before I updated it, so flashing the stick helped. I can get it to pair with an Aqara water leak sensor after a few attempts. Everything reads and gets sent into HA as it should. Only thing is, I have to re-pair it every few days so I set up a link quality automation to alert me when it drops to "None". What logs would you need to see to find out what's happening? I don't get any errors in Z2M, and with herdsman debug on. It just all of a sudden stops reporting, all the while sending "Assertion Failed" I think every hour, regardless if the sensor reported.

Thank you, how do i flash it?

vandad51 commented 2 years ago

Follow this guide https://github.com/walthowd/husbzb-firmware

DJAMIRSAM commented 2 years ago

Thanks for your help but when i try to use the docker thing i get a "docker: Error response from daemon: error gathering device information while adding custom device "/dev/ttyUSB0": no such file or directory." error and i thought its in the wrong port but i realized that the usb is just off, and when i unplug it and plug it back it back in it goes on then turns back off. What should i do?

DJAMIRSAM commented 2 years ago

Bruh i just installed docker and how Vurtual box is giving me this Call to NEMR0InitVMPart2 failed: VERR_NEM_INIT_FAILED (VERR_NEM_VM_CREATE_FAILED).

Result Code: E_FAIL (0x80004005) Component: ConsoleWrap Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed} (Fixed by updating Virtual Box)

vandad51 commented 2 years ago

Thanks for your help but when i try to use the docker thing i get a "docker: Error response from daemon: error gathering device information while adding custom device "/dev/ttyUSB0": no such file or directory." error and i thought its in the wrong port but i realized that the usb is just off, and when i unplug it and plug it back it back in it goes on then turns back off. What should i do?

If you're on Windows, you'll need to disable power saving for the two devices under "device management"

vandad51 commented 2 years ago

I installed a fresh Ubuntu OS and used docker on that and it worked perfectly

Hedda commented 2 years ago

FYI, EZSP support is in a very experimental phase so you should really post your feedback here -> https://github.com/Koenkk/zigbee-herdsman/issues/319

I am not even not sure if any developer(s) is currently actively working on improving or maintaining that experimental support(?).

Only clear tips is to upgrade Zigbee EmberZNet NCP UART EZSP firmware version 6.7.9 or later and use dev branch (a.k.a. Edge):

https://github.com/arendst/Tasmota/tree/development/tools/fw_SonoffZigbeeBridge_ezsp

https://github.com/Koenkk/zigbee2mqtt/tree/dev

There are some ezsp related fixes in the zigbee-herdsman dependency that might have not yet made it into Z2M dev/edge yet:

https://github.com/Koenkk/zigbee-herdsman/

Regardless you still want to direct most if not all feedback/issues to subscribers of the WIP discussion in the zigbee-herdsman repo:

https://github.com/Koenkk/zigbee-herdsman/issues/319

Also, before buying any newer Silicon Labs based Zigbee Coordinator adpaters please take an extra note that WiFi based Zigbee bridges like ITead Sonoff ZBBridge are generally not recommended with the Silabs EZSP protocol. See the warnings about it:

https://www.zigbee2mqtt.io/guide/adapters/#notes

WiFi-based Serial-to-IP bridges are not recommended for Silicon Labs EZSP adapters as the serial protocol does not have enough fault-tolerance to handle packet loss or latency delays that can normally occur over WiFi connections. If cannot use a locally connected USB or UART/GPIO adapter then the recommendation is to use remote adapter that connected via Ethernet (wired) to avoid issues with EZSP caused by WiFi connections.

https://www.zigbee2mqtt.io/advanced/remote-adapter/connect_to_a_remote_adapter.html

WiFi-based Serial-to-IP bridges are not recommended for Silicon Labs EZSP adapters as the serial protocol does not have enough fault-tolerance to handle packet loss or latency delays that can normally occur over WiFi connections.

More warning about Zigbee to WiFi bridges for EZSP is not recommended for production as it does not do well with packed loss:

https://github.com/zigpy/bellows#warning-about-zigbee-to-wifi-bridges

https://www.home-assistant.io/integrations/zha/#warning-about-wi-fi-based-zigbee-to-serial-bridgesgateways

FYI, I also understand that the EFR32 board antenna design of the "SM-011 V1.0" Zigbee module used inside ITead's Sonoff ZBBridge have very high receive sensitivity to electromagnetic interference (EMI) / radio-frequency interference. This means that it will be extra important to keep it away from any other electronic devices or appliances that may generate an electromagnetic field (EM Field) or send our interfering radio signals. That includes the computer that you run your home automation application software on as well as any devices such as for example external harddrives or storage devices, power-supplies, etc., and of course any Wi-Fi access points or routers nearby.

Note! The new ITead Zigbee 3.0 USB Dongle Model: 9888010100045 (Hardware Revision Version 1.3) circuit board share the same type of antenna design so its radio is as well extremely sensitive to signal interference on its receiving end. The current recommendation for using it is to connect it via a long USB extension cable and try to move it as far away from all electronics and other possible sources of signal interference.

PS: Another general tip that always applies when building a Zigbee network is to begin by adding a few good mains-powered Zigbee router devices so that they will make use a stable baseline. Many start by buying three "IKEA TRADFRI Signal Repeater" (E1746).

https://zigbee.blakadder.com/Ikea_E1746.html

https://www.ikea.com/us/en/p/tradfri-signal-repeater-30400407/

https://www.ikea.com/gb/en/p/tradfri-signal-repeater-80424255/

https://www.ikea.com/se/sv/p/tradfri-signalfoerstaerkare-10400408/

DJAMIRSAM commented 2 years ago

Hey thanks for your help and sorry i have been offline for a while This will sound very dumb but how to i find the port the device is (/dev/ttyUSB#) im using docker desktop with windows (I have turned off the power saving thing)

DJAMIRSAM commented 2 years ago

This stick is not supported by zigbee2mqtt: https://www.zigbee2mqtt.io/guide/adapters/#recommended

I mean its worth a try

Hedda commented 2 years ago

By the way, strongly recommend that you at least try upgrading HUSBZB-1 to the very latest Silabs EmberZNet 6.7.10.x firmware made available by the community, see here -> https://github.com/grobasoz/zigbee-firmware/issues/17 and also here -> https://github.com/walthowd/husbzb-firmware/issues/36

And of course, also make sure to always use latest "dev" branch (a.k.a. 'edge' version) of Zigbee2MQTT for experimental features.

Note that with grobasoz EmberZNet 6.7.10.0 / EmberZNet 6.7.10.x firmware uses 115200 as its default baud rate for the serial port.

Understand that Silicon Labs EM35x and ETRX35x Zigbee chip hardware used in Nortek HUSBZB-1 have already been end-of-life for a while and should now almost be considered obsolete as Silabs have started that they are deprecated in firmware newer than EmberZNet 6.7.10.x

There may come a few updates bug-fix releases for EmberZNet 6.7.10.x but otherwise it will not get any new features or functions.

PS: Before buying a newer adapter know that even some of the specific models Silicon Labs EFR32 Mighty Gecko Series 1 modules (i.e. EFR32MG1x e.g. EFR32MG12/EFR32MG13/EFR32MG14) based chip which does not feature enough flash storage size to fit firmware built with the newly released EmberZNet 7.0.0.0 Zigbee release have also reached the end of their planned lifecycle and been scheduled for obsolescence and discontinued by the manufacturer (Silicon Labs). So only Silicon Labs EFR32 Mighty Gecko Series 2 (i.e. EFR32MG2x e.g. EFR32MG21/EFR32MG23/EFR32MG24) and some of the Silicon Labs EFR32 Mighty Gecko Series 1 module model variants which feature more flash storage size is be supported by EmberZNet 7.0 Zigbee.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

xplreitr commented 2 years ago

@DJAMIRSAM It is indeed worth a try because some of us have been able to get the nortek z-stick working using the updated firmware mentioned in this issue, and some sample configurations posted in #8026

Hedda commented 2 years ago

Since the EZSP support is still experimental recommend trying to keep discussions to that issue-> https://github.com/Koenkk/zigbee-herdsman/issues/319