The Vera Community forums have moved!

General => Lighting & Load Control => Topic started by: dalhoj on July 29, 2013, 09:05:57 am

Title: Fibaro dimmer and S2 button as scene controller
Post by: dalhoj on July 29, 2013, 09:05:57 am
Hi there

I just bought i VeraLite and among other things a fibaro dimmer.

It all works fine, but I dont know if it possible to use a switch for low power with the dimmer, as S1 and S2?

And if it is possible to assign a scene to S2

I hope it makes sens.

Kind Regards
Jens
Title: Re: Fibaro dimmer and low power switch
Post by: RexBeckett on July 29, 2013, 01:11:16 pm
The current drawn by S1 and S2 is very low so you can use a low-power switch - provided it is rated for your line voltage (115 or 230V).

Yes you can trigger scenes from the FGD211. You need to set configuration variable 41 to "1".
Title: Re: Fibaro dimmer and low power switch
Post by: dalhoj on July 29, 2013, 02:15:16 pm
Thx for the reply.

The switch is 24V rated so this will not work :-(

I need a little more help regarding assigning a scene to button S2. I have set parameter 41 to "1 byte dec" "1"

And then what? Where do i assign the scene no. to the button?

Regards Jens
Title: Re: Fibaro dimmer and low power switch
Post by: RexBeckett on July 29, 2013, 03:56:35 pm
Has Vera created a Scene Controller device for your dimmer? This would have a device ID three higher than that of the parent dimmer device and is probably named _Scene Controller.

You should be able to select that as a trigger source for a scene in Automation, New scene, TRIGGERS. The scene number that will be triggered is complex - it depends on what type of switch (momentary or on/off) you are using and the settings of config. variables 14, 15 and 19. I suggest you read the data sheet to determine your situation.
Title: Re: Fibaro dimmer and low power switch
Post by: dalhoj on July 29, 2013, 05:44:11 pm
Hi again

it true I now have a 2_scene_controler in the triggers. but it does not show up in "all devices" not even under "no room"

I have both the no. 14, 15 and 19. parameter as default so I believe it has to be id 26 as a one click for S2.

Now I just have to get home to confirm it.

Thanks.

Jens


Title: Re: Fibaro dimmer and low power switch
Post by: dalhoj on August 04, 2013, 11:00:58 am
Hi

I have now been home testing and it doesn't seem to work.

It looks like the scene controller is not the right one. The one i have is ID 2 and i think its one there is there by default.

The dimmer has ID 26.

I set the proberty 41 to 1 but the new scene controller dont show up under No room, how do i get the new scene controller to apear?

jens
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: chixxi on August 30, 2013, 03:21:34 am
@RexBeckett:

I also tried this, and I was not successfull. No SceneController gets created, I don't see any when setting the parameter 14 (not 41 if I am right!) to 1. Would you mind quickly describing step by step how ou achieved this?
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: RexBeckett on August 30, 2013, 04:13:48 am
To be honest, I have no idea how/why I got SceneControllers for some (not all) my Fibaro modules. MCV has also not been able to figure it out. I'm not actually using them and have hidden them.

I trigger scenes by just using the status of the S2 switch as with any other switch.   

It is parameter 41 for setting the scene functionality on an FGD211. Parameter 14 sets the type of switch being used.
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: chixxi on August 30, 2013, 04:37:47 am
OK, I don't have any parameter 41, it fails if I try to set or monitor it.

I guess that is because my dimmers are to old (Version 1.4), in the manual for version 1.4-1.8 there is no parameter 41:
http://materialy.fibaro.com/instrukcje/dimmer%20FGD211%20v14%20-%20v18%20ENG.pdf

Which version do you have?

Can you explain this "I trigger scenes by just using the status of the S2 switch as with any other switch."?
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: RexBeckett on September 01, 2013, 02:46:43 pm
The latest version of FGD211 is 2.2 but I think parameter 41 appeared at v1.9.

Vera usually includes an additional device for each Fibaro switch or dimmer. It usually has a device ID two higher than the main device and reflects the state of the S2 input. Recent Fibaro versions (>2.0?) give instant-update for this. Older versions had to wait for the next poll. You can use the state of this device to trigger a scene or PLEG input.
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: Da_JoJo on September 05, 2013, 12:10:02 am
parameter 41 indeed appeared on version v1.9 and higher. you can see the version number your device has on the advanced tab of the device. look at versioninfo , the last number is the current firmware on it.
i have been puzzeling to get it to a higher version but it doesnt seem to work. it requires a (zip) firmware file send using the z-wave 'COMMAND_CLASS_FIRMWARE_UPDATE_MD' and only works from v2.x versions and up of the devices firmware.
if you happen to have a v1.9 or higher firmware you can use the scene-controller parameter 41 to 1 to activate it and this will create a scenecontroller on vera for the device which you can set to be able to use 3 scenes for s1 and 3 for s2. it wont work using s1 as switch and s2 as scenecontroller. to be able to use s2 on older firmware versions of fibaro device you would set parameter 7 to 0 and make a group ID 2 under device options and add the device you want to turn on/off in that group. this device chosen can then be setup as trigger for a scene in case you want this.
edit: tried on my fibaro binary sensor.. doesnt seem to create a scenecontroller anymore on latest vera firmware 622 :-s  seems vera is missing this functionality all of a sudden. up till now i also didnt see a 2nd device created for the s2 input. probably me... also this strange move of taking the e1 from the duo-switch i dont get. dont get mcv sometimes. why not remove the e1 from rgbw controller and the main device for the binary switch. perhaps someone can explain me what i missed ?
edit2: after some reading elswhere it seems the s2 functionality breaks the normal usage for s1 contact. till v2.1 it seems not to work correctly. therefor i advice not to use it to avoid trouble.
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: chixxi on October 22, 2013, 08:42:49 am
Has anyone figured this out?

I can confirm that paramter 41 is only available in dimmers which have version 1.9, as for the moment I don't have any newer ones. But so far no scene controller has been created on my vera.

What I basically would like to achieve is to disconnect the switch from the light itself, meaning that I could freely use the switch to do whatever I wish by using logic on the vera.
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: DragonVera on November 04, 2013, 01:18:18 am
I too would like to use s2 as a scene controller. The version in settings says "3,3,42,1,7" Does this mean I have version 1.7 firmware?
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: chixxi on November 04, 2013, 01:51:33 am
Yes this does mean you have a version 1.7.

However, so far this scene controlling stuff is not working yet. I have a ticket open at MCV and we are trying to figure this out. I will let you know if there is any progress...
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: DragonVera on November 04, 2013, 02:43:59 am
Yes this does mean you have a version 1.7.

However, so far this scene controlling stuff is not working yet. I have a ticket open at MCV and we are trying to figure this out. I will let you know if there is any progress...

Thanks for the info chixxi, that is disappointing. I would very much appreciate it if you could keep me updated.  :)
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: Da_JoJo on November 04, 2013, 11:55:22 pm
i had this too but somehow this scenecontroller dissapeared over time and i have no clue what happend with it. have you tried setting the parameter on the device and after it set exclude the device and include it again ? if i recall it was something screwing up the scenecontroller so they removed the feature in latest firmware for vera also breaking scenefunctions of other remotes. hopefully they come up with a solution as these universal sensors from fibaro could be great and cheap for using as a scene-controller.
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: chixxi on November 07, 2013, 01:42:52 am
This looks really really interessting: http://forum.micasaverde.com/index.php/topic,17409.0.html

