Preparing the remote control app for Christmas

Winter is soon to arrive in Sweden and the amount of daylight is decreasing every day. Thus it’s time to set up some extra light sources indoors and outdoors. I have been using my web app for remote controlled outlets (link) for some months now, but with the additional light sources needed for this time of year, I have to extend the application. As Sweden goes into the dark season I would also like to have an on/off schedule for some of the lights so that they are turned on/off automatically according to a set of specified events.

Continue reading →


A web app for IoT data visualization

As described in some earlier posts, I have a setup at home with IoT devices that publish measurement messages to a Raspberry Pi via MQTT. The RPi stores the data in a database and also forwards the messages to a cloud service (Adafruit IO).

In this post I have made a self-hosted data visualization web app that can be accessed from any browser-enabled device.

Continue reading →

RCSwitch revisited – control RC outlets with a web app

In two previous posts, I used the RCSwitch and pi-switch libraries for communication between an Arduino Uno and a Raspberry Pi. I touched briefly on the main purpose with these libraries – to control RC outlets. In this post I will dig deeper and decode the RC signals so that the remote control can be replaced by a web app running on any browser-enabled device.

Continue reading →

Control your home with a Raspberry Pi and a mobile phone

In this post I will show how I have used a Raspberry Pi as a relay server that can be controlled via a web app on e.g. a mobile phone or via REST calls. The system consists of:

  • A Raspberry Pi 2 with Raspbian
  • A set of relays connected via the GPIO pins on the RPi
  • Flask running a Python WebAPI on the RPi
  • A Single Page Application made with HTML5, JavaScript and AngularJS where you can control the relays via the WebAPI

There are many inexpensive kits available for controlling voltage outlets at home, but making your own is an opportunity for learning and tinkering, so let’s go!

Continue reading →

Hello SR open API!


I’m totally addicted to Sweden’s public service radio, especially the SR P1 channel that is almost always flowing from our speakers at home. Programs that I miss, I catch up with via the excellent collection of SR podcasts.

When I recently decided to refresh my knowledge in AngularJS, I was looking for a ready-to-use backend for my front-end experiments. It turned out that Swedish Radio has a very nice REST API that is free to use! There is documentation available and also a forum.

My first test was to fetch all radio channels’ meta data, list the channels and their logotypes and provide links to the live broadcast url:s. You can view my published experiment in Plunker here:

Continue reading →