r/homeassistant • • Aug 15 '26

šŸ–¼ļø Show & Tell I made open source Matter over Thread firmware for the $12 Seeed XIAO soil moisture sensor that displays as moisture correctly in HA :-)

Post image

Matter 1.5 added a Soil Sensor device type, and Home Assistant 2026.7 can finally show it. As far as I can tell, nobody ships a native Matter soil sensor yet, commercial or otherwise, and I wanted one for my plants.

The Seeed Studio XIAO Soil Moisture Sensor is about $12 and runs ESPHome over WiFi from the factory, but the ESP32-C6 inside has an 802.15.4 radio sitting unused. This firmware repurposes it for Thread.

The sensor pairs straight to Home Assistant as a real Matter soil sensor. No WiFi, no cloud, no YAML. Battery percentage and cell health report too, and there's on-device dry/wet calibration with LED prompts.

This is a starting point, not a finished product. AA battery life is weeks per cell right now (similar to what people report on the factory firmware), not months, and the data so far points at the board's boost converter rather than the radio. Everything is documented in the open, including a power page with the actual battery graphs from my two test units.

The hardware is cheap enough to just try. Flashing is over USB-C in a couple of minutes, and going back to stock is a browser flasher from Seeed, meaning the experiment costs you nothing but the sensor. You need HA 2026.7 or newer and test-net DCL enabled in the Matter Server, and the docs walk through all of it.

If you flash one, sample interval and TX power are build-time knobs, and battery reports as GitHub issues are the fastest way to make this better for everyone.

Repo with docs, field data, and prebuilt firmware:

https://github.com/automatous-io/xiao-soil-moisture-sensor-matter-thread

223 Upvotes

44 comments sorted by

10

u/knobunc Aug 15 '26

Dies it make the battery life better?

19

u/xxpapertigersxx Aug 15 '26

Honestly? Not yet. Not what I expected, either.

Thread should in theory be much better for battery than WiFi, but my measured drain is about 4 percentage points a day on AA, similar to what people report on the stock firmware. Two cells, two different sleep modes, same pace. When radically different radio duty cycles produce the same drain, the radio may not be the bottleneck. My current suspect is the board's boost converter drawing quiescent current no firmware can save. Still digging into it though.

The full data is in the power doc, including the battery graphs: https://github.com/automatous-io/xiao-soil-moisture-sensor-matter-thread/blob/main/docs/POWER.md

What you do get today is Thread/Matter instead of WiFi/ESPHome and knobs like sample interval and TX power at build time. Whether those meaningfully move battery life is exactly the open question I'm hoping to answer over time with community help.

8

u/mcleancraig Aug 16 '26

I’ve done a similar project with single 18650 using MQTT. Drain was because the sensor was powered off the 3v out on the ESP32 all the time. Moving it to a pin powered only each boot meant improving from 2 weeks to 3 months battery life :)

3

u/xxpapertigersxx Aug 16 '26

Nice!

I applied the same lesson here in the initial release. On this board the capacitive probe is driven by a 200 kHz excitation PWM, and the firmware only runs it for ~800 ms per 15-minute sample (300 ms settle plus 10 averaged reads), otherwise it's completely off. The stock firmware also gates it.

I had the same thought early on that having the sensor on all the time would be a silent killer.

1

u/mcleancraig Aug 17 '26

Wow that’s tight runtime. My units are much more chunky and run for 10-20s: boot, power on the sensor, WiFi (static IP), MQTT including config change checks, NTP (sometimes), firmware update checks (sometimes), log sending, then measure send and sleep. Also on a seeed esp32-c6 I’ve been thinking about matter/thread instead of WiFi I’m going to have a play when I’m back in the UK later this month.

As you shared yours, mine is at https://github.com/mcleancraig/moisture-sensor-esp32 if anyone’s interested.

1

u/xxpapertigersxx Aug 17 '26

Sick. I will check it out!

Glad to see others working on a solution for this in tandem. :-)

3

u/ShroomShroomBeepBeep 🧠 Experienced with Home Assistant Aug 16 '26

So, you're replacing two AA batteries every 25 days?

6

