Cheerlights on an ESP8266 LED Wifi Controller

CheerLights is an “Internet of Things” project created by Hans Scharler where people volunteer to synchronise their lights all across the world to one colour. In a truly democratic fashion, the colour changes by anyone sending a tweet with a colour #cheerlights. Check out twitter to see it live: #cheerlights. I wanted to do something with the cheap esp8266 controllers you can get to control 3528 LED strips - it’s a ready built package with the voltage converter, ESP-12S processor and the MOSFETs necessary to switch 12V on the LED strips from the ESP 3. [Read More]

Flashing custom Firmware to a Sonoff TH10/16

This is a tutorial about how to flash custom firmware onto the ESP8266 in the Sonoff Wireless Smart Switch. The Sonoff is a low cost mains relay with a fully customisable ESP8266 inside. Great for home automation hacking! Parts list Sonoff TH10 or TH16 A USB to TTL dongle CH340G (FT232RL or PL2303 based will also do), to flash the new firmware. A 3.3V breadboard power supply (only required for testing, safer than using mains! [Read More]

Deploying a scikit-learn classifier to production

Scikit-learn is a great python library for all sorts of machine learning algorithms, and really well documented for the model development side of things. But once you have a trained classifier and are ready to run it in production, how do you go about doing this? There’s a few managed services that will do it for you, but for my situation these weren’t a good fit. We just wanted to deploy the model onto a modest sized Digital Ocean instance, as a REST API that can be externally queried. [Read More]

Easy-peasy github releases for go projects using travis

A general theme of this blog is making life easier (or programmer laziness), so continuing in this vane this is a quick post on automated releases of go executables onto your github releases page. One of the strengths of go (which just got even easier with 1.5) is the ability to cross-compile self-contained executables - I find this particularly handy to get command line tools onto remote servers (though as with fine arts, wines, etc always be sure you trust the provenance of random executables you download…). [Read More]

Automatically publishing Hugo blogs to S3

The process traditionally is: create a new blog article, edit it some, save. run hugo on the command line to generate the static site. copy/sync the public directory onto your webserver. Needing a webserver, build environment and text editor is a bit of hassle. It’s all a bit manual too. I’ve previously blogged about hosting on S3, but I wanted to see if a static blog could be managed entirely on free/hosted services. [Read More]
hugo  blog  s3  aws  codeship 

Gohome

Home automation for the geek home. Built in Go.

This is my home automation project.

Find it on github or godoc.

Hello, Hugo!

Been neglecting this blog for a while (check: blog cliché), but just migrated across from Pelican to Hugo, so thought this warrants a quick “check this out” post… Hugo? There’s a bit of a buzz around Hugo in the (albeit niche) world of static-blog-generation-tools. Though Pelican has been great, it feels like the world is slowly moving on from python. Or maybe I’m just a sucker for new stuff. :-) [Read More]
blog  hugo 

Open sourcing my home automation

I have been meaning to open source my home automation system for a while now, and finally got around to cleaning it up a bit, documenting and removing the parts specific to my house (actually very little surprisingly). It’s the most Go code I’ve written, and I’m pretty happy with how it looks currently. There’s plenty of functionality, flexibility and it runs with a low overhead thanks to Go. More information is in the README. [Read More]

Elasticsearch as a smart cache

A novel use of Elasticsearch in the context of holiday search, not as a traditional store of persistent documents, but as a rolling cache of transient holiday packages. This puts unique demands on Elasticsearch in terms of index and deletion rate, concurrent to a high query rate. Figures below are from February 2014, so will have changed. Fancy a holiday? The travel industry works around the principal of ‘dynamic packaging’ of holidays. [Read More]