Dad’s Office Status

Posted on 2014/05/09


Like many of you, I’m a work-from-home kinda guy.

My office is on the main floor and it is entirely too easy for the kids to come barrelling in after school to see me and stumble into the frame of the video conference I’m on. They’re also big fans of providing me with minute-by-minute information regarding the status of dinner (I often work in not the timezone I live in.)

There must be a solution.

Enter the Electric Imp and the Hannah developer board.

imp

hannah-glam

The Electric Imp is an IoT thinger — a Cortex processor and wifi in an SD card form factor. The Hannah is a kitchen sink developer board that has (among other things) a couple of push buttons, a rotary pot, an RGB LED, an RGB light sensor, a Hall sensor, a digital temp sensor, a 3-axis accelerometer and a couple of servo outputs. There’s an i2c expander chip on there to get the GPIO count up.

With the addition of a paper legend card – the external user interface is a piece of cake. Check the colour of the LED for details on what Dad is doing and if you need him, push the “Interrupt” or “Food” buttons. I haven’t implemented the pot yet, but the plan is “how much fighting is going on” and if it tips over the top, I get alerted.

2014-05-09 10.01.42

The magic of the Electric Imp system is the “device” and “agent” software. The device code runs on the Cortex and the agent code runs in the Electric Imp ‘cloud’.

The user interface on my end of things is both simple and stupidly complex. I can control the LED colour (and its internal timer) with a simple webpage.

Screen Shot 2014-05-09 at 9.57.03

The method for receiving the button presses is practically Rube Goldberg.

  1. One of the kids presses a button
  2. The device code interprets the button press and sends a message to the agent code
  3. The agent code fires off a request to Mailgun to send a preformatted email
  4. Mailgun sends email to my personal account
  5. My email software pops a priority alert on my monitors

Screen Shot 2014-05-09 at 10.18.23

Overall, it’s pretty cool.

Next steps are to move it off of the development board to a custom board with just the features I need and attaching a small 20×4 character LCD to enable me to send status messages or responses back.

I’ll post the code as soon as it’s much less ugly and – let’s face it – I’m not the developer type. Ask me if you really want to see it.

Posted in: articles