Gonna try right when I am home.
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: chixxi on November 08, 2013, 01:07:45 am
It is now working! See the link above.
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: DragonVera on November 08, 2013, 08:15:33 pm
I got hold of a dimmer with v2.2 firmware. On this one I set parameter 41 to 1, but no new scene controller device appeared. Did v2.2 firmware remove this functionality?

It is exciting that people are having some success. I am confused about the solution in the link though. Is the solution to get a switch to activate a scene via s2 or does it activate a scene by double clicking on s1? And what is the significance of scenes 24 and 26?
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: DragonVera on November 09, 2013, 01:52:00 am
Update:  I've just set up a PLEG as per the instructions and s2 on the dimmer is now able to active different scenes either via single or double press. Thank heaps!  :)
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: pls90 on November 09, 2013, 03:20:01 am
Update:  I've just set up a PLEG as per the instructions and s2 on the dimmer is now able to active different scenes either via single or double press. Thank heaps!  :)
@DragonVera which device property are you using in PLEG? sl_SceneActivated?
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: DragonVera on November 09, 2013, 03:25:19 am
Yes

Name   Device Name   Device Variable   Last Change   Value
SceneActivated   Upstairs Hallway Lights   sl_SceneActivated   2013-11-09 18:07:26.689   0
LastSceneID   Upstairs Hallway Lights   LastSceneID   2013-11-09 18:07:26.731   26
LastSceneTime   Upstairs Hallway Lights   LastSceneTime   2013-11-09 18:07:26.774   1383980846

Strangely though, I've just tried to do exactly the same setup with another fibaro dimmer (with same firmware Version 3,3,52,2,2 ), and on this dimmer I can't seem to find the device variables sl_SceneActivated, LastSceneID or LastSceneTime when I look for them in the PLEG.  ???
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: RexBeckett on November 09, 2013, 04:14:35 am
Quote
Strangely though, I've just tried to do exactly the same setup with another fibaro dimmer (with same firmware Version 3,3,52,2,2 ), and on this dimmer I can't seem to find the device variables sl_SceneActivated, LastSceneID or LastSceneTime when I look for them in the PLEG.  ???
I think the scene variables only get created after you have set variable 41 to 1 and restarted Vera.

Quote
And what is the significance of scenes 24 and 26?
These are explained in the instruction sheet for FGD211 - under Parameter 41. They indicate which switch and action initiated the scene:

14 = S1 double-click
15 = S1 triple-click
16 = S1 single click
24 = S2 double-click
25 = S2 triple-click
26 = S2 single click




Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: chixxi on November 09, 2013, 05:05:41 am
Quote
I think the scene variables only get created after you have set variable 41 to 1 and restarted Vera.

