Using the two charts above, you will need to make the following connections;
PIN PURPOSE
CC2591
RPI PIN
VCC (Supply)
VCC
3V3
GND (Ground)
GND
G
RXD (Receive Data)
P0_2
RPI Pin 8 (TXD)
TXD (Transmit Data)
P0_3
RPI Pin 10 (RXD)
This is the minimum set of pins required. Note that RXD on the CC2591 gets connected to TXD on the RPI. This is normal.
Do not connect the CC2530 to the 5V lines on the RPI. Doing so will likely destroy the CC2530.
Configure UART on the RPI
What we’ll be doing is using the UART on the RPI. There are a number of ways to do this, but we’ll use the method which disables Bluetooth and puts the UART on the high-performance device /dev/ttyAMA0.
Edit your /boot/config.txt and add the following;
dtoverlay=pi3-disable-bt
Then edit /boot/cmdline.txt and remove the following bit from the only line;
console=serial0,115200
Reboot your Pi, and you should now have the UART pins listed above manifest on /dev/ttyAMA0. Don’t try and use minicom or similar to connect to it, you won’t see much useful.
Set up a HomeAssistant Docker-Compose File
We’re going to use Docker Compose to run zigbee2mqtt in a container. Make a directory somewhere for it, and a data directory, like so;
mkdir -p /srv/zigbee2mqtt/data
Then edit /srv/zigbee2mqtt/docker-compose.yml, and fill it in like this;
Now, this will spin up a zigbee2mqtt service when you start it, which will always restart when stopped, using /dev/ttyAMA0 as we defined earlier. Lastly, create a /srv/zigbee2mqtt/data/configuration.yaml and fill it in like this;
I strongly suggest you change the network key, and disable permit_join when you have all your devices up. There’s various other things to do here too, but this should get you started.
Once that’s done, a simple;
docker-compose up
Should bring up your container. Press Ctrl-\ to break out without terminating it.