
ZiGate coordinators (including the PiZigate) are no longer supported by the plugin. This page is kept for existing PiZigate users only and is not maintained. We advise you to move to a Texas Instruments, Silicon Labs or deCONZ coordinator: see Compatible coordinators. For a supported installation, follow Plugin installation.
Make sure you have all the latest software and python3-dev is installed:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-dev
The PiZigate GPIO commands below (and Tools/pi-zigate.sh) use the gpio command of wiringpi, which is no longer packaged in recent Raspberry Pi OS releases. Test if wiringpi is installed:
gpio -v
gpio readall
If not, install it :
sudo apt-get install wiringpi
if it doesn’t work you can download the wiringpi package from here
Set the gpio pins for production mode in rc.local so that this will happen on every reboot:
sudo nano /etc/rc.local
gpio mode 0 out
gpio mode 2 out
gpio write 2 1
gpio write 0 0
gpio write 0 1
Put these 5 lines just before the exit 0 line, save and exit
If you have a RPi3B+, shutdown Bluetooth permanently by editing config.txt:
sudo nano /boot/config.txt
Put this on the end of the file:
dtoverlay = pi3-disable-bt
Save and exit.
Open the cmdline.txt:
sudo nano /boot/cmdline.txt
Delete the text console = serial0,115200 Save and exit
Type the following commands (if pi is the username you are log in):
sudo systemctl disable hciuart
sudo usermod -aG gpio pi
sudo shutdown
Power off the RPi, plug the Pizigate card in the gpio slot and power up.
Set the accessibility of the serial adapter to ‘No’ using raspi-config option P6 (Interfacing options / serial):
sudo raspi-config
Install a Domoticz version supported by the plugin: see Requirements.
Install the plugin as described in Manual installation on Linux.
Startup the Pizigate:
Tools/pi-zigate.sh run
Go to the hardware tab of Domoticz and Add the new hardware: Name: Zigbee (or something similar) Type: Zigbee for domoticz plugin Click Add
Next, click on the new hardware in the list to edit settings: Coordinator Model: ZiGate (or ZiGate+ for a PiZigate+) Coordinator connection type: PI Serial Port: /dev/serial0 Click Update
See Plugin settings for the other parameters. If everything went okay, the blue LED will flash brightly and you can pair Zigbee devices from the plugin WebUI.
If you ever have to enter flash mode to update the Pizigate firmware, first type:
gpio mode 0 out
gpio mode 2 out
gpio write 2 0
gpio write 0 0
gpio write 0 1
After flashing the firmware, a sudo reboot will reload defaults from rc.local
Fedora was my development platform, and I was a bit frustrated when the PiZigate came and was only running on Raspbian. Finally after few trials and changes, I have been able to get a Fedora 29 , Domoticz , PiZigate stack fully operational
Platform: RPI3 B+
Enable UART
/boot/efi/config.txt
enable_uart=1dtoverlay = pi3-disable-btsystemctl stop serial-getty@ttyS1.servicesystemctl disable serial-getty@ttyS1.servicelsof /dev/ttyS1 or ps -ef | grep ttyS1Check /dev/ttyS1 access rights
ls -l /dev/ttyS1
sudo usermod -aG tty domoticzsudo chmod 666 /dev/ttyS1Enable GPIO
Here is an exemple of what you should have
label Fedora (5.4.17-200.fc31.armv7hl) 31 (Thirty One)
kernel /vmlinuz-5.4.17-200.fc31.armv7hl
append ro root=UUID=2161061e-8612-4e18-a4e1-0e95aca6d2ff LANG=en_US.UTF-8 selinux=0 audit=0 rd.driver.blacklist=nouveau iomem=relaxed
fdtdir /dtb-5.4.17-200.fc31.armv7hl/
initrd /initramfs-5.4.17-200.fc31.armv7hl.img
You can use the pi-zigate-fedora.py tool provided under Tools/Fedora to switch the PiZigate to RUN or FLASH mode. For now you must be root when executing this module
sudo python3 Tools/Fedora/pi-zigate-fedora.py runSanity check
A tool is provided under Tools/Fedora to test the communication with the PiZigate. The tools is based on the PiZiGate_test tool provided with Zigate and is limited to the pure communication test.
gcc -o PiZiGate_test-fedora PiZiGate_test-fedora.c./PiZiGate_test-fedora /dev/ttyS1[domoticz@rasp Fedora]$ ./PiZiGate_test-fedora /dev/ttyS1
Opening : /dev/ttyS1 ...
+ /dev/ttyS1 opened --> OK
+ Packet 01 02 10 10 02 10 02 10 10 03 sent --> OK
+ Packet received --> OK
size : 37
01 80 00 00 05 95 00 00 00 10 00 03
01 80 10 00 05 8f 00 03 03 1a 00 03
If you reach this step, you can start domoticz and configure the plugin on the PiZigate