Zigbee and Domoticz

After the installation and configuration for Domoticz with RFLINK and P1 Smartmeter and Bresser Weatherstation hr real home automation started with adding Zigbee devices to the system.

On my wish list were of course light switches and environment sensors like temperature, humidity, presence/movement detection, light (lux).
Now there are many high quality and affordable Zigbee devices on the market, so far so good. A reliable system which gains popularity fast.

Domoticz support for Zigbee devices is not native, it requires plugins and more. The MQTT system has to be used, with an MQTT broker and the Zigbee2MQTT software.
MQTT (Mosquitto is the preferred product on a Raspberry Pi) is the backbone for many home automation solutions, not limited to Zigbee, I may need it for Tasmota integration also.

Zigbee integration has to be done with Zigbee2MQTT, software combined with hardware to access the Zigbee mesh network as Coordinator. Also widely used in home automation, mostly with a Zigbee USB stick as hardware, making it manufacturer independent, no need for limited bridges etc by Zigbee manufacturers as Philips Hue etc.
The list of supported Zigbee devices is limited in Zigbee2Mqtt, but most popular ones are there.

Getting the Zigbee devices into Domoticz uses a plugin called Zigbee2MQTT – Domoticz Python Plugin
The list of supported Zigbee devices is even more limited in Zigbee2Mqtt, a severe limitation!
CHECK THIS LIST FIRST BEFORE BUYING Zigbee hardware. Support of the plugin is one mans evening hobby and therefore slow and limited!
I made the ‘error’ of buying the (quite unique) AduroSmart ERIA smartplug dimmer, supported in Zigbee2Mqtt, but not in Zigbee2MQTT – Domoticz Python Plugin. I made a github issue for support the ‘new device’, but it may take long or never to get support.

Step 1: MQTT Mosquitto

Install following this guideline.
Do also the tests. Note that this installs Mosquitto without much security! Fine for local usage.

Step 2: zzh! CC2652R Multiprotocol RF Stick

I choose the modern zzh! CC2652R Multiprotocol RF Stick, a tiny “USB stick” form-factor development board for multiprotocol RF tinkering! Designed and sold on Tindie by Electrolama in United Kingdom. Easy to add firmware, no special programmer hardware, excellent range.

First step is to add the hardware to a Zigbee network from the Pi. The excellent zzh! CC2652R Multiprotocol RF Stick does the job nicely.

Install the firmware folllowing the Flash Guide and the Coordinator Firmware

First on the Raspberry Pi perform the next command:

ls /dev

and note the ttyUSBx devices. The P1 Smartmeter was ttyUSB0.
Now insert the USB Zigbee stick in the Raspberry Pi (power off and insert the stick, then power on) and do this again:

ls /dev

and note the newly ttyUSBx device, ttyUSB0 ea=nd ttyUSB1, the USB Zigbee stick or the P1 SMartmeter.
If more than one ttyUSBx is attached the Raspberry Pi will randomly give it a sequence number at boot, so ttyUSB0 can become ttyUSB1 and prevent your home system from working.
Therefore find out the id of the port.

ls-l /dev/serial/by-id

and copy the part belonging to the USB stick, for me: usb-1a86_USB_Serial-if00-port0 for the next step.

Step 3: Zigbee2MQTT

