/zigbee-plant-sensor

Primary LanguageC++GNU General Public License v3.0GPL-3.0

banner

Zigbee Plant Sensor for Zigbee2MQTT

An open source Zigbee plant sensor project developed with the nRF Connect SDK (Zephyr RTOS). It is designed for the b-parasite hardware, however due to the flexibility of Zephyr it should be easy to port it to other hardware containing a capacitive soil moisture sensor.

Features

  • Works with Zigbee2MQTT
  • Soil moisture measurements
  • Illuminance measurements
  • Temperature and humidity measurements
  • Battery voltage measurements and alarms
  • Developed with the nRF Connect SDK (Zephyr RTOS)

Hardware

Plant Photos

B-Parasite

The software is designed for the open source hardware b-parasite. Rbaron did a great job designing a soil moisture sensor, however his software is only made for BLE. Fortunately, the hardware contains a nRF52840 chip which is also compatible with Zigbee. The only problem is that it does not have a button which might be useful for factory reset. There are however less ideal workarounds that do not require a button.

Complete hardware kit

I am developing my own hardware that is smal and suited for Zigbee (With a reset button). I am willing to sell completely assembled hardware if there is enough interest. If you're interested you can subscribe for a newsletter via the website. You will be one of the first to hear when the hardware becomes available!

https://homeplantsensor.com

Guides

Coating

Straight from the factory PCBs are not coated on de sides. This might affect the reading in the future as water seeps inside. Therefore it is a good idea to make it water resistant with some coating. I have used Kontakt 70, but I am still researching other alternatives. Let me know if you have better coating ideas.

The only problem with coating is that you probably need to recalibrate the sensor.

Battery life

By default, data is reported every two minutes. In the worst case scenario, all attributes are updated and transmitted. The picture below shows the power consumption of two minuuts in this worse case scenario.

power measurements

The measurements shows that the average power consumption is $14.53\text{uA}$. If we consider a CR2032 battery with a capacity of $210\text{mAh}$ we get $210/0.01453 = 14453$ hours or $602$ days! Even if the measurements are a bit off, we still have more than a year of battery life.

3D printed case

Check the link below for an easy to 3D print case. It is designed for threaded inserts with a outer radius of 4 mm and 3 mm bolts. It is not yet optimized for the temperature and light sensor as it still blocks most of the light.

https://www.printables.com/model/305842-zigbee-plant-sensor-for-b-parasite

Known issues

  • Battery voltage and alarms are not reported correctly. You can read them using the dev console in Zigbee2MQTT, but somehow the automatic reporting does not work with the Zigbee power config cluster.
  • The hardware does not have a button therefore it cannot be factory reset. The overcome this, the joining process is done when the battery is insert. If the sensor has not joined a network yet or it cannot find a known network, it scans for other networks. In this way it is still possible to join a new network even if it is not factory reset.
  • Not tested with ZHA from Home assistant yet.