Description of the issue
Previously I used z2m, no installation issues. I tested the ZHA and now I try to go back to the z2m, without success. I uninstalled ZHA, restarted home assistant, but I can’t get back to z2m anymore. When I try to access, this error appears: 502: Bad Gateway
Config:
data_path: /config/zigbee2mqtt
socat:
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
mqtt:
server: mqtt://core-mosquitto:1883
user: EDITED
password: EDITED
base_topic: zigbee2mqtt
serial:
port: /dev/ttyUSB0
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: true
advanced:
log_level: warn
pan_id: 6754
channel: 11
network_key:
- 1
- 3
- 5
- 7
- 9
- 11
- 13
- 15
- 0
- 2
- 4
- 6
- 8
- 10
- 12
- 13
availability_blocklist: []
availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
port: 8099
experimental:
transmit_power: 20
zigbee_herdsman_debug: false
Addon version
1.26.0-1
Platform
Home Assistant Core 2022.6.7
Home Assistant Supervisor 2022.07.0
Logs of the issue (if applicable)
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/socat.sh
[12:07:17] INFO: Socat not enabled, marking service as down
cont-init: info: /etc/cont-init.d/socat.sh exited 0
cont-init: info: running /etc/cont-init.d/zigbee2mqtt.sh
cont-init: info: /etc/cont-init.d/zigbee2mqtt.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun socat (no readiness notification)
services-up: info: copying legacy longrun zigbee2mqtt (no readiness notification)
[12:07:18] INFO: Handing over control to Zigbee2MQTT Core …
zigbee2mqtt@1.26.0 start
node index.js
Zigbee2MQTT:info 2022-07-31 12:07:23: Logging to console and directory: ‘/config/zigbee2mqtt/log/2022-07-31.12-07-22’ filename: log.txt
Zigbee2MQTT:info 2022-07-31 12:07:23: Starting Zigbee2MQTT version 1.26.0 (commit #unknown)
Zigbee2MQTT:info 2022-07-31 12:07:23: Starting zigbee-herdsman (0.14.40)
Zigbee2MQTT:error 2022-07-31 12:08:28: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-07-31 12:08:28: Failed to start zigbee
Zigbee2MQTT:error 2022-07-31 12:08:28: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-07-31 12:08:28: Exiting…
Zigbee2MQTT:error 2022-07-31 12:08:28: Error: network commissioning timed out — most likely network with the same panId or extendedPanId already exists nearby
at ZnpAdapterManager.beginCommissioning (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:347:23)
at ZnpAdapterManager.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:92:17)
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:101:27)
at start (/app/index.js:109:5)
502 — Bad Gateway =>TypeError: Cannot read property ‘payload’ of undefined #203
mobilandi commented Oct 6, 2021 •
After updating and restarting my HomeAssistant, zigbee2mqtt won’t start anymore. The interface shows a «502 — Bad Gateway» error. The log shows following issue:
Zigbee2MQTT:error 2021-10-06 22:58:07: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-10-06 22:58:07: Failed to start zigbee
Zigbee2MQTT:error 2021-10-06 22:58:07: Check https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start for possible solutions
Zigbee2MQTT:error 2021-10-06 22:58:07: Exiting.
Zigbee2MQTT:error 2021-10-06 22:58:07: TypeError: Cannot read property ‘payload’ of undefined
at AdapterNvMemory.writeItem (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/adapter-nv-memory.ts:111:31)
at ZnpAdapterManager.clearAdapter (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:473:9)
at ZnpAdapterManager.beginCommissioning (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:331:9)
at ZnpAdapterManager.beginRestore (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:296:9)
at ZnpAdapterManager.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:80:17)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29)
at Zigbee.start (/app/lib/zigbee.ts:63:27)
at Controller.start (/app/lib/controller.js:116:27)
at start (/app/index.js:95:5)
[22:58:07] INFO: Handing over control to Zigbee2mqtt Core .
zigbee2mqtt@1.21.2 start
node index.js
I’m using following releases:
zigbee2mqtt; 1.21.2-1
Core: core-2021.10.0
Host OS: Home Assistant OS 6.4
Supervisor: supervisor-2021.09.6
Is this any compability issue between these new releases?
The text was updated successfully, but these errors were encountered:
Were you be able to resolve this?
I am having similar log entries.
I have this exact problem. It is my first time using HA and zigbee2mqtt and figured i was doing something wrong? I have followed countless tutorials with this exact same result everytime. Does anyone have any progress?
Same here, did not find a solution yet unfortunately.
@Koenkk , any idea what is going wrong here?
Probably something wrong on the adapter side, try reflashing it.
I have the same error
i use sonoff zigbee 3.0 usb dongle plus
flashed CC1352P2_CC2652P_launchpad_coordinator_20210708
zigbee2mqtt; 1.22.1-1
Core: core-2021.11.5
Host OS: Home Assistant OS 64
mobilandi commented Dec 10, 2021
Probably something wrong on the adapter side, try reflashing it.
Yes I think there is something wrong with my adapter. I did reflash it several times. At some point the message disappeared and zigbee2mqtt started working again. So I don’t have a 100% answer, but reflashing could help.
Hi, I upgraded from a CC2531 to the sonoff zigbee 3.0 usb dongle.
For me reflashing didn’t help.
Also, the adapter works fine when I use the ZHA addon but not with zigbee2mqtt, so shouldn’t be an adapter issue
I get the following errors, after each z2m tries restarting itself:
Zigbee2MQTT:error 2021-12-10 22:45:42: TypeError: Cannot read property ‘payload’ of undefined
Zigbee2MQTT:error 2021-12-10 22:46:09: TypeError: Cannot read property ‘payload’ of undefined
Zigbee2MQTT:error 2021-12-10 22:46:36: Error: SRSP — SYS — getExtAddr after 6000ms
Zigbee2MQTT:error 2021-12-10 22:47:55: Error: SRSP — ZDO — startupFromApp after 40000ms
Zigbee2MQTT:error 2021-12-10 22:48:23: Error: SRSP — SYS — getExtAddr after 6000ms
Zigbee2MQTT:error 2021-12-10 22:49:10: Error: SRSP — ZDO — startupFromApp after 40000ms
Zigbee2MQTT:error 2021-12-10 22:50:05: Error: SRSP — ZDO — startupFromApp after 40000ms
Zigbee2MQTT:error 2021-12-10 22:51:01: Error: SRSP — ZDO — startupFromApp after 40000ms
Zigbee2MQTT:error 2021-12-10 22:51:22: Error: SRSP — SYS — getExtAddr after 6000ms
Zigbee2MQTT:error 2021-12-10 22:51:36: Error: SRSP — SYS — getExtAddr after 6000ms
Zigbee2MQTT:error 2021-12-10 22:52:25: Error: SRSP — ZDO — startupFromApp after 40000ms
Zigbee2MQTT:error 2021-12-10 22:53:39: Error: SRSP — ZDO — startupFromApp after 40000ms
Zigbee2MQTT:error 2021-12-10 22:54:40: Error: SRSP — ZDO — startupFromApp after 40000ms
Zigbee2MQTT:error 2021-12-10 22:55:08: Error: SRSP — UTIL — getDeviceInfo after 6000ms
Zigbee2MQTT:error 2021-12-10 22:55:34: TypeError: Cannot read property ‘length’ of null
Zigbee2MQTT:error 2021-12-10 22:56:02: Error: SRSP — SYS — getExtAddr after 6000ms
Zigbee2MQTT:error 2021-12-10 22:56:20: Error: SRSP — AF — register after 6000ms
Zigbee2MQTT:error 2021-12-10 22:57:15: Error: SRSP — ZDO — startupFromApp after 40000ms
I have the same error i use sonoff zigbee 3.0 usb dongle plus flashed CC1352P2_CC2652P_launchpad_coordinator_20210708 zigbee2mqtt; 1.22.1-1 Core: core-2021.11.5 Host OS: Home Assistant OS 64
were you able to solve? I have the same problem.
Probably something wrong on the adapter side, try reflashing it.
Reflashing solved it for me.
I reflashed it and it started working again. But now it is throwing new errors without me touching it or updating it. It is to unreliable for day to day use. Im gonna find something else instead, because it is simply not «smart» home at all, when you have to reflash and reinstall everything at random times without any idea what is going wrong or what is causing it.
Same issue here when using a brand new and z-stack flashed «sonoff zigbee 3.0 usb dongle plus».
I can pair clients and it all looks very fine, but node red give the error «502: Bad Gateway«.
From the log I have this information:
22-01-23 15:41:22 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.33.5:8099 ssl:default [Connect call failed (‘172.30.33.5’, 8099)]
Hmm wondering what the new gateway IP address and port is.
Everything has been working a kind of stable before I change from a 2531 based dongle to the new sonoff zigbee 3.0 usb dongle plus.
Best regards
Bjarke
Hello, does somebody find a solution?
because I have the problem too with a CC2652, HA detect directly the key, but I can’t start Z2M with error on payload.
Mine randomly worked at one point. But I never got it working properly as intended. So I ended up just abandoning the project, seeing as no one was able to help. Everyone else seems to make it work, so I assume it’s me. I tried suggesting them that I could a better tutorial is they could me get going. as all the tutorials are all lacking in some aspect. But no one ever replied. So i gave up.
Sorry i Can’t help you better. You Might be better of with a network version indstead of That USB version.
I found the reason of my problem. Ans it’s a very stupid reason
When I plug my key, HA detected it and try to install an integration, I configure it, . and didn’t pay attention any more.
The name of this integration is «Zigbee Home Automation» aka ZHA, and ZHA use the key, so you can’t use it with zigbee in the same time!!
So I just disabled ZHA and it’s work :),
So it’s solved for me
Well done, mate! I did not know This! I’m gonna give it another go when I have the time, and report back!
That was indeed the problem. I always let it setup, after plugging it in, not knowing that I would take up the spot, so mqtt couldn’t acces it.
Well spotted, and thank you for your time!
mine works now as well!
I found the reason of my problem. Ans it’s a very stupid reason
When I plug my key, HA detected it and try to install an integration, I configure it, . and didn’t pay attention any more. The name of this integration is «Zigbee Home Automation» aka ZHA, and ZHA use the key, so you can’t use it with zigbee in the same time!! So I just disabled ZHA and it’s work :), So it’s solved for me
mate you save my life) thank you
I found the reason of my problem. Ans it’s a very stupid reason
When I plug my key, HA detected it and try to install an integration, I configure it, . and didn’t pay attention any more. The name of this integration is «Zigbee Home Automation» aka ZHA, and ZHA use the key, so you can’t use it with zigbee in the same time!! So I just disabled ZHA and it’s work :), So it’s solved for me
Thanks! This solved it for me as well.
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
© 2022 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
502: Bad Gateway on Start-up #446
got the add-on installed, but getting an 502: Bad Gateway when trying to run the add-on.
Home Assistant 0.116 on RBpi4 in docker.
Got 8099 allowed in the ufw rules.
8099 ssl:default [Connection refused] though
What am i doing wrong?
The text was updated successfully, but these errors were encountered:
Can you post your config? Why are you not just using ingress? Did you setup your new_api property? Usually the built-in frontend takes up to 5 minutes to start from the time the add-on started. Also this is influenced on the number of automations or if you have other stuff like Zigbee2mqttAssistant
Not too much automation running yet and no other stuff installed. Even going through ingress i am getting the same error.
I’m fairly new to MQTT so i might be missing something. Installed Mosquitto broker.
Adding the new-api: experimental code for example the config-check fails.
Can you post your z2m config? Did you wait for 5 minutes?
And yes, waited 30 minutes;)
Where do you see 8099 ssl:default [Connection refused] ?
This is right after «booting» the add-on
If you boot the add-on and go directly to the tab in the side bar, you will see this error. Can you get debug logs from the add-on?
Your add-on is crashing, as your serial port setup is incorrect: Error: Error while opening serialport ‘Error: Error: Resource busy, cannot open /dev/ttyACM0’ . Make sure you don’t have any other add-on using the serial port and that the serial port is the correct one.
I have deconz running that is looking at a conbee II stick? Might that be the issue?
I had this problem too and solved it by reinstalling zigbee2mqtt if it helps anything
If you have deconz with conbee stick you should still use the documentation to find out the serial port, however you need an extra setting:
Okay, slowly getting there, still bad gate-way but also:
Zigbee2MQTT:error 2020-10-13 16:46:39: Error: Failed to connect to the adapter (Error: SRSP — SYS — ping after 6000ms)
This is when deconz is «stopped»
Make sure you also have firmware updated with the proper one. Also make sure you do a reboot and deconz is stopped and the serial port is correct.
Conbee is in the latest firmware. System just fully rebooted and deconz is stopped. Still same error:(
Port is correct:
13 16:00 usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2213029-if00 -> ../../ttyACM0
Did you update the config with the adapter setting?
Even though on restart this reports an error.
You need both like I said in #446 (comment)
Still same error on the config. and still Error: Failed to connect to the adapter (Error: SRSP — SYS — ping after 6000ms)
The config goes in your zigbee2mqtt add-on config, not in your home assistant config.
Can you add to the zigbee2mqtt add-on the option:
And send what you get ?
I think we did it! Thank you very very much!
The config goes in your zigbee2mqtt add-on config, not in your home assistant config.
How do you edit the yaml of the addon, and not the config of HA? I am using HA/OS on a VM in Virtualbox on a windows 10 machine.
You just use the add-on config in the Supervisor, no need to edit yaml file on disk.
thanks buddy. you save me. lucky i found an answer for it. it works.
Hi, i add these commands
serial: port: /dev/ttyACM0 adapter: deconz
But appear the same error
The config gets overwitten every time Zigbee2mqtt starts, and I read elsewhere I’m supposed to edit that using the GUI. But the GUI won’t start until I change it. Catch 22.
Hi everyone, i am completly new to Homeassistant but already have a first problem. I hope someone here can help me.
I have the same issue: When starting zigbee2mqtt i see only «Bad gateway»
Источник
Hello,
I was a “happy customer” of zigbee2mqtt till last week… something happen (maybe an update) and my entire zigbee network started to fail…
Initially I thought that it was a hardware failure, so:
-
swopped the old TI USB with a new one (Texas_Instruments_TI_CC2531_USB)
-
purchased a new one ( zig-a-zig-ah! – usb-1a86_USB)
but no luck 📷
Then I thought of a SW issue, so I decided to wipe out the Raspberry pi and reinstalling everything from scratch… again no luck 📷
Now what I have done after re-installing is the following:
-
Installed and configure Mosquitto broker add-on (simply added a dedicated user and password and started → no error in log)
-
Installed ZigBee2MQTT add-on and performed the followings:
-
edited config file as below
Copy to clipboard
mqtt:
base_topic: zigbee2mqtt
server: mqtt://localhost:1883
user: mqttuser
password: mqttPassword
serial: port: /dev/ttyACM0
-
Checked the Log and found the following:
Copy to clipboard
[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...
[09:39:54] INFO: Socat not enabled, marking service as down
[cont-init.d] socat.sh: exited 0.
[cont-init.d] zigbee2mqtt.sh: executing...
[09:39:56] INFO: MQTT available, fetching server detail ...
[09:39:57] INFO: Previous config file found, checking backup
[09:39:57] INFO: Creating backup config in '/config/zigbee2mqtt/.configuration.yaml.bk' [09:39:57] 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.
[09:40:00] INFO: Handing over control to Zigbee2mqtt Core ...
> zigbee2mqtt@1.19.1 start /app
> node index.js
Zigbee2MQTT:error 2021-06-16 09:40:50: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-06-16 09:40:50: Failed to start zigbee
Zigbee2MQTT:error 2021-06-16 09:40:50: Check https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start for possible solutions
Zigbee2MQTT:error 2021-06-16 09:40:50: Exiting...
Zigbee2MQTT:error 2021-06-16 09:40:50: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:93:31)
at Generator.throw (<anonymous>)
at rejected (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:25:65)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.19.1 start: `node index.js`
npm ERR! Exit status 1 npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.19.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-16T05_41_25_962Z-debug.log
[09:41:26] INFO: Handing over control to Zigbee2mqtt Core ...
And when I try to open ZigBee2MQTT we interface I get 502: Bad Gateway
What am I doing wrong? I saw many people had similar issues in the past, but I could not really find a “unique solution”…
any suggestion would be much appreciated 📷
Thank you
4
ответов
Аноним
Читать логи ¯_(ツ)_/¯
вот что пишет Zigbee2MQTT:error 2022-03-06 10:01:07: Exiting…
Zigbee2MQTT:error 2022-03-06 10:01:08: Error: Coordinator backup is corrupted Если знаете , подскажите что сделать
Алексей
вот что пишет Zigbee2MQTT:error 2022-03-06 10:01:0…
Битый бекап координатора, скорее всего криво созранился, попробуйте для начала переименовать coordinator backup json в что нибудь иное
Аноним
Битый бекап координатора, скорее всего криво созра…
Сработало переименование. Подключил выключатель. Работает очень странно. Вкл лев клавишу-свет горит. Вкл прав клавишу -вторая лампа горит. Откл лев клавишу-свет гаснет. Откл прав кл-отклика нет, свет продолжает гореть. Снова вкл 2 клавиши- горят2 лампы. Откл правую-лампа гаснет. Выкл левую- теперь здесь нет отклика, лампа горит. В чем причина? Какие-то настройки надо изменить? Подскажите
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
Really quick post. As a result of my 3 part Beginner’s guide to Node-red tutorials, some have reached out to tell me that they’ve been unable to run Node-red successfully. They have installed the add-on from the “Home Assistant Community Add-ons” section which can be found in the side bar under Supervisor => Add-on Store (tab), but when they start the add-on, clicking on the link results in a 502 bad gateway error. In layman’s terms, this http error means the webserver has received a bad response and cannot move forwards. In reality, it’s either you’ve tried to access the add-on too early or it’s usually a password / auth issue. I’ve helped several people to address this. If you’re receiving a 502 issue, I would encourage you to wait a minute or so for the add-0n to finish loading itself (you can check the progress on the log tab of the add-on). If you are still experiencing the 502 after a couple of minutes, I suggest you do the following.
Click on the conf tab of the Node-red add-on and basically paste this in. This is my configuration and it just works.
credential_secret: redacted but something difficult to guess
dark_mode: false
http_node:
username: redacted but same as HA login
password: redacted but same as HA password
http_static:
username: redacted but same as HA login
password: redacted but same as HA password
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
require_ssl: false
system_packages: []
npm_packages: []
init_commands: []
Now obviously, if you want dark mode or SSL etc., you’ll need to update this as required, but for now let’s try and get straight into node-red. Also some of this may or may not be necessary, but as I mentioned before, this just works for me. If you want to go through the full configuration options, you can check here: https://github.com/hassio-addons/addon-node-red/blob/master/node-red/DOCS.md
In order to preserve the correct lay out, here’s an example of it on the page:
Save the configuration and restart. It’s normally a good time to refresh the page (holding shift) or clear the cache in your browser forcing a clean retrieval. If all went to plan, you should be staring at a fresh Node-red page waiting for you to unleash your creativity. Hopefully this saves you some heartache!
If you enjoyed this type of content and would be interested in sharing your own solutions, tips and tricks with like minded people perhaps you’d consider joining our facebook group. The aim of this group will hopefully be more show and tell rather than support, but that’s not to say we can’t lend a helping hand 🙂
https://www.facebook.com/groups/386238285944105
Cheers!
Most of the time this is caused by Zigbee2MQTT not being able to communicate with your Zigbee adapter.
Error: SRSP - SYS - ping after 6000ms
4 common reasons of this error:
- The port of your serial adapter changed. Check this to find out the port of your adapter.
- If you are using a CC2530 or CC2531; it is a common issue for this adapter to crash (due to its outdated hardware). Reflashing the firmware should fix the problem. If it happens often consider flashing the source routing firmwareopen in new window or upgrade to a more powerful adapter.
- Your adapter requires additional configuration parameters. Check supported Adapters section to find out if your adapter requires extra parameters (eg. ConBee II / RaspBee II).
- Home Assistant’s «Zigbee Home Automation» (ZHA) integration is enabled. Try to disable the ZHA integration and restart the Zigbee2MQTT add-on.
Verify that you put the correct port in configuration.yaml
Execute the following command to find out the correct path:
pi@raspberry:/ $ ls -l /dev/serial/by-id
total 0
lrwxrwxrwx. 1 root root 13 Oct 19 19:26 usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018ED3DDF-if00 -> ../../ttyACM0
In this example the correct port
would be /dev/ttyACM0
.
Which port should I use for Texas Instruments LAUNCHXL-CC26X2R1/CC1352P-2, /dev/ttyACM0 or /dev/ttyACM1?
The Texas Instruments launchpad has a build in debugger. This debugger also registers a port next to the device data port. Of course this is not necessarily number 0 and 1. But normally the lowest number is the device data port and the other the debugger.
To find the correct port, execute:
pi@raspberry:/ $ ls -l /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 Jan 6 19:07 usb-Texas_Instruments_XDS110__03.00.00.05__Embed_with_CMSIS-DAP_L1100BTD-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 Jan 6 19:07 usb-Texas_Instruments_XDS110__03.00.00.05__Embed_with_CMSIS-DAP_L1100BTD-if03 -> ../../ttyACM1
The device with id ending with if00 is for device data. Use this port in your configuration.
Verify that the user you run Zigbee2MQTT as has write access to the port
This can be tested by executing: test -w [PORT] && echo success || echo failure
( e.g. test -w /dev/ttyACM0 && echo success || echo failure
).
If it outputs failure
it could mean your user does not have access to the port. To test assign write access by executing: sudo chown [USER] [PORT]
(e.g. sudo chown pi /dev/ttyACM0
).
if it outputs failure
, then you need to permanently give your user permission to the device.
Method 1: Give your user permissions on every reboot.
You can create a ‘udev’ rule to give your user permissions after every reboot:
-
udevadm info -a -n /dev/ttyACM0 | grep 'serial'
get the serial to your deviceYOURSERIAL
-
Create the rule file with:
sudo nano /etc/udev/rules.d/99-usb-serial.rules
-
add this line:
SUBSYSTEM=="tty", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="16a8", ATTRS{serial}=="YOURSERIAL", SYMLINK="ttyUSB.CC2531-01", OWNER="pi"
-
modify your Zigbee2MQTT config to adjust new SYMLINK name:
nano /opt/zigbee2mqtt/data/configuration.yaml
… serial: port: /dev/ttyUSB.CC2531-01 …
After reboot your device will have the right permissions and always the same name.
Method 2: Add your user to specific groups
As mentioned on https://github.com/esp8266/source-code-examples/issues/26 , depending on your linux installation, various groups could have ownership of the device.
Add your user to the uucp
, tty
, dialout
groups:
sudo usermod -a -G uucp $USER
sudo usermod -a -G tty $USER
sudo usermod -a -G dialout $USER
Reboot your device and now your user should have access to the device.
Error: Coordinator failed to start, probably the panID is already in use, try a different panID or channel
- If you still get this error after increasing the panID (as explained here) and you are using a Raspberry Pi with other USB devices
- In case you are getting this after first starting successfully and pairing a device it might be that the firmware has been flashed incorrectly. Try flashing the stick on a different computer (detailed infoopen in new window). This issue mainly occurs in combination with a Slaesh’s CC2652RB stick.
Error: Resource temporarily unavailable Cannot lock port
This error occurs when another program is already using (and thus locking) the adapter. You can find out which via the following command: ls -l /proc/[0-9]/fd/ |grep /dev/ttyACM0
(replace /dev/ttyACM0
with your adapter port).
Raspberry Pi users: use a good power supply
A bad power supply can make your system and its USB devices unstable. Make sure to use a good power supply.
In case you see message like below when running dmesg -w
you are using a bad power supply.
[44870.355590] Under-voltage detected! (0x00050005)
[44874.515618] Voltage normalised (0x00000000)
[44880.755718] Under-voltage detected! (0x00050005)
[44889.075627] Voltage normalised (0x00000000)
When you have a SSD connected to the Pi, try connecting the adapter via a powered USB hub.
Make sure the extension cable works
A bad extension cable can lead to connection issues between the system and the adapter. Symptoms of this are disconnection messages in the dmesg -w
log like below.
[44929.156957] usb 1-1.5: USB disconnect, device number 119
[44929.455555] usb 1-1.5: new full-speed USB device number 120 using dwc_otg
[44929.604582] usb 1-1.5: New USB device found, idVendor=0451, idProduct=16a8, bcdDevice= 0.09
[44929.604596] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[44929.604606] usb 1-1.5: Product: TI CC2531 USB CDC
[44929.604615] usb 1-1.5: Manufacturer: Texas Instruments
For Openhab users: disable zwave binding
The Openhab zwave binding interferes with Zigbee2MQTT, click hereopen in new window for more information.
In case of a CC2530 or CC2531 adapter, verify that don’t have a CC2540
The CC2540 can be confused easily with the CC2531 as it looks (almost) exactly the same. However, this device does not support zigbee but bluetooth. This can be verified by looking at the chip.
ModemManageropen in new window is installed
ModemManager, which is default installed on e.g. Ubuntu, is known to cause problems. It can easily be fixed by removing ModemManager through sudo apt-get purge modemmanager
.
hciuart is running
hciuart can be disabled by executing: sudo systemctl disable hciuart
.
Texas Instruments LAUNCHXL-CC1352P-2/CC26X2R1 only: press the reset button on the device
If Zigbee2MQTT fails to start with a Texas Instruments LAUNCHXL-CC1352P-2/CC26X2R1 with Error: SRSP - SYS - version after 6000ms
, you most probably have connected your device to a system that requires pressing the reset button (the one next to the USB connector) momentarily/shortly after connecting the USB cable. This issue has primarily been observed on x86 architectures only ( e.g., Intel NUC, HPE Microserver, i7 laptop), see also #2162open in new window. The procedure has to be repeated every time the adapter is re-connected and it’s not clear yet, whether this can be fixed at all. It does not seem to occur on ARM based boards (Raspberry Pi, ODROID XU4).
Something that can also solve the issue is to replug the USB cable.
CC2531 coordinators only: press the reset button on the device
When you plug the CC2531 in your computer, the green LED should go on. By pressing the reset button on the CC2531 the green LED should go off. The CC2531 has 2 buttons on it, the reset button is the one which is closest to the USB port. Now try starting Zigbee2MQTT again.
Texas Instruments LAUNCHXL-CC26X2R1 coordinator only: verify that you have the correct revision
The revision of your board can be seen in UniFlash by clicking more info in the top, now press Read device info.
The correct revision is: E like shown below.
All earlier version are not supported (these are development boards). Return this board to the seller immediately.