I saw this post, and had to have one. As someone who lives in an apartment, I'm not allowed to swap out my light switches for smart ones. I've even considered breaking that rule, but I don't have neutral wiring, so I really shouldn't. There's a nifty device called the Switchmate that I've looked into, however it is a Bluetooth device that requires your phone; it doesn't currently support any sort of hub functionality. And IoT needs some sort of hub or WiFi connection to meet the "Internet" component.
The other option is smart bulbs. I do have Hue bulbs, which are great for lamps, since you can leave the lamp on, then tell the bulb to be off. Hue bulbs on a switched load can be annoying, as you have to keep the switch On all the time. And as a light switch user all my life, I'm very accustomed to flipping that switch if I leave or enter.
So I got a Turner Onner. Their kit includes an ESP8266 NodeMCU board, and their example program creates a web server with On and Off buttons. I'm not an expert on that board, but as it is WiFi, it requires more power than BLE, so I'd have to have it plugged in all the time, or swap batteries often. So I replaced that with the Bluz DK, a BLE board that can connect to the Particle Cloud via your phone or a gateway.
HardwareThe Turner Onner is a handful of acrylic components, so that a servo can be mounted next to a switch. Rotate the servo one way to flip the switch on, the other way for off. It mounts right on top of existing switches. Super simple, super great.
The servo is controlled by a Bluz DK controller. I got the external battery board so that it can run off a CR2032 battery. The Bluz DK is connected to a Bluz Gateway via BLE. That gateway has a Bluetooth module and a Particle Photon, so that it can be a hub to connect DK's to the Particle cloud.
SoftwareThe Turner Onner's ESP hosted a web server that had buttons for On and Off. But pulling out my phone to turn off my lights is for cavemen. I'd rather tell Alexa to do it. Because my specialty is software close to the hardware level, I've not developed a skill for Alexa. I just use IFTTT to pass Alexa commands to the Particle cloud.
In the definitions, you can choose what to name the load (LOCALE), and how it is mounted (MOUNT). The name will register cloud events for On and Off. So for my bedroom lights, two cloud events are registered, "BedroomLightsOn
" and "BedroomLightsOff
". The plan would be to buy a coupe more of these for my kitchen lights and bedroom ceiling fan.
The MOUNT definition is where the servo is relative to the switch. For my bedroom, I want it on the right because my door is on the left. As I walk in or leave, I don't want the servo in the way of my finger. In my kitchen however, the entry is on the right, so I will want the servo on the left. If for some reason your switches are backwards (up = off, down = on), you can also use these to reverse direction.
On startup, it will point the On and Off functions to the correct CCW or CW functions, depending on the mounting position. It will then register events in the Particle Cloud that will trigger those functions. It will then go into a low power sleep mode. The DK will check-in with the gateway -> cloud every 100ms
and see if there are any new events to process. If there are, it will run the appropriate function and go back to sleep.
The IFTTT setup is pretty straightforward. Setup the Alexa trigger with the action you'd like to take (bedroom lights on), and point it to a Particle Event per the LOCALE definition in code (BedroomLightsOn
).
Comments