Switching off the lights the hard way

Standard

How many components does it take to switch on a light by voice? Here we look at what’s involved in using a Neopixel strip as a Google Home connected light bulb.

There are multiple ways of issuing commands to Google Assistant like via IFTTT or api.ai but only using Actions SDK directly lets us issue short commands like “Hey Google, lights on” rather than “Hey Google, tell house lights to switch on”. When registering as a ‘Light’, it also lets us use existing built in traits like ‘brightness and colour’ without having to write our own intents and re inventing the wheel.

Ignoring the initial OAuth handshake the flow of data is as follows:
Voice > CHIP/Phone > Google Assistant > https  > express > Mosca MQTT > ESP32 > NeoPixel

Connecting to Google Actions requires a publicly accessible https endpoint, but getting proper SSL working on embedded in a home network behind a router is not easy, to say the least. So I opted to create a Dockerized HTTPS to MQTT gateway which will run on a publicly available VPS which will forward the received https traffic via MQTT to connected devices and respond back to the request with the MQTT reply from the device.
Continue reading

Absolute position tracking using iPhone magnetometer

Standard

A recent project I was working on required absolute positioning and while waiting for Valves lighthouse and Facebooks to open source it’s tracking solutions I thought I’d take a primitive stab at EM (electro magnetic) positioning using a phone magnetometer purely for the purpose of learning the challenges involved. I’m an experienced software developer and a hobbyist hardware hacker, so I tried solving most problems using software where possible. Continue reading

Building a clock based on Arduino

Standard

I keep hearing smart watches, wearables, internet of things etc. which got me thinking about the hardware and embedded systems used to create them. As much as I love soldering and reading resister codes I’m ashamed to say the most complicated thing I’ve made was an FM transmitter.

Since I had an Arduino lying around I decided to build a watch to learn more about the hardware side of things. The plan was to build a POC clock using the Arduino and then shrink it to a watch using an ATtiny .
Continue reading