Jumping on the Matter Train

(and Almost Derailing It)

Posted by TheBrightKnight on April 02, 2025 · 7 mins read
Ok That’s (Still) Not Really a Wrap

So apparently my ants-in-the-head had other plans. They kept digging:

“Why aren’t you like the cool kids using Matter and Thread?”
“Why are you still living in 2010?”
“Why do you need a Hub when you already have Apple HomeKit, Google Home, or Home Assistant hubs?”

And to that I answer, as my father used to say: “So you’ll have what to ask.”

But OK OK, I got it — time to move forward and jump on the Matter train.


Honestly, most of the heavy lifting in the code was already done.
All we needed was to make sure we can pair the device as a Matter device… How hard can it be?! (famous last words)

Turns out, getting ESP-IDF + ESP-Matter up and running, AND actually making it compile, is not exactly a weekend project.

Also, because I’m still civilized, I wanted to use nice libraries like Adafruit for sensors,
and not communicate directly with I2C like some caveman.


4 Days Later (Yes, Really)

After about 4 days (no sleep, marriage status: pending review) — It compiles!

Now, since I was already in ignore-everything-else-and-code mode,
I figured why stop there? Let’s add some cool features:

  • Keep the EnvironmenTor Hub communication alive.
  • Add Matter support — HomeKit, Google Home, whatever floats your smart home boat.
  • Generate dynamic onboarding codes (you know, that fancy QR code). This will let us use as many devices as we want.
  • Allow soft reset and hard reset using the device’s button.
  • Report battery status to Matter.
  • Keep deep sleep working with Matter to save battery.

Not-easy-peasy oh not-so-breezy I’ve made it!
It’s Alive! (With a Few Asterisks)
  • Since it needs to communicate with our Hub, we’re stuck with Matter over WiFi (no Thread yet, sorry).
  • Deep sleep + Matter over WiFi is tricky because ESP-Matter doesn’t support ICD (Intermittently Connected Device) with this mode.
    • This means every time the device wakes up, it has to load the full Matter stack and reconnect, Which takes about 6 seconds and burns some battery.
    • Estimated battery life: around 2 months at 10-minute intervals. (Not amazing, but not tragic.)

For those of you thinking, “Oh no, this probably has some Chinese spyware that’s going to plant 5G chips in our brains and force us to binge-watch all six seasons of Sex and the City…”, I also made a second firmware:

  • A Matter-Only version (no communication with our Hub),
  • Which should lower power usage a bit,
  • And will eventually make it easier to port to Matter over Thread.

I gotta say, it’s working MaGniFicEnTLy!


How to Use the New Matter Firmware
  1. Go to my GitHub repo.
  2. In the Firmware folder, pick the right .bin file:
If you want… Flash this file
EnvironmenTor (no Matter) EnvironmenTor-Client.bin
EnvironmenTor + Matter EnvironmenTor-Client-WithMatter.bin
Matter Only EnvironmenTor-Client-MatterOnlyDevice.bin

Flashing Instructions
  1. Plug the device into your computer.
  2. Open Espressif Web Flasher in your browser.
  3. Click Connect, select your device, and Connect again.
  4. If you see chip details in the black window — good!
  5. Click Choose File and pick the .bin you want.
  6. Important: Set Flash Address to 0.
  7. Click Program and wait for it to finish.

When flashing is done:

  • Hit Disconnect.
  • Under Console, click Start, reconnect, then hit Reset.

Now comes the important part:
You’re looking for two lines that look similar to:

E (3399) app_main: SetupQRCode: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT:OS011ZJB000MLN44S10
E (3400) QR: Manual Pairing Code: 35158350250

Save them somewhere! (You can also print a label and slap it on the device.)


Pairing the Device
  • Make sure your phone/tablet is on a 2.4GHz WiFi (not 5GHz) and Bluetooth is ON.
  • If you’re using the EnvironmenTor system too, make sure the Hub is online.
  • Recommended: Connect the device to USB while pairing (to keep it awake). If battery-powered, tap the Reset button once to wake it up for 1 minute before trying to pair.
  • Open your app (HomeKit, Google Home, etc.) and pair it using the QR code or manual pairing code.
  • If you’re using EnvironmenTor too — the device will automatically reconnect to the Hub as well.

Reset Button Cheat Sheet
Action What Happens
One click (battery mode) Wake up for 1 minute.
One click (USB mode) or wake up mode Send pairing request to EnvironmenTor Hub.
Long press ~7–10 sec (slow orange blink) Soft Reset: unpair from Matter + clear Hub config.
Long press ~15–20 sec (fast orange blink) Hard Reset: everything above + regenerate new pairing codes.

That’s a Real Wrap (Finally) Ahhhh… feng shui.

See you on my next project!

Want everything assembeled, pre-installed and delivered to you?

Send me an email or use the contact form

Want to buy me beer 🍻? Use this link

~ TheBrightKnight