BeaconAir – Track your Pi

Philips Hue Lighting System

The Philips Hue lighting system [8] is a ZigBee-based [9] way to control intensity, color combinations, and On/Off status of Philips Hue products (Figure 4) wirelessly from a Philips bridge on your local network. The standard apps for Android and iOS are very powerful; however, the best part is that Philips has released the robust, easy-to-use, and hackable API for the bridge to the DIY crowd. All commands are sent via wireless or Ethernet to the Philips Hue bridge (Figure 5), and the bridge communicates to the individual devices.

Figure 4: Philips Hue bulb.
Figure 5: Philips Hue bridge.

The bridge communicates via authenticated JSON packets. A number of Python packages have been designed to communicate with the bridge, but I chose to use a great package called phue written by the French company Studio Imaginaire [10]. Considering the BeaconAir logo was designed in France, it seemed appropriate to use this library [11] (see the "Installing phue" box for installation instructions).

Installing phue

The installation of phue on your Pi is simple: Either enter

sudo easy_install phue

or

sudo pip install phue

Note that the first time you run BeaconAir on your Raspberry Pi, the phue library will stop telling you that you need to push the Philips Hue bridge button and re-run the software. BeaconAir will then be paired with the Philips Hue bridge.

The test house for BeaconAir has 10 Philips Hue A19 standard bulbs, and three Philips Hue BR-30 downwash lights, and two Philips Friends of Hue Bloom lights. The A19 bulbs are US$  60 apiece, the BR30 bulbs US$  60 apiece, and the Blooms US$ 80 apiece.

BeaconAir Hardware

The BeaconAir hardware is pretty straightforward. I use a stock Raspberry Pi Model B with a Wi-Pi WiFi USB dongle and an IOGear Bluetooth 4.0 USB dongle. Everything else is done in software. The hardware diagram in Figure 6 shows the setup and the iBeacons determining the approximate physical position of a BeaconAir Portable Pi.

Figure 6: BeaconAir system diagram.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Pi in the Palace

    Welcome to the sixth issue of Raspberry Pi Geek magazine. In case you haven't done the math, six issues for a bimonthly magazine means we're celebrating our one year anniversary! We had a great year, and so did the amazing Raspberry Pi computer. It seems like we were just writing about the 2 millionth Raspberry Pi, and now the Foundation has announced the 3 millionth unit. 

  • Connecting a weather station to your Arduino

    After losing one weather station to tropical winds, the author reboots and designs a PCB that connects to an Arduino and monitors weather instruments.

  • Getting BLE to behave on the Pi

    BLE is a convenient choice for wireless communication where WiFi and Internet connectivity aren't available, but getting it to work on a Raspberry Pi can be a minefield of compatibility problems. We look at the main concepts and debugging tools you will need to get the most out of BLE on your Pi.

  • WiFi and the Raspberry Pi

    This SwitchDoc column looks at various uses for the inexpensive ESP8266 WiFi/processor combination.

  • The Switch Doc rebuilds his cat toy launcher with 3D printing

    To explore the possibilities of 3D printing, we rebuild the cat toy launcher that debuted in Issue 5.