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.
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.
Buy this article as PDF
(incl. VAT)