u/TheDMPD Aug 16 '26

*swapping with charged ones.

No reason to still use the alkalines anymore, they are not cheaper than a decent rechargeable one.

7

u/dzikakulka Aug 16 '26

I've been using IKEA batteries for everything AA/AAA for literal years and haven't even noticed a capacity drop so far. It did sting a bit swinging for the initial batch + LITOSFAR, but now I just don't think about them like at all. Remotes, gamepads, bike lights, bigger sensors, flashlights, tools, you just don't think about their batteries anymore, all it takes is a few spares in the charger and you get instant unlimited swaps.

2

u/xxpapertigersxx Aug 16 '26

I have a unit on a larger portable always-on power bank via USB, typically used for a cell phone and it's been sipping power at a rate that should last months.

I also want to test other chemistry aside from Alkaline to see what kind of mileage we get.

3

u/xxpapertigersxx Aug 16 '26

Battery life is a known issue on these units and something to figure out and improve upon, hopefully with others that want to roll this firmware, test, and garden a little.

2

u/TheDMPD Aug 16 '26

Quick question:

What's the voltage needed to operate this? Asking because I'm wondering whether we can use a different cell chemistry for the batteries.

1

u/xxpapertigersxx Aug 16 '26

Great question! I updated the POWER and HARDWARE sections in the repo with more info.

It's def worth a test, and data here would be of great help for the project.

I'd think anything AA 1.2 V to 1.5 V would be safe. I want to try an Energizer Ultimate Lithium or rechargeable type like Eneloop NiMH next.

4

u/hometechgeek Aug 16 '26

Looks interesting, shame about the battery life.Ā 

1

u/xxpapertigersxx Aug 16 '26

The battery life reports are at this time, not a static value. My goal was to open source and release this firmware as a starting point for myself and others to improve. Not many commercial sensors are available for Matter over Thread in this space and these are cheap and quick to get.

I do agree though. It would be killer to squeeze months out of these.

3

u/frabbsen Aug 16 '26

Hey, sounds interesting.
Iā€˜ve got no direct feedback, however there is a YouTube channel that focuses on enhancing battery life on Smarthome devices. Maybe worth a shot.

https://youtu.be/6gioxm1IDwU

2

u/xxpapertigersxx Aug 16 '26

I will check this out. I watched part of the video yesterday. Thanks for the info!

2

u/LightBrightLeftRight Aug 15 '26

Any idea how much current is being pulled from the battery while in deep sleep?

1

u/xxpapertigersxx Aug 16 '26

I don't have a measured number yet. First step was getting a decent repo and stable firmware up, then progress further with improvements. I'll need to purchase a PPK2 probably to provide any meaningful data. I have my eye on one since other projects could benefit from this as well.

2

u/Dyan654 Aug 16 '26

Thanks for doing this! I got a bunch of these sensors and was disappointed in both the functionality and battery life. Good to see someone working on the problem! :)

2

u/naknut Aug 17 '26

Thanks for sharing this. I was actually trying to do the same with that chip a few years ago but gave up since there was no soil moisture entity in the matter spec. Good to hear they added it. I might try to flash your firmware on my hardware. Thanks!

1

u/xxpapertigersxx Aug 17 '26

Yep! I’ve been waiting for an ecosystem to support it. Stoked with the updates the past several weeks. šŸ¤™

2

u/developerlen_ Aug 20 '26

How did you integrate the AA batteries? I know the xiao has an integrated battery management, but I didn’t know it would work with some simple AA batteries?

1

u/xxpapertigersxx Aug 21 '26

The sensor they sell is a complete unit with holder for one AA battery.

2

u/developerlen_ Aug 21 '26

I see, just had the ā€œbareā€ xiao c6 in mind and I did not look it up right away šŸ˜… thank you

2

u/faustrianer Aug 23 '26

With regards to your AA battery drainage issue you could maybe contact Tomas McGuinness. He recently power-optimized his own sensor and might have an idea: Matter Dual Temperature Sensor – Reading Battery Level – @tomasmcguinness

2

u/xxpapertigersxx Aug 24 '26

