| .. | ||
| media/power-profile | ||
| src | ||
| .gitignore | ||
| b-parasite.js | ||
| CMakeLists.txt | ||
| Kconfig | ||
| prj.conf | ||
| prj_debug.conf | ||
| README.md | ||
| zigbee.code-workspace | ||
Zigbee firmware sample
This sample is adapted from the zigbee_template from the nRF Connect SDK. It's a basic experimental/educational/exploratory firmware sample for b-parasite.
Clusters
These clusters are defined in the sample:
| Cluster ID | Name |
|---|---|
| 0x0001 | Power Configuration |
| 0x0400 | Illuminance Measurement |
| 0x0402 | Temperature Measurement |
| 0x0405 | Relative Humidity Measurement |
| 0x0408 | Soil Moisture Measurement |
Pairing Mode
The sample will first boot and start looking for a Zigbee coordinator - in pairing mode. The onboard LED will be flashing once a second while in this mode. Once a suitable network is found, the LED will briefly flash 3 times and remain off.
Factory Reset
Most Zigbee devices provide a physical button to "factory reset" it - causing it to forget its joined network and look for a new one.
b-parasite has no physical buttons, and the implemented work around is to distinguish between two reset modes:
Power up mode
The device enters this mode when it is powered. For example, swapping an old battery or connecting to eternal power. This is the "usual" reset mode, and joined networks will be remembered.
Reset pin mode
If the device's RESET pin is briefly grounded, the device will effectively be factory reset. The device will leave its previous network and start looking for a new one.
Configs
Available options in Kconfig. Notable options:
CONFIG_PRST_ZB_SLEEP_DURATION_SEC: amount of time (in seconds) the device sleeps between reading all sensors and updating its clustersCONFIG_PRST_ZB_PARENT_POLL_INTERVAL_SEC: amount of time (in seconds) the device waits between polling its parent for data
Home Assistant Integration
This firmware sample has only been tested with Home Assistant, using one of the following integrations.
Zigbee Home Automation (ZHA)
With the ZHA Home Assistant integration, b-parasite should work out of the box.
Zigbee2MQTT & Home Assistant
With Zigbee2MQTT, a custom converter is required. The b-parasite.js file contains such a converter. See Support new devices for instructions.
Battery Life
While sleeping, the device consumes around 2 uA:
In the active cycle, it averages around 125 uA for 1 second:
