Using my minimote with Fibaro Home Center

For some time now I have a minimote at home. This is a kind of keyfob device, capable of sending 8 different scenes to the gateway controller. The manufacturer is Aeon Labs.

Previously I succeeded in adding the device to Fibaro. But after that nothing happened, i.e. no paramters could be applied, etc to control the device.

After some digging around on Internet I found the following solution. It may look pretty difficult, but it is in fact straight forward. First we make sure the device is recognized correctly, this means it looks like the following picture:

Minimote - Setup
Minimote – Setup

As the device has no parameters there is nothing to configure on the advanced tab. Proceed with adding a new scene, in my case I called it also Minimote (make sure you activate the scene):

Minimote - Scene
Minimote – Scene

The magic happens in the processing of the scene. Here is the code:

 %% properties
 52 sceneActivation
 %% globals
local ButtonPressed = fibaro:getValue(52, "sceneActivation")
if ( tonumber(ButtonPressed) == 1) then
 fibaro:debug("MiniMote button 1 pressed")
elseif ( tonumber(ButtonPressed) == 2) then
 fibaro:debug("MiniMote button 2 pressed") 
elseif ( tonumber(ButtonPressed) == 3) then
 fibaro:debug("MiniMote button 3 pressed")
elseif ( tonumber(ButtonPressed) == 4) then
 fibaro:debug("MiniMote button 4 pressed")
elseif ( tonumber(ButtonPressed) == 5) then
 fibaro:debug("MiniMote button 5 pressed / Zolderlamp Uit")
 fibaro:call(27, "turnOff")
elseif ( tonumber(ButtonPressed) == 6) then
 fibaro:debug("MiniMote button 6 pressed / Zolderlamp Aan")
 fibaro:call(27, "turnOn")
elseif ( tonumber(ButtonPressed) == 7) then
 fibaro:debug("MiniMote button 7 pressed")
elseif ( tonumber(ButtonPressed) == 8) then
 fibaro:debug("MiniMote button 8 pressed")
 fibaro:debug("No response")

The header contains the number of the device (in my case 52). The rest is freely configurable. In the (working) example above I use different kind of calls (like a direct call and a call to activate a scene). Other examples are welcome!

P.S. Don’t forget to start the scene šŸ™‚