Skip to content

Commit

Permalink
fix(ignore): Changes for improved adapter discovery (#24147)
Browse files Browse the repository at this point in the history
* fix: Comment serial config in example configuration

* Link to issue

* Update link

* Update example config

* Feedback
  • Loading branch information
Koenkk authored Oct 11, 2024
1 parent 5f60187 commit 5a58b70
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
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

0 comments on commit 5a58b70

Please sign in to comment.