ZHA Configuration With Digi XBee Series 2C (S2C) Modules

Hi,

I would like to configure ZHA with Digi XBee Series 2C (S2C) modules on my Raspbian OS.

However, it cannot works with following configuration in configuration.yaml:

zha:
radio_type: xbee
usb_path: /dev/ttyUSB0
database_path: /usr/share/hassio/homeassistant/zigbee.db

I have enabled the UART configuration as well in config.txt as well.

enable_uart=1
dtoverlay=pi3-miniuart-bt

But, still can’t configure it successfully.

Could anyone advise on this issue?

Do I missed out anythings else?

Thanks.

how are you connecting it to the pi via a usb adaptor? i had to set the correct baud rate as well

I think the easiest is just to set the S2C to factory defaults, configure API mode, set the baud rate, I use 57600, and the set it up in HA via integrations, it will auto configure from there.

@grom.m20b25,

I connect XBee to my Raspberry Pi via Raspi Wireless Shield V1.0, as per photo below:

@PrairieSnpr,

Thanks for the info.

How do you check whether your usb_path is correct or not?

And how do you direct wiring connect between XBee and Raspberry Pi for setting S2C to factory defaults?

Use xctu to configure the s2c, for confirming the usb path, I’m not familiar with that shield, but if it uses the pi serial, you are likely to have problems. The Bluetooth is connected to the same port and has to be disabled. The port would likely be ttyAMA0. I attempted to disable Bluetooth on my pi and use the onboard serial with little success and would recommend one of the USB adapters.

1 Like

If you use Home Assistant and have access to a console or SSH, you can check out which device is being used

# discover serial device
ls -la /dev/serial* 
# or 
ls -la /sys/class/tty/ | grep serial
or 
ls -la /sys/class/tty/*/device/driver

If you get permissions errors in the logs, it may be because Raspbian defaults to making a console available via GPIOs. You can disable this to allow your device integration full access to the port:

sudo cp /boot/cmdline.txt /boot/cmdline.txt.original
# remove option   console=serial0,115200
sudo editor /boot/cmdline.txt

Have you checked the logs for any errors? (on the side-bar, under Developer, Info page (About), scroll down towards the bottom)

Did you managed to get this shield working?