New TeHyBug Firmware β€” Reliable Light Sleep, Faster Wakes & First-Gen Revival

The firmware for the TeHyBug 18650 Universal, Mini TeHyBug and GumBoard has a new release β€” focused on rock-solid sleep, noticeably quicker wake-ups, and a big one for owners of the original first-generation TeHyBug.


😴 Light Sleep now sleeps the whole interval

Light Sleep could occasionally wake far too early β€” a 60-second interval collapsing to a few seconds, with the device reporting (and burning battery) many times more often than configured. The sleep engine has been rebuilt: it now measures how long it actually slept, re-arms itself if it was woken early, and retries when the WiFi chip isn’t ready yet. Your configured interval is now the interval you get.

⚑ Quicker, leaner wake-ups

  • No more dead seconds. Fixed pauses after sending β€” measured at up to 40% of each wake spent doing nothing β€” are gone. The device sleeps the moment its work is done.
  • Light-sleep wake-ups rejoin your WiFi directly instead of searching for it, cutting several hundred milliseconds of radio time per wake.
  • No waiting for the MODE button on scheduled wakes. A device waking from deep sleep skips the button window entirely β€” see below for how to get into config mode instead.
  • The network address is kept fresh automatically, so a long-deployed device can no longer lose its DHCP lease mid-deployment.

πŸ”˜ Getting into config mode on a sleeping device

Since scheduled wakes no longer wait for the button: press RESET, then press MODE within a second. If the window doesn’t appear (some boards can’t tell a reset from a timer wake while asleep), press RESET twice about a second apart, then MODE β€” the second press is always recognised. Devices that are awake (live mode) behave as before.

πŸ§“ First-generation TeHyBug: I2C sensors work now

If you have an original esp-01-based TeHyBug, this update matters more than any before it: the firmware had the two I2C wires swapped in software, so an I2C sensor plugged into a first-generation board was never detected β€” the scan simply reported an empty bus. That’s fixed, and the AHT20 temperature/humidity sensor is now fully supported on these boards too.

If your old TeHyBug has been sitting in a drawer because “the sensor stopped working” β€” it very likely never was the sensor. Flash this firmware and plug it back in.

  • Either port, either way round. The two TeHyBug ports are wired as mirror images, and the old firmware quietly handled both. The new firmware now does too: it probes both orientations and finds your sensor whichever port it’s in.
  • DHT sensors get their warm-up time after power-up before the first read β€” the same timing the original firmware used.
  • ⚠️ Intervals are now in seconds, not minutes. If you re-enter settings from an old Lua-firmware device, remember your old “10” meant 10 minutes β€” enter 600 now, or the device will report 60Γ— more often than you intend.

⚠️ One change on these first-generation boards: tehybug.local no longer works there β€” the memory it cost now pays for years of future updates on the small 1 MB chip. Reach the device by its IP address instead, which the device’s own config page shows you prominently.

πŸ—„οΈ Data log

  • The 64 KB memory chip on current RTC modules is now fully used β€” day files grow from about 1 KB to about 2 KB. If your module has the larger chip, its log is re-arranged once on first boot and previously logged data is erased: download anything you want to keep first. Modules with the 32 KB chip keep their data.
  • The Data Log page now shows which memory chip was detected and how much each day file holds.
  • Placeholders for sensors the device doesn’t have (like a literal %qfe% with no pressure sensor) are no longer written into every log entry.
  • Factory reset now really erases the data log along with the settings.

🧩 The config portal writes your templates for you

On the Data Serving page, each template field β€” the MQTT payload, the HTTP POST body and the GET query string β€” now has a “Fill from my sensors” link, in a metric or imperial flavour. The portal builds the template from the sensors your device is actually reporting right now: an AHT20-only bug suggests temperature and humidity, a BME680 bug gets pressure and air quality too, and a second sensor shows up with its own t2=/h2= parameters instead of silently overwriting the first. No more memorising placeholder names.

This lives in the web portal, so it works with your existing firmware β€” no update needed for this one.

βœ… Fixes

  • Home Assistant discovery can no longer send a truncated (broken) configuration β€” a sensor either appears correctly or the device tells you why it couldn’t.
  • Upgrading from the original Lua firmware? The stale duplicate entities it left behind in Home Assistant (stuck forever on their last value) are now cleaned up automatically.
  • DHT sensors are model-checked instead of assumed: a DHT11 on the “DHTXX” switch now actually reads.
  • The device’s own page at 192.168.4.1 now leads with the address to reach it on your home network, instead of a blank “Loading…” while connected to its access point.
  • Release firmware is fully silent on the serial pins, and debug builds on first-generation boards no longer lose their log to the indicator LED.

How to update

⚠️ Only update when you need to. If your TeHyBug is working fine, there’s no need to chase every release β€” update when a new feature or fix actually matters to you. That said, if you use Light Sleep, run on battery, or own a first-generation board, this one is worth it.

Update over the air from the device’s web interface β€” open http://tehybug.local/update (or http://<device-ip>/update), sign in, and upload the latest firmware. Keep the device powered during the update; it reboots itself when done.

Prefer to flash over USB? Use the BugZapper flasher, the Arduino IDE, or esptool β€” see the documentation for details.

Compatible with the TeHyBug 18650 Universal (v1 / v2), Mini TeHyBug and GumBoard, and generic ESP8266/ESP8285 boards. Offline logging needs the RTC + EEPROM module.


Questions? Tap the AI assistant on tehybug.com or check the FAQ. Turning ideas into smart devices.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.