Friday, July 03, 2020

Pimoticz : Vendor neutral Zigbee gateway with Raspi

Tldr: Instructions for preparing Raspi as zigbee gateway in 3 simple steps(git-clone/cd-to-dir/run-setup.sh;reboot)

These days its easy to find Zigbee based home automation devices at very low cost but all those Zigbee devices are targeted to be used with manufacturer provided gateway. This means, users are limited to a few set of zigbee devices supported by the manufacturer's gateway.

Using Commercial-Off-The-Shelf(COTS) hardware, there is a possibility to create your own "vendor neutral automation gateway" which opens up an interesting possibility of supporting more than 800 zigbee devices, but this involves an advanced knowledge of setting up Raspberry-Pi with various hw/sw components.

As an advanced user or DIY enthusiast, here is a list of components one would use to build a Zigbee gateway,

  1. Raspberry-Pi
  2. CC2531-USB-zigbee-Adapter(with koenkk firmware, can be purchased on amazon for ~$12)
  3. Raspberry-Pi OS(32bit)
  4. nodejs (ver 12 or higher)
  5. zigbee2mqtt
  6. mosquitto mqtt broker
  7. Domoticz
  8. zigbee2mqtt-plugin for Domoticz.

As an average user or a beginner to home-automation, its a challenging task to setup all these components to work together on a Raspberry-Pi.

Here is my attempt to simplify this setup using an automated installer script that takes care of installing all the dependencies and needed configuration. In about 5 minutes you should be ready to pair your first Zigbee device with Domoticz.

Items needed.

  1. Raspberry-Pi
  2. Micro sd-card
  3. 5v-power-adapter
  4. CC2531 based USB to zigbee adapter(important!!! to avoid programming setupbuy pre-programmed USb adapter with koenkk-firmware:CC2531_DEFAULT_20190608.zip or higher version)


Raspi-OS Installation steps:
NOTE: CC2531-usb-adapter/keyboard/mouse/monitor/internet-connection are needed during the initial setup only):

  1. Prepare the sd-card using Raspberry-Pi-Imager and install Raspberry-Pi-OS-32BIT(I assume this step is pretty straight forward, there are tons of guides explaining this).
  2. Insert the Raspberry-Pi-OS sd-card, connect key-board/mouse/monitor and internet to your Raspi and and turn on the 5Vdc power.
  3. On first boot, raspi-os will guide you through a setup wizard where you will be asked to setup few details like..
    • Language and key-board-lay-out(important to have a correct local time on your raspi for domoticz to work correctly).
    • Set new password for your "pi" Linux user.
    • check box asking if a black border is visible on the monitor(not important as your raspi will be running in headless mode after comoticz installation).
    • Wifi setup(ignore if you have already connected raspi using LAN wire).
    • Update sw(skip incase if you dont want to wait for all the upgrades to happen).
    • Reboot raspi to allow all the settings to take effect.

Pimoticz Installation steps:

  1. on raspberry PI, open a shell-terminal(using remote ssh login, or directly on Raspi)
  2. git clone https://github.com/hackboxguy/pimoticz.git
  3. cd /home/pi/pimoticz
  4. sudo ./setup.sh -h my-pimoticz (-h hostname is optional).
  5. wait for setup to finish (takes about ~5-6minutes)
  6. sudo reboot



After reboot, start the chrome browser on you raspi(or remote pc) and open http://127.0.0.1:8080 or http://my-pimoticz:8080 (here you will see domoticz webUI showing detected zigbee Coordinator-CC2531-USB-Zigbee-Adapter).


16 comments:

KP said...

wow thanks for Awesome Blog ....i can try now, whatever automation i have all over wifi

Achim said...
This comment has been removed by the author.
Achim said...

Can you please correct the Instsallation steps:
httsp:// to https://
and
sudo ./setup -h my-pimoticz to sudo ./setup.sh -h my-pimoticz

ADAV said...

Thanks Achim, I fixed those typos.

Unknown said...

Nice works !

(How) Can I change port 8080 to ..(whatever)80 ?

Thanks for this

ed

ol said...

Good day! I just want to give you a huge thumbs up for the great information you have got right here on this blog. Assignment Writing Services

jasmyn said...

Path of Exile players can prepare enough POE Currency to deal with the upcoming new league.

Attached link: https://www.poecurrency.com/

donnaj edwards said...

I got here much interesting stuff. The post is great! Thanks for sharing it! Zigbee

Lazaro Coley said...
This comment has been removed by a blog administrator.
lovelanguagetest said...

Pimoticz : Vendor neutral Zigbee gateway with Raspi. Tldr: Instructions for preparing Raspi as zigbee gateway in 3 love language test simple ...Tldr: Instructions for preparing Raspi as zigbee gateway in 3 simple steps(git-clone/cd-to-dir/run-setup.sh;reboot)RaspBee is a universal ZigBee gateway, which enables many Zigbee products to be combined. RaspBee can function without the Cloud or the internet. You keep all ..Xiaomi Mijia Multi-Mode Gateway ZigBee WiFi Bluetooth Mesh Smart Linkage Devices. Zigbee: Reading Xiaomi Sensors with a Raspberry Pi. 08 Delivered

Jasminelin said...
This comment has been removed by the author.
Diablo 4 Items said...

Thanks for sharing such a good post. I want to be an advanced DIY enthusiast.

Anonymous said...

In the vast landscape of art, your work stands out like a beacon of brilliance. Thank you for creating this incredibly useful and accurate Device checker.

Anonymous said...

Thank you for sharing your expertise and passion with the world – your impact is truly remarkable! Experience the thrill of rooftop combat in Rooftop Snipers – it's a game you won't want to miss!

Anonymous said...

Tu blog me ha permitido perseguir mis pasiones y aprovechar mi verdadero potencial. ¡Estoy agradecido por la confianza que me ha brindado! ¿Por qué conformarse con menos cuando puedes tener lo mejor? ¡Elija Contador De Clicks Online para obtener una precisión de conteo inigualable!

Anonymous said...

Your writing consistently offers practical advice. Thank you for your dedication to providing valuable guidance through your insightful blog posts. Find engaging insights in this article. Test your skills with SubZero Geometry Dash exciting levels and enjoy a dynamic soundtrack that adds an extra layer of fun.