In my case the variables got created after I set Parameter 41 to 1, then did a double click on the switch, and then reloaded the UI in the browser.
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: Da_JoJo on November 11, 2013, 12:17:03 am
nice ! got it working with fibaro universal sensor thnx to filifjonkan instructions for PLEG .. 2 scene buttons now ^^
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: conchordian on October 30, 2014, 10:26:14 pm
Is it possible to use either button, on a dimmer with 2.2 firmware, as a scene controller, without PLEG?

Yes, it is, thanks to @RexBeckett  http://forum.micasaverde.com/index.php/topic,18679.msg217315.html#msg217315

Here's how an example of how to run a scene when a button (s1) is double-clicked, on 2 different Fibaro modules.

Note parameter 15 (the one that when double-clicked gives you 100% brightness) has to be set to the default of "1", or the double click variable doesn't seem to show up. 

Startup Lua:
Code: [Select]
-- Set up variable-watch for device 306 (Kitchen Downlights)
luup.variable_watch("doChange306","urn:micasaverde-com:serviceId:SceneController1", "LastSceneID",306)

-- Set up variable-watch for device 308 (Middle Deck Light)
luup.variable_watch("doChange308","urn:micasaverde-com:serviceId:SceneController1", "LastSceneID",308)


-- Process variable-watch callback for device 306. Run scene 161
function doChange306()
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum = 161}, 0)
end
-- Process variable-watch callback for device 308. Run scene 160
function doChange308()
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum = 160}, 0)
end

Scene (160) Luup:
Code: [Select]
local DoubleClick = luup.variable_get("urn:micasaverde-com:serviceId:SceneController1", "LastSceneID", 308)

if (DoubleClick== "14")
then return true
else return false

end
Title: Re: Fibaro dimmer and S2 button as scene controller
Post by: conchordian on February 03, 2015, 12:39:45 am
I've decided to use the sl_SceneActivated variable, instead of the LastSceneID, because if the same button sequence is pressed twice in a row, then the variable doesn't change and the scene won't run.

sl_SceneActivated seems to be changed briefly after every button press, which is what I want as a trigger.

I'm also trying to get the condition for the scene running, (double-clicking), included into the start-up Lua, because if I want to run scene manually from my phone, it will fail to do, so unless the last button press was a double click.

I've inserted a delay of one second because the scene was running sometimes when it shouldn't have been, so I can only assume LastSceneID wasn't being updated quick enough.

I hope this helps somebody, and if anyone can give me tips on a better way to achieve this, or something I'm doing wrong etc. please don't hesitate, because I'm a complete novice just messing around.

Code: [Select]
-- Set up variable-watch for device 308 (Any button press on Middle Deck Light)
luup.variable_watch("ButtonPressed308delay","urn:micasaverde-com:serviceId:SceneController1", "sl_SceneActivated",308)

-- Process variable-watch callback for device 308. Run function after 1 second to give LastSceneID a chance to update.
function ButtonPressed308delay()
luup.call_delay("ButtonPressed308", 1)
end

-- Process variable-watch callback for device 308. Run scene 160, if button double-clicked (ID:14)
function ButtonPressed308()
if (luup.variable_get("urn:micasaverde-com:serviceId:SceneController1", "LastSceneID", 308) == "14") then
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum = 160}, 0)
end
end

And here's how to incorporate more than 1 module and look out for triple clicks on S1:

Code: [Select]
-- Set up variable-watch for device 306 (Any button press on Kitchen Downlights)
luup.variable_watch("ButtonPressed306delay","urn:micasaverde-com:serviceId:SceneController1", "sl_SceneActivated",306)

-- Set up variable-watch for device 308 (Any button press on Middle Deck Light)
luup.variable_watch("ButtonPressed308delay","urn:micasaverde-com:serviceId:SceneController1", "sl_SceneActivated",308)

-- Process variable-watch callback for device 306. Run function after 1 second to give LastSceneID a chance to update.
function ButtonPressed306delay()
luup.call_delay("ButtonPressed306", 1)
end

-- Process variable-watch callback for device 306. Run scene 161, if button double-clicked (ID:14), or if triple clicked (ID:15), run scene 178
function ButtonPressed306()
if (luup.variable_get("urn:micasaverde-com:serviceId:SceneController1", "LastSceneID", 306) == "14") then
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum = 161}, 0)

    elseif (luup.variable_get("urn:micasaverde-com:serviceId:SceneController1", "LastSceneID", 306) == "15") then
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum = 178}, 0)
end
end

-- Process variable-watch callback for device 308. Run function after 1 second to give LastSceneID a chance to update.
function ButtonPressed308delay()
luup.call_delay("ButtonPressed308", 1)
end

-- Process variable-watch callback for device 308. Run scene 160, if button double-clicked (ID:14)
function ButtonPressed308()
if (luup.variable_get("urn:micasaverde-com:serviceId:SceneController1", "LastSceneID", 308) == "14") then
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum = 160}, 0)
end
end