Raspberry Pi, Fhem and the Philips Hue

Categories: home automation

While searching for other ways to control a set of Philips Hue lights, I found fhem (a GPL’d perl server for house automation). With fhem I can have a huge amount of flexibility on automation rules and combination of devices working together; but for now I’m interested in a quick way to control the lights from outside of my house without using a 3rd party service.

For the Raspberry Pi OS, I went with Raspbian . Instructions are already pretty detailed on their site so I won’t repeat it.

To install fhem, do the following on your Raspbian:<br />

Now go to your fhem web view, at http://ip-of-your-raspbian:8083 . You will probably see an alert:<br />

To remove this, edit your config file by going to “Edit files” and then click on “fhem.cfg”. You’ll need to add:

``

On my example, I used the same username and password combination for the web, mobile and tablet interfaces, which is written on step #6 above. If you wish to use different password and/or usernames just create new base64 hashes.

Going back to fhem’s web interface, you should now see a text input box on the top of the page and on the left a set of menu items. On the text input box type:<br />

After that, run really fast to your Hue bridge and press the link button. Go back to fhem, refresh and you should see the Hue Lights now displayed.

Sources:  meintechblog (in German),  Robin’s Blog (in German)