Well noticed @francisp
And you are very right…and by usb_id is not reliable, as they might change after a reboot
Better would be 2 different sticks, but i wonder why 2 zigbee controllers??
Question, on what hardware is it running??
Well noticed @francisp
And you are very right…and by usb_id is not reliable, as they might change after a reboot
Better would be 2 different sticks, but i wonder why 2 zigbee controllers??
Question, on what hardware is it running??
From what I’ve seen, I believe you are correct. Serial/by-id is a new concept for me. I did some searching in the shell, looking for /dev/serial/by-id* dmesg | grep USB* and ha hw info | grep USB, and I found that there were two identical serial by id. Being new to the concept, I didn’t understand that, I thought perhaps one wasn’t showing up, I didn’t understand how they could be the same. People kept saying don’t use /tty/USBx or /dev/tty/ACM0, so I went with the advice.
Also not sure if I needed the adapter: deconz, or if my Sonoff needed something different.
So if they have the same ID, is there a solution, or will buying someone else’s adapter be necessary?
The reason i asked is because i used to run my HA on HyperV along with a CC2531 zigbee usb.
The issue there was, HyperV doesn’t support USB, so i looked for a different solution, i used the usb port of the hosting machine, and a ser2net to set up the connection with zigbee2mqtt…
serial:
port: tcp://10.0.0.250:5656
That worked fine, until my cc2531 broke down, and i replaced it with a ConbeeII, and since it requires decons it didn’t work over tcp anymore😕
So i moved to VMware, which does support usb
Two zigbee controllers because I thought a second one was needed to get z2m up and running. I read that you couldn’t run both z2a and z2m off the same stick, but you could use 2 sticks, and they could be the same brand. What should I have purchased?
It’s running on an Intel NUC, running HAOS, with an external powered USB 2.0 hub for the sticks.
Except for the first line, I didn’t understand a word of the following:
The reason i asked is because i used to run my HA on HyperV along with a CC2531 zigbee usb.
The issue there was, HyperV doesn’t support USB, so i looked for a different solution, i used the usb port of the hosting machine, and a [ser2net](https://community.home-assistant.io/t/hassos-in-hyper-v-is-it-possible-to-install-usb-rediector-or-something-similar-for-usb-support/212136/2) to set up the connection with zigbee2mqtt…
serial:
port: tcp://10.0.0.250:5656
That worked fine, until my cc2531 broke down, and i replaced it with a ConbeeII, and since it requires decons it didn’t work over tcp anymore😕
So i moved to VMware, which does support usb
never mind… you are not running ha on a virtual machine, so not applicable in your case…
erm, what you said
It should be possible to run serial by usb_id (the first option you had issue’s with), but the ID could change after a reboot…
You could also take a whole other approach (actually my very 1st solution when I still ran under HyperV)
Not really what I was trying to do, wanted to play with z2m and move a couple of devices over, but thank you for trying.
If both serial by ID’s are the same, it’s just going to screw up when z2m writes to that port.
In this case, you have to use these, because serial/by_id does not differentiate between the 2 sticks
And then I’m back to the same issue…why won’t z2m start, where are the errors coming from.
Hi Everyone -
I am migrating to zigbee2mqtt from ZHA. I have disabled ZHA (i’ve triple checked this. However - i cannot get Zigbee2MQTT to start.
My instance is running on a HA Yellow with the Sonoff dongle connected via a USB dongle. A user (not person) was created for MQTT and i’ve confirmed the password/user name match.
Here is my configuration:
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
base_topic: zigbee2mqtt
user: mqtt_user
password: mqtt
server: mqtt://core-mosquitto:1883
mqtt:
server: 10.0.4.69:8123
base_topic: zigbee2mqt
serial:
port: >-
/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231031155018-if00
permit_join: true
Here is my log:
Zigbee2MQTT
[14:18:43] INFO: Preparing to start…
[14:18:43] INFO: Socat not enabled
[14:18:45] INFO: Starting Zigbee2MQTT…
Zigbee2MQTT:info 2024-04-06 14:18:53: Logging to console and directory: ‘/config/zigbee2mqtt/log/2024-04-06.14-18-53’ filename: log.txt
Zigbee2MQTT:info 2024-04-06 14:18:53: Starting Zigbee2MQTT version 1.36.1 (commit #unknown)
Zigbee2MQTT:info 2024-04-06 14:18:53: Starting zigbee-herdsman (0.40.3)
Zigbee2MQTT:error 2024-04-06 14:19:14: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2024-04-06 14:19:14: Failed to start zigbee
Zigbee2MQTT:error 2024-04-06 14:19:14: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
Zigbee2MQTT:error 2024-04-06 14:19:14: Exiting…
Zigbee2MQTT:error 2024-04-06 14:19:14: 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:103:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
at Zigbee.start (/app/lib/zigbee.ts:62:27)
at Controller.start (/app/lib/controller.ts:109:27)
at start (/app/index.js:107:5)
You are using a Dongle-E, so your configuration is wrong
serial:
port: >-
/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231031155018-if00
adapter: ezsp
Thank you, Francis!
I am one step closer! That did the trick for the hardware side. Now my issue is connecting to the MQTT server.
Here is the log:
Connecting to MQTT server at 10.0.4.69:8123
Zigbee2MQTT:error 2024-04-07 11:11:13: MQTT error: connack timeout
Zigbee2MQTT:error 2024-04-07 11:11:13: MQTT failed to connect, exiting…
Zigbee2MQTT:info 2024-04-07 11:11:13: Stopping zigbee-herdsman…
Zigbee2MQTT:info 2024-04-07 11:11:14: Stopped zigbee-herdsman
I have it pointed at my HA IP address (10.0.4.69:8133). Is this correct? I had read that in my research but unsure if that is correct.
mqtt://core-mosquitto:1883
make sure to create a user/password in HA
Thanks, again! I assume if I’m not getting this error:
Connection refused: Not authorized
It means my user and password are wrong?
User: mqtt_user
Pass: MQTT
My config in broker:
logins:
username: mqtt_user
password: mqtt
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
active: false
folder: mosquitto
I have a user set up under Users in HA. What’s the final piece I’m missing?
passwords are case-sensitive !
and you need password in both (not Pass) (and User needs to be user)
@francisp My phone auto corrected to capitals. I just confirmed all passwords and user names match.
User in users account. Mosquito Broker. And Z2MQTT. All three using “mqtt_user” and “mqtt” for the pass.
Is there something else I am not considering? Is it the use of user vs username?
Broker configuration:
logins:
Zigbee2Mqtt configuration:
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
base_topic: zigbee2mqtt
user: mqtt_user
password: mqtt
mqtt:
server: mqtt://core-mosquitto:1883
serial:
port: >-
/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231031155018-if00
adapter: ezsp
permit_join: true
You will have to check the MQTT logs.
Its looks like something is trying to connect but gets disconnected. Logs from mosquito broker:
2024-04-07 13:42:09: Client auto-50782605-D7F7-771A-50A3-BDDAE2F63111 disconnected.
2024-04-07 13:42:25: New connection from 172.30.33.4:51935 on port 1883.
2024-04-07 13:42:25: New client connected from 172.30.33.4:51935 as auto-A0C6B403-0A2D-82F0-A379-8B78DC49E535 (p2, c1, k60, u’addons’).
2024-04-07 13:42:25: Client auto-A0C6B403-0A2D-82F0-A379-8B78DC49E535 disconnected.
2024-04-07 13:42:34: Saving in-memory database to /data//mosquitto.db.
2024-04-07 13:42:40: New connection from 172.30.33.4:57839 on port 1883.
2024-04-07 13:42:40: New client connected from 172.30.33.4:57839 as auto-881FFFBE-CF91-7CDF-6A66-75CE90D35E34 (p2, c1, k60, u’addons’).
2024-04-07 13:42:40: Client auto-881FFFBE-CF91-7CDF-6A66-75CE90D35E34 disconnected.
2024-04-07 13:42:56: New connection from 172.30.33.4:50253 on port 1883.
2024-04-07 13:42:56: New client connected from 172.30.33.4:50253 as auto-5701855F-F36A-07EB-4135-FD1591A4FF2E (p2, c1, k60, u’addons’).
2024-04-07 13:42:56: Client auto-5701855F-F36A-07EB-4135-FD1591A4FF2E disconnected.
2024-04-07 13:43:11: New connection from 172.30.33.4:46625 on port 1883.
2024-04-07 13:43:11: New client connected from 172.30.33.4:46625 as auto-4D2B5F3D-8C7B-A548-1CAB-D390D24E2C84 (p2, c1, k60, u’addons’).
2024-04-07 13:43:11: Client auto-4D2B5F3D-8C7B-A548-1CAB-D390D24E2C84 disconnected.
2024-04-07 13:43:21: New connection from 172.30.32.2:47770 on port 1883.
2024-04-07 13:43:21: Client closed its connection.
2024-04-07 13:43:26: New connection from 172.30.33.4:47525 on port 1883.
2024-04-07 13:43:26: New client connected from 172.30.33.4:47525 as auto-3FD71001-DE1E-0BBB-D0FA-2C5C8BF3ABAD (p2, c1, k60, u’addons’).
2024-04-07 13:43:26: Client auto-3FD71001-DE1E-0BBB-D0FA-2C5C8BF3ABAD disconnected.
2024-04-07 13:43:41: New connection from 172.30.33.4:49305 on port 1883.
2024-04-07 13:43:41: New client connected from 172.30.33.4:49305 as auto-AC208B45-5F0B-C370-6097-4DF5321B0EA9 (p2, c1, k60, u’addons’).
2024-04-07 13:43:41: Client auto-AC208B45-5F0B-C370-6097-4DF5321B0EA9 disconnected.
2024-04-07 13:43:56: New connection from 172.30.33.4:45265 on port 1883.
2024-04-07 13:43:56: New client connected from 172.30.33.4:45265 as auto-4A9F322F-84B9-01B1-9BC2-8ADC79CD47FE (p2, c1, k60, u’addons’).
2024-04-07 13:43:56: Client auto-4A9F322F-84B9-01B1-9BC2-8ADC79CD47FE disconnected.
2024-04-07 13:44:11: New connection from 172.30.33.4:54031 on port 1883.
2024-04-07 13:44:11: New client connected from 172.30.33.4:54031 as auto-CFD5C1EF-FE7C-009F-98F6-9E742D339819 (p2, c1, k60, u’addons’).
2024-04-07 13:44:11: Client auto-CFD5C1EF-FE7C-009F-98F6-9E742D339819 disconnected.
2024-04-07 13:44:26: New connection from 172.30.33.4:46557 on port 1883.
2024-04-07 13:44:26: New client connected from 172.30.33.4:46557 as auto-E2A96068-9F06-6177-8E1D-E487FB99E886 (p2, c1, k60, u’addons’).
2024-04-07 13:44:26: Client auto-E2A96068-9F06-6177-8E1D-E487FB99E886 disconnected.
2024-04-07 13:44:41: New connection from 172.30.33.4:41879 on port 1883.
2024-04-07 13:44:41: New client connected from 172.30.33.4:41879 as auto-90346FF7-6D46-FE4D-6CEF-5C0F2F1DDA43 (p2, c1, k60, u’addons’).
2024-04-07 13:44:41: Client auto-90346FF7-6D46-FE4D-6CEF-5C0F2F1DDA43 disconnected.
2024-04-07 13:44:57: New connection from 172.30.33.4:60949 on port 1883.
2024-04-07 13:44:57: New client connected from 172.30.33.4:60949 as auto-17B3F1F7-A576-6153-6B51-34E2AABF0D22 (p2, c1, k60, u’addons’).
2024-04-07 13:44:57: Client auto-17B3F1F7-A576-6153-6B51-34E2AABF0D22 disconnected.
2024-04-07 13:45:13: New connection from 172.30.33.4:42887 on port 1883.
2024-04-07 13:45:13: New client connected from 172.30.33.4:42887 as auto-B6659C52-6A2E-F3D9-83EA-280E681ACF7E (p2, c1, k60, u’addons’).
2024-04-07 13:45:13: Client auto-B6659C52-6A2E-F3D9-83EA-280E681ACF7E disconnected.
2024-04-07 13:45:21: New connection from 172.30.32.2:55828 on port 1883.
2024-04-07 13:45:21: Client closed its connection.
2024-04-07 13:45:28: New connection from 172.30.33.4:58323 on port 1883.
2024-04-07 13:45:28: New client connected from 172.30.33.4:58323 as auto-A9ACBDD5-F494-6C0D-14B3-E13675E2574D (p2, c1, k60, u’addons’).
2024-04-07 13:45:28: Client auto-A9ACBDD5-F494-6C0D-14B3-E13675E2574D disconnected.
2024-04-07 13:45:45: New connection from 172.30.33.4:50441 on port 1883.
2024-04-07 13:45:45: New client connected from 172.30.33.4:50441 as auto-3E711153-CEA9-F76E-5FDB-531638B7B042 (p2, c1, k60, u’addons’).
2024-04-07 13:45:45: Client auto-3E711153-CEA9-F76E-5FDB-531638B7B042 disconnected.
2024-04-07 13:46:01: New connection from 172.30.33.4:41759 on port 1883.
2024-04-07 13:46:01: New client connected from 172.30.33.4:41759 as auto-D8B42088-FF68-D561-FB79-2BA3D7F14153 (p2, c1, k60, u’addons’).
2024-04-07 13:46:01: Client auto-D8B42088-FF68-D561-FB79-2BA3D7F14153 disconnected.
2024-04-07 13:46:16: New connection from 172.30.33.4:49187 on port 1883.
2024-04-07 13:46:16: New client connected from 172.30.33.4:49187 as auto-A1E8ACD5-E5E5-12A0-3C16-2B372764C583 (p2, c1, k60, u’addons’).
2024-04-07 13:46:16: Client auto-A1E8ACD5-E5E5-12A0-3C16-2B372764C583 disconnected.
2024-04-07 13:46:31: New connection from 172.30.33.4:39971 on port 1883.
2024-04-07 13:46:31: New client connected from 172.30.33.4:39971 as auto-D8D4C12A-AB75-FBCA-AE76-A7B0F79E6D5E (p2, c1, k60, u’addons’).
2024-04-07 13:46:31: Client auto-D8D4C12A-AB75-FBCA-AE76-A7B0F79E6D5E disconnected.
2024-04-07 13:46:46: New connection from 172.30.33.4:54969 on port 1883.
2024-04-07 13:46:46: New client connected from 172.30.33.4:54969 as auto-59CFE697-546B-824A-8858-5AE2E2258E94 (p2, c1, k60, u’addons’).
2024-04-07 13:46:46: Client auto-59CFE697-546B-824A-8858-5AE2E2258E94 disconnected.
2024-04-07 13:47:01: New connection from 172.30.33.4:49295 on port 1883.
2024-04-07 13:47:01: New client connected from 172.30.33.4:49295 as auto-7C655FAA-8485-6D42-1770-F1AB8C761B82 (p2, c1, k60, u’addons’).
2024-04-07 13:47:01: Client auto-7C655FAA-8485-6D42-1770-F1AB8C761B82 disconnected.
2024-04-07 13:47:16: New connection from 172.30.33.4:36495 on port 1883.
2024-04-07 13:47:16: New client connected from 172.30.33.4:36495 as auto-C110BE6A-5B7B-7B3A-8E88-7D4732EBA68A (p2, c1, k60, u’addons’).
2024-04-07 13:47:16: Client auto-C110BE6A-5B7B-7B3A-8E88-7D4732EBA68A disconnected.
2024-04-07 13:47:21: New connection from 172.30.32.2:54074 on port 1883.
2024-04-07 13:47:21: Client closed its connection.
2024-04-07 13:47:32: New connection from 172.30.33.4:59889 on port 1883.
2024-04-07 13:47:32: New client connected from 172.30.33.4:59889 as auto-5B93AD9A-E568-7563-D38D-80B2C35077BD (p2, c1, k60, u’addons’).
2024-04-07 13:47:32: Client auto-5B93AD9A-E568-7563-D38D-80B2C35077BD disconnected.
2024-04-07 13:47:47: New connection from 172.30.33.4:49083 on port 1883.
2024-04-07 13:47:47: New client connected from 172.30.33.4:49083 as auto-855631EC-DB68-D3B3-EE74-A64AA563395A (p2, c1, k60, u’addons’).
2024-04-07 13:47:47: Client auto-855631EC-DB68-D3B3-EE74-A64AA563395A disconnected.
2024-04-07 13:48:02: New connection from 172.30.33.4:34861 on port 1883.
2024-04-07 13:48:02: New client connected from 172.30.33.4:34861 as auto-A2DAF37B-C8DB-373B-6FC0-B1A1D343385A (p2, c1, k60, u’addons’).
2024-04-07 13:48:02: Client auto-A2DAF37B-C8DB-373B-6FC0-B1A1D343385A disconnected.
2024-04-07 13:48:17: New connection from 172.30.33.4:44403 on port 1883.
2024-04-07 13:48:17: New client connected from 172.30.33.4:44403 as auto-9976B419-4A1E-DC61-3731-5A21367CE77B (p2, c1, k60, u’addons’).
2024-04-07 13:48:17: Client auto-9976B419-4A1E-DC61-3731-5A21367CE77B disconnected.
2024-04-07 13:48:32: New connection from 172.30.33.4:48493 on port 1883.
2024-04-07 13:48:32: New client connected from 172.30.33.4:48493 as auto-F80B02E3-87C2-5173-EA6B-24FCBA8CEA8A (p2, c1, k60, u’addons’).
2024-04-07 13:48:32: Client auto-F80B02E3-87C2-5173-EA6B-24FCBA8CEA8A disconnected.
2024-04-07 13:48:48: New connection from 172.30.33.4:56717 on port 1883.
2024-04-07 13:48:48: New client connected from 172.30.33.4:56717 as auto-992C654E-BCFA-B0FA-F025-3C74CF4C329C (p2, c1, k60, u’addons’).
2024-04-07 13:48:48: Client auto-992C654E-BCFA-B0FA-F025-3C74CF4C329C disconnected.
2024-04-07 13:49:04: New connection from 172.30.33.4:60367 on port 1883.
2024-04-07 13:49:04: New client connected from 172.30.33.4:60367 as auto-285E9D3E-BD9D-3F7C-F749-0BA1CAC7F34E (p2, c1, k60, u’addons’).
2024-04-07 13:49:04: Client auto-285E9D3E-BD9D-3F7C-F749-0BA1CAC7F34E disconnected.
2024-04-07 13:49:19: New connection from 172.30.33.4:38165 on port 1883.
2024-04-07 13:49:19: New client connected from 172.30.33.4:38165 as auto-729782E4-4927-D86E-CA40-4A1E1F9DF541 (p2, c1, k60, u’addons’).
2024-04-07 13:49:19: Client auto-729782E4-4927-D86E-CA40-4A1E1F9DF541 disconnected.
2024-04-07 13:49:21: New connection from 172.30.32.2:49446 on port 1883.
2024-04-07 13:49:21: Client closed its connection.
2024-04-07 13:49:34: New connection from 172.30.33.4:36229 on port 1883.
2024-04-07 13:49:34: New client connected from 172.30.33.4:36229 as auto-D12643F6-348B-2459-4F4D-2C03A1F89E57 (p2, c1, k60, u’addons’).
2024-04-07 13:49:34: Client auto-D12643F6-348B-2459-4F4D-2C03A1F89E57 disconnected.
2024-04-07 13:49:49: New connection from 172.30.33.4:42647 on port 1883.
2024-04-07 13:49:49: New client connected from 172.30.33.4:42647 as auto-2CF4BC29-87FC-D856-7A34-F4F0D1BE9BEE (p2, c1, k60, u’addons’).
2024-04-07 13:49:49: Client auto-2CF4BC29-87FC-D856-7A34-F4F0D1BE9BEE disconnected.
Try settings → People → users and add a user with name mqtt_user and password mqtt, and then restart HA