Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ignore): Changes for improved adapter discovery #24147

Merged
merged 5 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions data/configuration.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ mqtt:
# user: my_user
# password: my_password

# Serial settings
serial:
# Location of CC2531 USB sniffer
port: /dev/ttyACM0
# Serial settings, only required when Zigbee2MQTT fails to start with:
# USB adapter discovery error (No valid USB adapter found).
# Specify valid 'adapter' and 'port' in your configuration.
# serial:
# # Location of the adapter
# # USB adapters - use format "port: /dev/serial/by-id/XXX"
# # Ethernet adapters - use format "port: tcp://192.168.1.12:6638"
# port: /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018ED3DDF-if00
# # Adapter type, allowed values: `zstack`, `ember`, `deconz`, `zigate` or `zboss`
# adapter: zstack

# Advanced settings
advanced:
Expand Down
6 changes: 5 additions & 1 deletion lib/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,14 @@ export class Controller {
startResult = await this.zigbee.start();
this.eventBus.onAdapterDisconnected(this, this.onZigbeeAdapterDisconnected);
} catch (error) {
logger.error('Failed to start zigbee');
logger.error('Failed to start zigbee-herdsman');
logger.error('Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions');
logger.error('Exiting...');
logger.error((error as Error).stack!);
/* istanbul ignore if */
if ((error as Error).message.includes('USB adapter discovery error (No valid USB adapter found)')) {
logger.error('If this happens after updating to Zigbee2MQTT 2.0.0, see https://github.com/Koenkk/zigbee2mqtt/discussions/24199');
}
return await this.exit(1);
}

Expand Down