Better docs

This commit is contained in:
rbaron 2022-12-24 10:06:35 +01:00
parent fe63fda2f1
commit 3d68e5c689
3 changed files with 15 additions and 11 deletions

View file

@ -21,7 +21,7 @@ This repository also hosts a few different firmware samples for b-parasite.
|Sample|Description|Extra Documentation|
|---|---|---|
|[samples/ble](./code/nrf-connect/samples/ble)|This is the most battle-tested and useful firmware. It periodically reads all sensors and broadcast them via Bluetooth Low Energy (BLE). It works with [Home Assistant](https://www.home-assistant.io/) out of the box. |[Docs](./code/nrf-connect/samples/ble/README.md)|
|[samples/zigbee](./code/nrf-connect/samples/zigbee)| An experimental/educational basic Zigbee sample built on [nRF Connect + ZBOSS](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_zigbee.html). It integrates with [Home Assistant](https://www.home-assistant.io/) via [Zigbee2MQTT](https://www.zigbee2mqtt.io/). |[Docs](./code/nrf-connect/samples/zigbee/README.md)|
|[samples/zigbee](./code/nrf-connect/samples/zigbee)| An experimental/educational/exploratory basic Zigbee sample built on [nRF Connect + ZBOSS](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_zigbee.html). It integrates with [Home Assistant](https://www.home-assistant.io/) via [ZHA](https://www.home-assistant.io/integrations/zha) or [Zigbee2MQTT](https://www.zigbee2mqtt.io/). |[Docs](./code/nrf-connect/samples/zigbee/README.md)|
|[samples/blinky](./code/nrf-connect/samples/blinky)| The classic "Hello, world" |-|
|[samples/soil_read_loop](./code/nrf-connect/samples/soil_read_loop)| Read the soil moisture sensor on a loop. Useful for experimenting and calibrating the sensor. |-|

View file

@ -2,21 +2,21 @@ source "Kconfig.zephyr"
rsource "../../prstlib/Kconfig"
config PRST_ZB_SLEEP_DURATION_SEC
int "Sleep duration between waking up and reading sensors (in seconds)"
int "Sleep duration between waking up and reading sensors in seconds."
default 600
config PRST_ZB_PARENT_POLL_INTERVAL_SEC
int "Interval for when b-parasite polls its parent for data (in seconds)"
int "Interval for when b-parasite polls its parent for data in seconds."
default 60
config PRST_ZB_BUILD_DATE
string "Zigbee app init basic date code. Can be used as build revision. (1 byte)"
default "20221214"
string "Zigbee basic cluster build date attribute. Max 16 bytes."
default ""
config PRST_ZB_MODEL_ID
string "Zigbee app model id."
string "Zigbee basic cluster model id attribute. Max 32 bytes."
default "b-parasite"
config PRST_ZB_HARDWARE_VERSION
int "Zigbee basic cluster hardware version. (1 byte)"
int "Zigbee basic cluster hardware version attribute. 1 byte."
default 2

View file

@ -1,5 +1,5 @@
# Zigbee firmware sample
This sample is adapted from the [zigbee_template](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/zigbee/template/README.html) from the nRF Connect SDK. It's a basic experimental/educational firmware sample for b-parasite.
This sample is adapted from the [zigbee_template](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/zigbee/template/README.html) from the nRF Connect SDK. It's a basic experimental/educational/exploratory firmware sample for b-parasite.
## Clusters
These [clusters](https://en.wikipedia.org/wiki/Zigbee#Cluster_library) are defined in the sample:
@ -30,10 +30,14 @@ 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 clusters
* `CONFIG_PRST_ZB_PARENT_POLL_INTERVAL_SEC`: amount of time (in seconds) the device waits between polling its parent for data
## Zigbee2MQTT & Home Assistant
This firmware sample has only been tested with [Zigbee2MQTT](https://zigbee2mqtt.io/), an open source Zigbee bridge that [connects seamlessly with Home Assistant](https://github.com/zigbee2mqtt/hassio-zigbee2mqtt).
## Home Assistant Integration
This firmware sample has only been tested with Home Assistant, using one of the following integrations.
The [b-parasite.js](b-parasite.js) file contains a converter that can be installed to Zigbee2MQTT to suppoort this sample. See [Support new devices](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html) for instructions.
### Zigbee Home Automation (ZHA)
With the [ZHA](https://www.home-assistant.io/integrations/zha) Home Assistant integration, b-parasite should work out of the box.
### Zigbee2MQTT & Home Assistant
With [Zigbee2MQTT](https://zigbee2mqtt.io/), a custom converter is required. The [b-parasite.js](b-parasite.js) file contains such a converter. See [Support new devices](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html) for instructions.
## Battery Life
While sleeping, the device consumes around 2 uA: