ESP8266 – Ikea Molgan light Hack – added retries to prevent battery drain.

I was on holiday over the weekend and the unit works like a charm, I was notified of all activities detected by the PIR set above my main door. With wifi_station_set_auto_connect(TRUE) the constant tries to connect to a missing AP or wrong password will run the batteries flat in no time. Default retries is now set…


HTTPS and REST protocol.

Programming the ESP8266 to use REST protocol directly is a more practical solution in most case as not everyone have a MQTT broker to work with. The problem is most notification service now uses SSL for security reason, and the ESP8266 stack can’t seem to work with HTTPS servers. Did some test with google.com,  on port…


ESP8266 – Ikea Molgan light Hack – Software and actual usage.

After hacking the hardware, the next part is programming the firmware. The basic flow control is simple. boot log on wifi get time from NTP server (pool.ntp.org) format text with timestamp log on to MQTT broker publish formated text to MQTT broker go into deep sleep. Full source available on GitHub. After I have a…


ESP8266 – Ikea Molgan light Hack – Hardware.

The first ESP8266 project I worked on is a wifi PIR detector. My original plan was to use an cheap Ebay PIR and 3D printed case for this project but I happen to have a spare Ikea Molgan PIR light lying around, I opened it up and take a peek inside and decided to work…


ESP8266 – Native SDK.

nodemcu is a wonderful piece of code but it don’t work well on my ESP-01, it will go into a boot loop with just a few lines of code. Initially I though it was my mistake but it does that even with published examples. Moving on, I took a bit of time to set up…


ESP8266 – $3.08 Wifi MCU

Measuring 25mm x 15mm, this tiny board pack quite a punch in terms of features. Made by espressif, this device have become very popular with engineers and hobbyist all over the world. There are many varieties of the ESP8266, I bought the cheapest of the lot for only $3.08 each from ebay with free shipping. Received the…