Zigbee2MQTT is the toolset required.
With the correct serial port in use identified, edit your Zigbee2mqtt configuration.yaml with that information (scroll down in the editor, the instructions are a bit unclear here!

  port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

You see the USB Zigbee stick working if you followed the instruction guide to the letter.

Step 4: Zigbee2MQTT – Domoticz Python Plugin

Python plugin for Domoticz to add integration with zigbee2mqtt project. This the part where Domoticz gets the Zigbee devices.

Install following the instructions on the github page and reboot Domoticz (better restart from Domoticz, so you know it works after a reboot!).
In Domoticz you now get an extra tab, called Custom, with Zigbee2MQTT as page and a new Hardware type Zigbee2MQTT. Check the settings, if no security and local MQTT then leave most fields.

(May 11 2021) I had to restore to an older version, before the commits to humidity/temperature/pressure which also broke the WSDCGQ11LM sensors.

git reset --hard b708fc4

Step 5: Add Zigbee devices, pairing

Now power on Zigbee hardware, in a process called pairing. Get the Zigbee device in factory mode, as it is after first ever power on, or pressing buttons. See the docuumentation, every device does it differently.
Allow new hardware on the Settings page “Accept new Hardware Devices Allow for 5 Minutes”
Zigbee devices are entered into Zigbee2MQTT automatically if you check “Allow new zigbee devices to join” on the Domoticz Zigbee2MQTT page, keep that page open!

Refesh and Zigbee hardware will appear in the list. Click in this list on a newly added Zigbee hardware and see the devices you can add to Domoticz devices. This process is really different from native Hardware and Device Domoticz support and not automatic, so look and choose carefully.

From now on it is standard Domoticz, Zigbee devices are available.

(May 11 2021) I had to restore the plugin to an older version before the commits to humidity/temperature/pressure which broke the WSDCGQ11LM sensors.

cd domoticz/plugins/zigbee2mqtt
git reset --hard b708fc4

and restart the system.

Zigbee devices

Philips Hue white A60 bulb E27
Philips Hue Go
Aquara Temperature/Humidity/Pressure sensor
WSDCGQ11LM. Very small, affordable, reasonably correct sensor values.
Replace batteries immediately, one was already empty, the other bad. CR2032 type.
Aqara human body movement and illuminance sensor
RTCGQ11LM. Lux and movement. Small, affordable, reasonably correct sensor values. Temperature (very inaccurate), Lux and movement.

BASICZBR3 Zigbee smart switch
No problems, works fine. Easy to pair, safe to attach wires. Router. Sold for Euro 12,50 at Tinytronics Eindhoven.

Sonoff SNZB-03 – Motion Sensor

CR2450 battery. Small PIR sensor. End device. Performs well.

Domoticz, Arduino, Raspberry, Weatherstation, Smartmeter

My new Home Automation System, to see power usage, weather conditions, doorbells and later on switches!

Domoticz, Smartmeter, RFlink and Bresser weatherstation

A combination of Raspberry Pi and Arduino: my Domoticz system.

Domoticz is a Home Automation system design to control various devices and receive input from various sensors. Open source and free!

I wanted a local home automation system to see:

  • P1 Smartmeter power information
  • The Solar Goodwe Inverter controlling the  12 Solar panels on the roof
  • Weather information of the sensors around the house and nearby
  • RF 433 MHz devices like the KlikAanKlikUit doorbell, weather sensor, switches
  • Notification if doorbell pushed on phonoe and PC with camera snaphot
  • Weather information of the Bresser 5 in 1 Weatherstation
  • control Zigbee devices (Philips Hue)
  • control Tasmota (Sonoff and diy) devices via Wifi
  • Not being dependent of cloud computing on switching on lamps, local database
  • Whatever I may design or build later on

So I did some research and found with Domoticz I could do all this. This page tells how it currently looks like/
Not realized yet is the Zigbee part, and I have not started on converting my Sonoff’s to Tasmota. The other wishes are operational!
The dashboard of Domoticz system is out of the box not very appealing, that will be next.

A Home Automation system will be 24/7 running and, with all the sensors attached, quite busy updating the database. So low power, enough computing power, enough and dfast reliable storage and reliability are key.

  • A Raspberry 4 with 2 GB is the central CPU. A SSD of 120 GByte with RPi boot supported AMS 51xx IC USB 3 adapter as storage. No SD card!
  • A RFLink as sold by Nodo to receive and send via 433 MHz, Arduino Mega2560 via USB serial and an Aurel 433 MHz module
  • A P1 Smartmeter cable, serial USB FTDI basedfor my ESRM5 Smartmeter
  • Ethernet and Wifi via onboard Raspberry Pi
  • In the ‘meterkast’, meter cupboard, close to the Smartmeter and the Internet route/switch
  • A CCC2652RB Zigbee USB stick, which are Out of Stock at the moment
    • Domoticz

      Domoticz is easy to setup on a Raspberry Pi. Install Raspberry Pi Lite with Raspberry Pi Imager (press CTRL-Shift-X to set the SSH and password!).
      Do the usual Raspberry Pi Operating system configurration, with Ethernet connected, with raspi-config with Putty for local time setting (important!) , Wifi settings, hostname, boot order.
      Write down the used IP addresses for Ethernet and Wifi!
      Just follow the installation guide on the Domoticz wiki for setting up Domoticz, again via SSH and copy the commands from the Wiki into the SSH session.

      Place the Raspberry in the meter cupboard and startup, and see Domticz in your browser. Check Ethernet and Wifi access.
      Look at settings like Login without password for Local Networks (no username/password), automatic backups etc.

      Dutch DSMR smart meter with P1 port
      I bought the USB P1 Smartmeter cable for my Smartmeter ESMR5 type from Smartmeterdashboard.
      Every Smartmeter seems a bit different (open collector, inversed data), and this cable works for my ESRM5
      The USB part is a FTDI based USB serial adapter, the P1 side a RJ11 connector for the Smartmeter.

      P1 Smartmeter is supported out of the box in Domoticz and give many devices with the power information. Electicity and Gas usage.

      Goodwe Solar Power Inverter readout
      My solar panels are connected to a Goodwe inverter. The inverter sends the data collected to the SEMS Portal, which has an API.
      So A Goodwe SEMS Portal hardware device is available in Domoticz. Easy to add, and gives all information on the Solar inverter.

      I have two cheap Chinese camera’s, good quality, ONVIF support, not much documentation, so what is the snapshot image url required for Domoticz??

      After some searching I found the answer on the Domoticz forum, use the ONVIFER application

      • Install ONVIF IP Camera Monitor (Play Store, Android for me)
      • Find the camera and make it work with the user and admin of the camera
      • Scroll down and see the snapshot image url
      • Fill this in Add Camera

      For my camera’s it was: http://192.168.x.y/web/auto.jpg?-usr=&-pwd=&

      RFlink for 433 MHz devices
      I had to make a choice for a device to receive and transmit RF 433 MHz signal. Two hardware solutionas are available, RFXCOM and RFLink.
      The choice became easier when I found out the RFXCOM is perhaps the better solution, but quite expensive and sold out.

      So it was RFlink, an Arduino ATmega2560 with a RFlInk shield for the low level 433 MHz transceiver. I bought a DIY kit from Nodo shop and soldered it together, easy job! The package consists of a gateway RFlink PCB (comes with 433 MHz Transceiver Aurel and an I2C connector), an Arduino Mega Compatible, 433Mhz antenna and USB cable. Load (alas closed) RFLInk firmware witht eh Arduino IDe and connect.

      So far the RFLink has detected two outdoor temperature/humidity sensors and my KlikAanKlikuit doorbell as devices.

      The doorbell has now notifications!


      I have implemented notifications for pushing the doorbell with:

      • Email
      • PushSafer (with image, use the camera URL as shown above)
      • PushBullet

      Buienrader, the ducth weather site has an API for weather information, available in Domoticz.
      Easy to add, just make sure you have right Station ID (list here in the forum)

      Bresser 5-in-1 weatherstation, Weather Underground

      A weatherstation with outdoor and indoor sensors for temperature, humidity, wind direction, wind strength, pressure.

      A simple and affordable system, with the ability to upload to Weather Undergroud and Weathercloud. The last has a nice brwoser view of the weather data of your own weatherstation.

      Weather Underground has an API and an API key if you have a Personal Weather Station. Add the Hardware and you get several devices with the weatherstation information.


Testing USB Serial TTL adapters

A program, SerialTester,  a guide and test results.

Also updated Prolific PL2303HXA driver misery solution.



Experiments and boards

A Raspberry Pi  or Arduino is a perfect companion for experiments, but you need some hardware support during development and deployment.

Here I show you the breadboard development tools I have first, followed by deployment boards.

Breadboard experimenters boards

Traditional extenders into a breadboard. From Adafruit and China, 26 pin (yes, that old) and 40 pin with a flatcable to the Pi. I do not like these very much. Breadboard Pi Bridge – Pi Ports to Breadboard in Numerical Order. Nice setup, can be used with a Pi B or a Pi Zero. Easy to locate the pins with the descriptions on the PCB.
No Dupont wires required (except for +5V). .Blocks the power rows alas.

RasPiO Pro Hat Protect/Position Raspberry Pi Ports. Ideal if you fear damaging your Pi, has current limiting resistors on the GPIO pins.
Disadvantages are that these resistors may interfere e.g. I2C or SPI and the very small breadboard. Seldom used.

A simple and cheap Chinese breadboard solution. Requires Dupont wires and a printed pin layout required. Works fine, affordable Prototype comes close to deployment layout. Recommended.

The Wombat, a great experimenters board. Much I/O on board (serial to USB, ADC MCP3008, 2 button,s 4 output LEDs, power regulator for +3.3V. All jumpered.Well documented single in line I/O connector.
Large breadboard! The best board in my collection! From Gooligum Australia.

Sunfounder China, experiments Raspberry Pi and Arduino Uno or Mega. Solid, large breadboard, recommended.

Arduino Uno experimenters boards, acryl, from China.

Deployment boards

These boards are where the permanent circuit will be soldered on. Essential are the GPIO connector and enough solder islands.

Richard Saville aka AverageMan made a great collection of boards, I have many in use.

A Chinese (40 pin) and Adafruits board (26 pin, yes that old). The Chinese ones are affordable and great for deployment. Recommended!

Mini Mega deployment board. From China.

Arduino on Raspberry

Install Arduino on Buster

  1. Arduino 1.8.12 (or higher) from – Software – Arduino ARM 32 bits
  2. Download to e.g. Downloads
  3. cd /Downloads
  4. tar -x -f arduino-1.8.5-linuxarm.tar.xz
  5. cd arduino-1.8.12
  6. sudo ./
  7. and Arduino appears in Home – Programming desktop

TV out: serial to PAL/NTSC



The VAP11G-300 is a unique device with a fixed ethernet to wireless bridge that helps in situations where:

  • You want a fixed ethernet connection, but none is available at the location.
  • Wireless is available, but the device either has no wireless capabilities.
  • A wireless capability can be added but to configure it, a working network connection is required.
  • USB ports are scarse.
  • Wireless USB adapters are too powerhungry.
  • You want two wireless devices to communicate without a wireless router available.

Read More


Pretzelboard aka NanoESP aka C-Control Duino

Combine an Arduino Nano with the ATMega 328, a ESP-01 ESP8266 on one board,, couple the two processors via a (software) serial connection, add a 3.3 V power regulator, make it breadboard friendly, write some tutorials aimed at starters, and you have an idea what the NanoESP is about.

Franzis Verlag and Fabian Kainka are the driving forces behind this nice little board. Sold by Conrad as C-Control IoT WIFI Board (ESP8266), Elektor and Reichelt in Germany for Euro 29,95 (as Pretzel board  – IOT WIFI Board). I got one for Euro 24,99 at the Dutch webshop of Conrad! (Easy to get outside Germany too, with (sparse) German documentation.

Read More


Prolific PL2303HX driver misery

Due to fakes, older (not fake!) IC’s made by Prolific are not supported by the current Prolific driver in Windows. Device manager shows PL2303HXA PHASED OUT SINCE 2012. PLEASE CONTACT YOUR SUPPLIER.

IMG_4662Like many I have imported from China, USB to Serial devices with IC’s made by Prolific. Mine are PL2303HX based. And they do not work anymore! Yellow mark in Device Manager, device cannot start. Reason: Prolific made an update to their Windows drivers to fight the fake IC’s coming from China, like FTDI did (see my FTDI unbricking article) and made older devices unusable.
Windows update, which is by default automatic getting the latest drivers, make it impossible to install older drivers, just gets overwritten very fast.
But you can battle this and get the Prolific driver working again. I did this for two PL2303HXA based USB interfaces. Tested with my PL2303HX USB devices and PuTTY serial and a jumper connecting TXD-RXD as loopback to see typed characters coming back in.

Install older driver

Windows 64 bit
1. Download and Save the PL2303 Installer Program here


2. Unplug all USB-To-Serial adapters and Double click on the installer “PL2303_64bit_Installer.exe”

3. When it prompts you, plug in the PL2303 USB-To-Serial adapter and click “Continue”.

Windows 32 bit
1. Download and Save the PL2303 Installer Program here:


2. Run the installer program. If it offers a choice to remove the driver, then select to remove the current bad driver. Then run the installer again to install the correct driver.

Alternative driver installation:
Easy to solve with an older version of the drive, like in this archive. Unpack in a folder, Update driver, Look on this PC, Have disk, Browse to the folder.

Prevent automatic Windows driver updates.

Windows may ‘update’ the driver again, just rollback the update in Device Manager. For a permanent fix use Group a Policy.

Well described here! Note that this is written for Windows 7, but works fine for Windows 8.1 too.

Windows 10 is more problematic,

Follow one of these guides:

Prevent driver updates via registry (Windows Home)
How to enable gpedit.msc (Group Policy) on Windows Home
Bat file described in above PDF, just download, unzip and execute to get Group Policy on Windows Home 10
How to Prevent Windows from Automatically Updating Specific Drivers