<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>BTHome on Smart Home? Sure — But Secure!</title><link>https://smarthome-aber-sicher.de/en/tags/bthome/</link><description>Recent content in BTHome on Smart Home? Sure — But Secure!</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 24 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://smarthome-aber-sicher.de/en/tags/bthome/index.xml" rel="self" type="application/rss+xml"/><item><title>b-parasite: Have an Open-Source Soil Moisture Sensor for Home Assistant Manufactured</title><link>https://smarthome-aber-sicher.de/en/blog/2026/09/24/b-parasite-bodenfeuchtesensor/</link><pubDate>Thu, 24 Sep 2026 00:00:00 +0000</pubDate><guid>https://smarthome-aber-sicher.de/en/blog/2026/09/24/b-parasite-bodenfeuchtesensor/</guid><description>&lt;img src="https://smarthome-aber-sicher.de/blog/2026/09/24/b-parasite-bodenfeuchtesensor/cover.jpeg" alt="Featured image of post b-parasite: Have an Open-Source Soil Moisture Sensor for Home Assistant Manufactured" /&gt;&lt;p&gt;&lt;em&gt;Ad: PCBWay manufactured and assembled the boards for this project free of charge and also supported the video. Some PCBWay links are affiliate links.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For me, the &lt;strong&gt;b-parasite&lt;/strong&gt; is the best soil moisture sensor there is – and you can&amp;rsquo;t buy it anywhere. No manufacturer, no shop. There&amp;rsquo;s only a blueprint, free on &lt;a class="link" href="https://github.com/rbaron/b-parasite" target="_blank" rel="noopener"
&gt;GitHub&lt;/a&gt;. I had ten of them made, and here I&amp;rsquo;ll show you the whole journey: from the blueprint to the flower pot.&lt;/p&gt;
&lt;div class="video-wrapper"&gt;
&lt;div class="video-placeholder" data-embed="https://www.youtube-nocookie.com/embed/6d8Nm_WTD44?autoplay=1" onclick="loadYtIframe(this)"&gt;
&lt;img src="https://smarthome-aber-sicher.de/maxresdefault_11083620843110358826_hu_13b436a647740805.jpg" alt="YouTube Video" loading="lazy"&gt;
&lt;div class="play-button"&gt;&lt;/div&gt;
&lt;div class="privacy-notice"&gt;
To load the video, please click the image. Please note that by doing so, data will be transmitted to YouTube.
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;The video is in German with English subtitles.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="what-is-the-b-parasite"&gt;What is the b-parasite?
&lt;/h2&gt;&lt;p&gt;The b-parasite is an open hardware project: a PCB whose lower half works as a &lt;strong&gt;capacitive soil moisture sensor&lt;/strong&gt;. It also carries a &lt;strong&gt;temperature and humidity&lt;/strong&gt; sensor (SHTC3) and a &lt;strong&gt;phototransistor&lt;/strong&gt; for brightness.&lt;/p&gt;
&lt;p&gt;At its heart is a Nordic &lt;strong&gt;nRF52840&lt;/strong&gt; in an E73 radio module. Unlike the usual ESP controllers it has no Wi-Fi, but &lt;strong&gt;Bluetooth Low Energy&lt;/strong&gt; – which makes it extremely power-efficient. A single &lt;strong&gt;CR2032 coin cell&lt;/strong&gt; lasts for many months.&lt;/p&gt;
&lt;p&gt;The firmware transmits using the &lt;strong&gt;BTHome v2&lt;/strong&gt; standard, which Home Assistant understands without any extra integration.&lt;/p&gt;
&lt;p&gt;Getting to a finished sensor takes four steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Have the board manufactured and assembled&lt;/li&gt;
&lt;li&gt;Flash the firmware&lt;/li&gt;
&lt;li&gt;Set up a Bluetooth gateway for Home Assistant (e.g. a Shelly)&lt;/li&gt;
&lt;li&gt;Coat the board against moisture&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="step-1-ordering-the-board--no-kicad-skills-required"&gt;Step 1: Ordering the board – no KiCad skills required
&lt;/h2&gt;&lt;p&gt;I can&amp;rsquo;t use KiCad, and faced with an order form of 30 options – copper weight, solder mask, surface finish – I wouldn&amp;rsquo;t know what to pick. For this project you don&amp;rsquo;t need to: the author has published the design on PCBWay as a &lt;strong&gt;&lt;a class="link" href="https://www.pcbway.com/project/shareproject/W579466AS2D1_b_parasite_main_bc61bf0b.html" target="_blank" rel="noopener"
&gt;Shared Project&lt;/a&gt;&lt;/strong&gt;. Open the page, choose the quantity, order. No Gerber files, no manufacturing options.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My recommendation: add the assembly service (PCB+Assembly).&lt;/strong&gt; The SMD parts are only millimetres in size – not something you just solder yourself – and you don&amp;rsquo;t have to buy them separately.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Lead time:&lt;/strong&gt; Manufacturing alone takes only a few days. With assembly, it took two to three weeks including shipping in my case.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Approval photos:&lt;/strong&gt; Before final soldering, PCBWay sends photos of the assembled boards. Since polarity matters for some parts, comparing them with the reference photo is worth it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The author earns too:&lt;/strong&gt; With a Shared Project, the author gets a small share of every order. That&amp;rsquo;s why I deliberately link his project instead of creating my own.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;d rather support my channel, you can order via &lt;a class="link" href="https://pcbway.com/g/U1JrnD" target="_blank" rel="noopener"
&gt;my PCBWay link&lt;/a&gt; (&lt;em&gt;affiliate link&lt;/em&gt;).&lt;/p&gt;
&lt;h2 id="pitfall-no-voltage-at-the-battery-pad"&gt;Pitfall: no voltage at the battery pad
&lt;/h2&gt;&lt;p&gt;First coin cell in – and nothing happened. No LED, no Bluetooth. The multimeter showed a perfectly good cell, but hardly any voltage reached the board.&lt;/p&gt;
&lt;p&gt;Looking into the battery holder from the side revealed small bumps on the large battery pad – enough to keep the coin cell from sitting flat. Together with PCBWay support, who responded very quickly, the cause was clear: residue from the production process.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Carefully rough up the pad once with very fine sandpaper. After that, battery power works.&lt;/p&gt;
&lt;h2 id="step-2-flashing-the-firmware-with-an-esp32"&gt;Step 2: Flashing the firmware with an ESP32
&lt;/h2&gt;&lt;p&gt;The author provides precompiled firmware in the &lt;a class="link" href="https://github.com/rbaron/b-parasite/releases" target="_blank" rel="noopener"
&gt;releases&lt;/a&gt;. For the assembled hardware version 2.0.0 you need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;blinky_nrf52840_2.0.0.hex&lt;/code&gt; – test firmware, the LED blinks&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ble_nrf52840_2.0.0.hex&lt;/code&gt; – the actual sensor firmware (BTHome)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The nRF52840 is programmed via &lt;strong&gt;SWD&lt;/strong&gt;. Professional programmers are expensive – the cheaper route is the open-source project &lt;strong&gt;&lt;a class="link" href="https://github.com/atc1441/ESP32_nRF52_SWD" target="_blank" rel="noopener"
&gt;ESP32_nRF52_SWD&lt;/a&gt;&lt;/strong&gt;, which turns an ESP32 into an SWD flasher with a web interface. It was written by the same developer behind the &lt;a class="link" href="https://smarthome-aber-sicher.de/en/blog/2026/08/13/obi-energy-tracker-lokal/" &gt;OpenOBI firmware&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Wiring according to the project:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;b-parasite (nRF52)&lt;/th&gt;
&lt;th&gt;ESP32&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SWDCLK&lt;/td&gt;
&lt;td&gt;GPIO 21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWDIO&lt;/td&gt;
&lt;td&gt;GPIO 19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GND&lt;/td&gt;
&lt;td&gt;GND&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VCC&lt;/td&gt;
&lt;td&gt;3V3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Two rules before you start:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Only one power source:&lt;/strong&gt; either the coin cell or the 3.3 V from the ESP32 – never both at the same time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Erase first:&lt;/strong&gt; The flasher doesn&amp;rsquo;t erase memory automatically. Run &lt;em&gt;Erase&lt;/em&gt; before flashing.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I always flash in two steps: first &lt;strong&gt;Blinky&lt;/strong&gt; – if the LED blinks, wiring and contacts are fine. Then the &lt;strong&gt;BLE firmware&lt;/strong&gt;. This saves troubleshooting time.&lt;/p&gt;
&lt;p&gt;During upload a white window with an hourglass appears – that&amp;rsquo;s normal. It&amp;rsquo;s done when the inconspicuous message &lt;em&gt;completed&lt;/em&gt; shows up.&lt;/p&gt;
&lt;h3 id="tip-convert-hex-to-bin"&gt;Tip: convert HEX to BIN
&lt;/h3&gt;&lt;p&gt;The flasher accepts HEX uploads, but they take several minutes. HEX files are text-encoded and much larger than the actual data. As &lt;strong&gt;BIN&lt;/strong&gt; (offset &lt;code&gt;0&lt;/code&gt;), the same content flashes in seconds – a real difference with ten boards.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# using the Python tool intelhex&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pip install intelhex
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;hex2bin.py --pad&lt;span class="o"&gt;=&lt;/span&gt;FF ble_nrf52840_2.0.0.hex ble_nrf52840_2.0.0.bin
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# alternatively with objcopy from the ARM toolchain&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;arm-none-eabi-objcopy -I ihex -O binary --gap-fill 0xFF &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ble_nrf52840_2.0.0.hex ble_nrf52840_2.0.0.bin
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Did it work?&lt;/strong&gt; Unlike Blinky, the BLE firmware doesn&amp;rsquo;t blink continuously – it&amp;rsquo;s meant to save power. After a reset the LED blinks &lt;strong&gt;twice&lt;/strong&gt;, and the values then appear in Home Assistant.&lt;/p&gt;
&lt;h2 id="step-3-adding-it-to-home-assistant"&gt;Step 3: Adding it to Home Assistant
&lt;/h2&gt;&lt;p&gt;Home Assistant needs a &lt;strong&gt;Bluetooth gateway&lt;/strong&gt; that receives BTHome packets. I use a &lt;strong&gt;Shelly Gen2 or newer&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Home Assistant, open the Shelly device and click the &lt;strong&gt;gear icon&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set the Bluetooth scanner mode to at least &lt;strong&gt;passive&lt;/strong&gt; (active works too) and confirm.&lt;/li&gt;
&lt;li&gt;Wait for the sensor&amp;rsquo;s next measurement cycle – or briefly press the &lt;strong&gt;button&lt;/strong&gt; on the board.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The b-parasite then shows up under discovered devices. Once added, it provides these entities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Soil moisture&lt;/li&gt;
&lt;li&gt;Temperature&lt;/li&gt;
&lt;li&gt;Humidity&lt;/li&gt;
&lt;li&gt;Illuminance&lt;/li&gt;
&lt;li&gt;Voltage and battery level&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All ten of my boards worked right away.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Device called &amp;ldquo;E73…&amp;rdquo; instead of &amp;ldquo;b-parasite&amp;rdquo;?&lt;/strong&gt; Some of my sensors first appeared under the radio module&amp;rsquo;s name. That&amp;rsquo;s purely cosmetic – all values arrive. You can rename the devices yourself; in my case Home Assistant eventually named them correctly anyway.&lt;/p&gt;
&lt;h2 id="step-4-coating-against-moisture"&gt;Step 4: Coating against moisture
&lt;/h2&gt;&lt;p&gt;The &lt;a class="link" href="https://github.com/rbaron/b-parasite/wiki" target="_blank" rel="noopener"
&gt;project wiki&lt;/a&gt; explicitly warns against putting the board into soil uncoated: moisture can creep under the solder mask and cause corrosion.&lt;/p&gt;
&lt;p&gt;So I spray the &lt;strong&gt;lower half&lt;/strong&gt; with a plastic-based protective coating: top side, 20 minutes to dry, flip, bottom side, another 20 minutes. A simple cardboard mask keeps the upper half with the electronics and battery holder free.&lt;/p&gt;
&lt;p&gt;If you prefer something more enclosed, the repository also has &lt;strong&gt;3D-printable cases&lt;/strong&gt;. I think the bare boards look cooler – a matter of taste.&lt;/p&gt;
&lt;h2 id="hands-on-test-how-good-are-the-readings"&gt;Hands-on test: how good are the readings?
&lt;/h2&gt;&lt;h3 id="moisture-percentage-is-not-an-absolute-value"&gt;Moisture percentage is not an absolute value
&lt;/h3&gt;&lt;p&gt;The percentage is &lt;strong&gt;not universally calibrated&lt;/strong&gt;. The only certainties: dry in the air the sensor reads 0 %, in a glass of water 100 %. Everything in between depends on soil type, compaction, how the sensor sits and how moisture is distributed.&lt;/p&gt;
&lt;p&gt;Over several weeks, though, you can nicely see the soil slowly drying out – and every watering as a steep rise. Just moving the sensor to a different spot in the pot changed my reading by about &lt;strong&gt;10 percentage points&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For automations this means:&lt;/strong&gt; don&amp;rsquo;t rely on a fixed threshold like &amp;ldquo;water below 20 %&amp;rdquo; – set the threshold individually per plant and sensor.&lt;/p&gt;
&lt;h3 id="battery-life-extrapolation-doesnt-work"&gt;Battery life: extrapolation doesn&amp;rsquo;t work
&lt;/h3&gt;&lt;p&gt;The author mentions up to two years of runtime in the repository. Some of my sensors have been running since April and have lost about &lt;strong&gt;18 mV&lt;/strong&gt; of their initial voltage.&lt;/p&gt;
&lt;p&gt;A linear extrapolation gave almost &lt;strong&gt;23 years&lt;/strong&gt; for one sensor and &lt;strong&gt;0.8 years&lt;/strong&gt; for another. Both are nonsense: a CR2032&amp;rsquo;s voltage doesn&amp;rsquo;t drop linearly. It stays almost flat for a long time and then falls off steeply at the end. Depending on where on that curve you measure, the extrapolation gives wildly different results.&lt;/p&gt;
&lt;p&gt;A better approach is a &lt;strong&gt;Home Assistant trigger on a minimum voltage&lt;/strong&gt; that reminds you to change the battery in time.&lt;/p&gt;
&lt;h3 id="radio-gaps"&gt;Radio gaps
&lt;/h3&gt;&lt;p&gt;The sensor transmits every &lt;strong&gt;10 minutes&lt;/strong&gt;. In my setup roughly every tenth packet didn&amp;rsquo;t arrive, and the biggest gap in the log was about an hour. For a plant sensor that&amp;rsquo;s no problem – soil doesn&amp;rsquo;t dry out in an hour.&lt;/p&gt;
&lt;h2 id="verdict-is-it-worth-the-effort"&gt;Verdict: is it worth the effort?
&lt;/h2&gt;&lt;p&gt;If you only want to know whether your plant is thirsty: probably not. A ready-made sensor is less hassle – for example the &lt;a class="link" href="https://smarthome-aber-sicher.de/en/blog/2026/01/11/never-water-wrong-again-zigbee-soil-moisture-sensor-in-real-world-testing/" &gt;Zigbee soil moisture sensor from my hands-on test&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But if you want a sensor that&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;lasts a very long time on a coin cell,&lt;/li&gt;
&lt;li&gt;runs open firmware nobody can shut down,&lt;/li&gt;
&lt;li&gt;works fully locally – no cloud, app or account,&lt;/li&gt;
&lt;li&gt;and simply shows up in Home Assistant,&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;then for me the b-parasite is the best soil moisture sensor you can get. You just have to have it built.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The effort in concrete terms:&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Effort&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ordering and waiting&lt;/td&gt;
&lt;td&gt;2–3 weeks, hardly any work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flashing&lt;/td&gt;
&lt;td&gt;about 1–2 hours for ten devices&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coating&lt;/td&gt;
&lt;td&gt;about 30 minutes for the whole batch&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="giveaway-3-b-parasite-sensors"&gt;Giveaway: 3 b-parasite sensors
&lt;/h2&gt;&lt;p&gt;I&amp;rsquo;m giving away three sensors from this batch. To enter: like &lt;a class="link" href="https://youtu.be/6d8Nm_WTD44" target="_blank" rel="noopener"
&gt;the video on YouTube&lt;/a&gt;, subscribe to the channel and reply under the pinned comment explaining why you&amp;rsquo;d like to win one.&lt;/p&gt;
&lt;h2 id="links"&gt;Links
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/rbaron/b-parasite" target="_blank" rel="noopener"
&gt;b-parasite on GitHub&lt;/a&gt; (repository, wiki, releases, cases)&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.pcbway.com/project/shareproject/W579466AS2D1_b_parasite_main_bc61bf0b.html" target="_blank" rel="noopener"
&gt;b-parasite Shared Project on PCBWay&lt;/a&gt; – commission goes to the author&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/atc1441/ESP32_nRF52_SWD" target="_blank" rel="noopener"
&gt;ESP32_nRF52_SWD – SWD flasher for nRF52&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.home-assistant.io/integrations/bthome/" target="_blank" rel="noopener"
&gt;BTHome integration in Home Assistant&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Ad: PCBWay manufactured and assembled the ten boards and supported the video. I earn a commission via &lt;a class="link" href="https://pcbway.com/g/U1JrnD" target="_blank" rel="noopener"
&gt;my PCBWay link&lt;/a&gt; at no extra cost to you. PCBWay had no influence on the content of this article.&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: Links marked with &lt;em&gt;affiliate link&lt;/em&gt; are affiliate links. As a partner of various retailers and manufacturers (e.g. Amazon, OBI via the Awin network, Shelly) I earn from qualifying purchases. This means I receive a small commission if you purchase through these links — at no extra cost to you. The revenue helps me run this blog and YouTube channel and keep creating content. Thank you for your support!&lt;/p&gt;&lt;span class="cite"&gt;&lt;span&gt;― &lt;/span&gt;&lt;span&gt;Joachim&lt;/span&gt;&lt;cite&gt;&lt;/cite&gt;&lt;/span&gt;&lt;/blockquote&gt;</description></item></channel></rss>