2018-06-01 10:49:09 +02:00
2018-04-20 00:48:17 +02:00
2018-04-11 20:30:20 +02:00
2018-04-26 22:40:52 +02:00
2018-04-20 22:36:30 +02:00
2018-04-20 21:26:45 +02:00
2018-04-20 21:23:42 +02:00
2018-04-11 19:45:25 +02:00
2018-04-20 21:26:45 +02:00
2018-04-11 19:48:13 +02:00
2018-04-11 20:28:05 +02:00
2018-04-11 20:11:44 +02:00

WifiLamp

I have a lamp in my room where I intercepted the powerline using a relais and ESP2866 to control it from my phone/amazon dash button.

The micro controller connects to my home WiFi and starts a webserver to control it. APIs exist to simplify control from other software components like android app.

Screenshot

Parts

  1. Wemos D1 Mini
  2. Wemos D1 Mini Relais Board
  3. IKEA Aläng Lamp
  4. Random 5V 1A Phone charger with USB plug unsoldered (see photo)a
  5. (optional) Amazon Dash Button

Installation inside lamp

Software components

  1. There is the code running on the micro controller. The code is here. I compiled it using the Arduino IDE. There is some setup needed to get it running on ESP2866. I don't know how to set it up anymore. I also implemented some remote update functionality to apply updates via WiFi.
  2. I could not fit the switch on/off images into the firmware, so I moved them to a CDN apache webserver in my LAN. The contents of the cdn are here.
  3. To control my light using a (free) amazon dash button, i have a small nodejs script running inside a 256MB Ram ubuntu vm on my home server. The code is here. I hate scripting languages like JavaScript and I have no clue how to get it running on your machine. There is a dependency to the amazon dash button library. I don't know how to install it. That's why I have a VM that I can backup!

Other implementations

You can use the same circuit / software in other projects too. I made a WiFi-controlled power plug too!

Description
A lamp in my room which can be controlled from WiFi and amazon dash button.
Readme GPL-3.0 1.5 MiB
Languages
C++ 92.9%
JavaScript 5%
QMake 1.1%
Dockerfile 1%