Fibaro dimmer and roller shutter modules can be set up as scene controllers (param 41 for FGD-211 and FGR-221, param 50 for FGRM-222).
However, the Vera UI doesn’t regognize those modules as scene controllers/triggers (even though we can see the events from the scene controller in the logs). Some people have used PLEG in order to associate double/triple click events on S1/S2 switches from those modules, including myself. The issue is that now that I’ve upgraded to UI7, PLEG is a bit problematic.
So if you are in the same situation as myself, and you would like to benefit from the ability to trigger scenes from double/triple clicks on switches connected to fibaro dimmer/roller shutter modules, here is the code to add to your startup.lua:
[code]function dispatch_roller_shutter(dev_id, service, variable, old_val, new_val)
– retrieve LastSceneID from the device
new_scene = luup.variable_get(service, “LastSceneID”, dev_id)
new_scene = tonumber(new_scene)
luup.log(“dispatcher - roller shutter”)
– trigger the related scene
if (new_scene==14) then
luup.log(“double click up”)
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”,{ SceneNum=“3” }, 0)
elseif (new_scene==15) then
luup.log(“triple click up”)
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”,{ SceneNum=“3” }, 0)
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”,{ SceneNum=“4” }, 0)
elseif (new_scene==24) then
luup.log(“double click down”)
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”,{ SceneNum=“2” }, 0)
elseif (new_scene==25) then
luup.log(“triple click down”)
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”,{ SceneNum=“2” }, 0)
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”,{ SceneNum=“5” }, 0)
end
return true
end
luup.variable_watch(“dispatch_roller_shutter”, “urn:micasaverde-com:serviceId:SceneController1”,“LastSceneTime”, 31)[/code]
In luup.variable_watch, replace “31” by your Fibaro device number, and that should work.