Flashing Philips E14 Smart LED Bulbs with esphome

One day I needed to add an automated light near the stairs. Motion sensor was already in place, I only needed some bulbs I could turn on and off remotely and I was not feeling like doing any DIY that time. So I picked a few ZigBee bulbs with Е14 socket. What could possibly go wrong here?

The Chinese guy sent me WiFi bulbs instead of ZigBee. Xiaomi Philips. Those are hooked to Xiaomi cloud via Mi Home. For the most adventurous, token can be extracted from the Xiaomi Cloud to drive the bulbs directly from Home Assistant. That was precisely what I’ve done. However those bulbs didn’t work very stable. They were slow to turn on and off, lost WiFi connectivity occasionally and froze every few weeks.

Things weren’t much better with Xiaomi Cloud connected, save for the huge data roundtrip to China and back every time you need to turn on a freaking lamp. The problems weren’t too critical for me to fix the issue and they worked for over a year. However a few days ago when those didn’t turn on at night I understood my patience is finally over and it’s time to fix the issue for good.

(more…)

Optimizing ESP8266/ESPHOME for battery power (and making an ice bath thermometer as well)

It’s been a long while I wanted to check for how long can an esp8266 with esphome last on a battery supply. Yet I didn’t have a reason to get it done. Time to fix that and add yet another battery optimization manual for ESP8266 to the internets.

And what’s the big reason? The story is simple. I decided to try ‘cold water immersion’ practice and make it a habbit.Yep, not the cold showers, but true hardcore ‘CWI’. I started back in summer when it was hot as hell and went all the way through to November. The weather gradually lowered the water temperature for me from ‘ah, cool and nice’ to ‘Awh shit this is cold!11’. Ideally that would become a habit.

However in November I had to pause that for a few weeks. And that meant the only thing: I had to start over again. And since the weather isn’t helping me any more, I’d have to take care and gradually decrease the temperature myself.

The first idea was to just order a dumb water thermometer. But why order when you have all the parts in stock and can just build one? And with cool features!

Hard as a rock, dumb as a brick (c)
(more…)

Trying alternatives for Aqara temperature sensors

Here’s another one of my notes about DIY smart home solutions. This time I decided to find a better replacement for Aqara temperature/humidity sensors using a devboard with a esp8266+stm8 (esp-14s module) and a homebrew esphome-based firmware. With aqara’s stock sensors I didn’t like their crappy precision and no way to change the sensor polling time. So, why not get almost all of those wishes fulfilled with a ready-made esp8266 module? Besides, nearly no price difference. Well, that’s what this post is about.

Here’s it. A potential Xiaommi Aqara killer (nope)
(more…)

ESP8266: Say ‘hello’ to Frankenstein

Since I’ve got some homebrew development boards ready, it’s time to get hacking.
I stocked on coffee and gave esp8266 SDK a deep dive this weekend. The code is really weird, lots of things are unknown, API is shitty, blobs all around the place. First of all, to make things clear – I’m not going to fix or do anything with AT-command firmware. It sucks. Period. Sucks so much it can’t even prove useful as a reference most of the times. So… we need a replacement.

This is what I’m working on and that is now, after a weekend of hacking is in early alpha stage.

Say hello to Frankenstein Firmware for ESP8266.

(more…)

Just an esp8266 dev board

ESP8266 took a hell of a time to arrive, so meanwhile I got a dev board ready. Nothing really too fancy inside – just a PL2303HX, a few LEDs, buttons and connectors… But I couldn’t resist making some nice artwork on the silkscreen:

IMG_2477

IMG_2476

The board is made using my usual tech involving a color laserjet printer, toner transfer machine, and and some urethane coating for durability. Now, it’s high time to port antares to support esp8266 CPU!