b-parasite is an open source Bluetooth Low Energy (BLE) soil moisture and ambient temperature/humidity sensor.
b-parasite works by periodically measuring the soil moisture, air temperature/humidity and broadcasting those values via Bluetooth Low Energy (BLE) advertisement packets. After doing so, the board goes into a sleep mode until it's time for another measurement. The sleep interval is configurable - I often use 10 minutes between readings, which is a good compromise between fresh data and saving battery.
At this point, b-parasite's job is done. We have many possibilities of how to capture its BLE advertisement packet and what to do with the data. What works okay for me is having a BLE-MQTT bridge that listens for these BLE broadcasts, decodes them and ships the sensor values through MQTT messages. The MQTT broker is then responsible for relaying the sensor data to interested parties. This is the topology shown in the diagram above.
A popular choice for a BLE-MQTT bridge is the ESPHome project, which runs on our beloved ESP32 boards. b-parasite is now officially supported and documentation for using it can be found in the b-parasite ESPHome docs. An example of using this platform is also available in this repo, under bridge/ (check out README.md there for more info).
ESPHome is a battle-tested project with a vibrant community, and is currently the most mature b-parasite bridge. ESP32 are also cheap, so you can sprinkle a few of them around the house to cover a wide range, and even share the same ESP32 with other sensors.
Another possibility is running parasite-scanner. It is a purpose-built bridge for b-parasites, and runs on Linux and macOS.
This is the quickest way to collect and visualize data from b-parasites, and I personally use it a lot for testing and debugging.
Sensor data is transmitted via BLE advertisement broadcasts. Here you can find a byte-by-byte description of the data as it is encoded inside the advertisement packet.
tl;dr: By taking readings 10 minutes apart, the battery should last for over a year.
The main parameters involved in estimating the battery life are:
In the following screenshot, I measured the voltage of a 10 Ohm series resistor during the on-cycle, for a 8dBm transmitting power (the voltage is negative, so it is upside down):
The short high peaks correspond to when the radio is active, sending broadcasting packets. The average current consumption during this active time is roughly 9mA. Let's round it to 10mA. During off time, I measure a current of less than 3uA.
With these parameters in hand, I put together this spreadsheet in which you can estimate the battery life. For example, for an active time of one second and sleep time of ten minutes, we see a runtime of 488.10 days.
A 3D printable case model can be found in case/.