Today I thought about, how to use the very cool Alfred App and the great FHEM home automation system together.

The result is a small Alfred-Extension that allows you to send FHEM’s commands directly via Alfred’s search box.

For Example: To switch a lamp on in our living room we only neet to put “set Standlampe on” in Alfreds text field – great!

Howto:

You need a running FHEM server installation and some working actors in you system.

In Alfred’s preferences, you have to go in the Extensions-Tab. Click on the + at the left bottom corner and chose “Shell Script”. Now you have to enter a unique Extension-Name, Author, Web-Address and your favorite icon. After that, just click “Create”.

In the next dialog, you have to chose a title, description and your desired keyword. In my case i chose “set” as keyword, because it’s unused in Alfred’s context at the moment and it’s the normal FHEM command, to set parameters or send status commands to a device. At the options I chose “Silent” and “Action”.

Now we can put some unix shell code into the “Command” textbox. Use {query} to get the given input from Alfred’s search box.

Note: You have to change the IP-Address (192.168.178.32 in my case) to your FHEM server IP-Address.

Next, click on the “Advanced” button and unselect every checkbox.

Next, just close and save you new extension. You can also close Alfreds preferences.

Now it’s time to test you magic FHEM extension – have fun!

Download:

Alfred-Extension: http://cl.ly/9p7Q

Note:

You have to change the IP-Address (192.168.178.32 in my case) to your FHEM server IP-Address!