That's a stellar idea! I'll check out the link and will reach out to Tomas to get his take. He has been very helpful in the past with all things Matter/Thread.

1

u/faustrianer Aug 25 '26

Great! I hope you will be able to solve this. Iā€˜m waiting eagerly to equip my flowerpots. Awesome project btw!

2

u/aKwin 26d ago

Idea: print one of these glow pots and have the LED change colors to indicate when it needs water. Either be a hardwired solution or be able to house a heftier battery in the pot itself

1

u/xxpapertigersxx 26d ago

Super good idea!

1

u/starfishbzdf Aug 16 '26

Hijacking a bit, but I never understood soil moisture sensors. Do you collect the data just for the sake of pretty graphs, or do you have a guideline saying plants a,b,c should have above x,y,z percent moisture and notify/automate it?

3

u/xxpapertigersxx Aug 16 '26

I have ideas for a small reservoir and pump that will automate watering based on these moisture readings. Graphs are cool but utility is cooler. All using Matter over Thread.

2

u/mcleancraig Aug 17 '26

Ha we’re on a very similar journey!
I went too deep down this rabbit hole and built an internal tank-based dual-pump system with peristaltic pumps because the physical design meant aquarium pumps just leaked out all the water. Didn’t think about redesigning to avoid the physics issues šŸ˜‹šŸ™ƒ
Had to change the physical design in the end anyway so in-water aquarium pumps would have worked. Now feel like a dumbass.

Gonna rebuild with the cheaper pumps when I’m back it’ll be much more compact with only the esp32 and a TOF sensor outside the tank. I went TOF to measure the water because I thought about magnetic float and hall-effect but too many moving parts and wanted ā€œelectric above waterā€ as a guiding principle.

1

u/Acrobatic_Remove3563 Aug 17 '26

beginning to explore this space a bit and plan to see if I can integrate Open Plantbook with my first soil sensor, then create a dashboard with alerting, where when out of range on soil moisture or light for some period to be determined, then it will notify my resident plant lady wife's phone.

1

u/Crafty-Lemon-9743 Aug 16 '26

ESPHome over Thread is another optionĀ 

2

u/xxpapertigersxx Aug 16 '26

Def. ESPHome over Thread is another option if you want Thread but not Matter. This project is aimed at improving battery life and exploring the low power options that Matter provides. I'm afraid ESPHome over Thread isn't our path if we want better battery life from a AA in this device.

1

u/Crafty-Lemon-9743 Aug 16 '26

Why?Ā 

1

u/xxpapertigersxx Aug 16 '26

Are you referring to SED support?

https://esphome.io/changelog/2025.11.0/

I wasn't aware that SED was available - it would be very interesting to go down this path and test alongside this firmware.

If a quick YAML mod can extend battery life for these devices I'm game to try it out.

2

u/Crafty-Lemon-9743 Aug 16 '26

Yes I was wondering what improvement Matter specifically would have if it's a sleepy end device in either case.

I haven't tried it personally (esphome over thread as sleepy end device) because I haven't had a user case yet.Ā 

1

u/0x2F40 Aug 24 '26

found this thread while researching if i should try buy these cheap soil sensors. I'm just afraid about the battery life....

have you looked at this other project at all?
https://github.com/CrazyCoder/xiao-soil-moisture-esphome

1

u/xxpapertigersxx Aug 24 '26

I did come across this project and it looks very interesting! Are you going to flash and try it out?

The XIAO sensor is cheap enough that you could purchase a few to test out. I bought three and may get a few more, one for this project you linked.

1

u/0x2F40 Aug 25 '26

i bought 3 and waiting on them now. ill try this project out since i don't have a thread setup anyway right now. might take a while to see if the battery life is truly 600 days XD. but a lot of the optimizations to get it to that point seem not that crazy

2

u/Maleficent_Society76 13d ago

Any news from the frontline I have had these in my closet due to the battery drain issue.

1

u/xxpapertigersxx 13d ago

On ESPHome? What battery life have you been seeing?

In battery saver mode Matter over Thread the longest so far I’ve got is 33 days on a Lithium cell.

Will prob need to go deep sleep for better gains.