Home Automation with Pebble

greyLast week I was fortunate enough to pick up a Pebble watch – a neat smartwatch featuring a 1.26 ePaper display, a Cortex-M3 ARM microprocessor, 3-axis accelerometer and a bluetooth connection to iOS and Android devices.

I picked up a grey model for roughly £100 which isn’t a bad price in the grand scheme of things considering you can have multiple watch faces, receive notifications from your phone or even control your music – but the thing that got me the most intrigued is the ability to write your own Apps.

Immediately I thought that the Pebble would be great to remote control my central heating at home.

This isn’t something that is new in my house, I have been able to remotely turn on/off my heating since 2011 when I built a simple web application using an Arduino and an ethernet shield which controlled a relay – thus turning the heating on or off – great for when you’re on your way home from work (the the pub!) on a chilly night. The current system only works on a manual control – with no thermostat or schedules.

Making it so that my Pebble could control the system is something that I think is very cool – maybe gimmicky, but cool.

I first of all did some research online, and it didn’t take me long to find httpebble – an iPhone application which allowed your Pebble to make HTTP requests via your iPhone’s internet connection. All that seems nice and dandy, but I’ll just have to create a web interface that httpebble understands. But wait, that could be tricky using something like an Arduino – a device with just 32KB of ROM, with huge overheads for just running a web server. I needed something with the ability to provide GPIO, be low power, and cost effective. I immediately thought of the Raspberry Pi.

Now, if you haven’t heard of a Raspberry Pi before, I will assume you have been living under a rock for the last year – but let’s recap. It is a £28 computer featuring a low power 700MHz ARM11 processor with 512MB of ram, 8x GPIO and uses just 3.5W of power. Best of all, the Raspberry Pi can run Debian, meaning I can take full advantage of Apache, PHP and MySQL!



I have had a Raspberry Pi stuck in my drawer for a while, so I essentially had all the pieces required to get the project moving! I have now get the Pi setup running Raspian with LAMP (Linux, Apache, MySQL and PHP) and with the help of php-gpio, I can control the Pi’s GPIO pins securely via PHP!

Moving onto the Pebble side of things, I have managed to install the Pebble SDK, and started to think about how I want my Pebble application to look like – I came up with the following design using static data:


This interface was mostly based off the simple menu layer example provided in the SDK – the ‘Modify’ menu will allow you to turn the heating on/off for either 30 minutes or 1 hour. The ‘Refresh’ button will refresh the status.

So that’s where I’m up to, as of 22:45 on Sunday 8 Sept 2013. I’m hoping to get a lot more done in the next week – stay tuned for more updates!


  1. Hi Curtis
    I’m trying to install the pebble SDK 2.0 on my Raspberry and am having problems. I keep getting an error when I try to build the hello-world app. Can you give me any info on how you got it to work on your Pi.

    1. Hi John – sorry for the late reply.

      I have only just tried to use SDK 2.0 because I’ve got an iPhone and didn’t get my hands on the beta app. I managed to get the SDK installed fine on my mac but haven’t tried on the pi.

      It might be worth trying to get your question answered on the pebble developer forums.


  2. Hi!
    Ther is very interest project, comgratulation!
    I working in my house with Micasaverde home server.
    I know to switch with Pebble (Smartwatch Http sending) my home (light, thermostat,)
    This is a simple http post message.

    I’d like some face my Pebble, which only received the status some lights.
    Etc. Light1 ON
    Light2 OFF

    I m not a programmer, only modified some face in C via CloudPebble.net

    Can you have a source code for your Pebble project, or on Github?

    Best regards
    Lajso Toth

    1. Hi Lajos,

      I managed to get the pi implementation working, but held off on the pebble side until SDK 2.0 came out. I took a look at the new SDK yesterday and it seems possible to make a simple HTTP request/post using the JS API’s in Pebble 2.0. There is a simple weather application included in the SDK which would be a good starting point.

      SmartWatch+ also allows you to send HTTP requests from your Pebble if you don’t know how to code.

      I’ll be looking at the Pebble 2.0 API and hopefully get something released (and a new blog post too!) soon and stick the source on Git.

Leave a Reply

Your email address will not be published. Required fields are marked *