Jump to content
  • 0

User door sensor as switch


Question

I have a very weird problem. I have set up a door sensor as switch and have associated it with a Dimmer2. The association works ... except, when I turn off the dimmer with the wall switch, I need to press the switch on the door sensor twice before it turns on the light. Why is that? Tried the new and old door sensor, and tried it with the 3.4 and 3.5 firmware of the Dimmer2.

 

Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
3 hours ago, kariem112 said:

I have a very weird problem. I have set up a door sensor as switch and have associated it with a Dimmer2. The association works ... except, when I turn off the dimmer with the wall switch, I need to press the switch on the door sensor twice before it turns on the light. Why is that? Tried the new and old door sensor, and tried it with the 3.4 and 3.5 firmware of the Dimmer2.

 

 

This is how association works (with most devices), and it is also the reason why I almost never use it. The "source" = your sensor simple sends an "on" then an "off", then "on" and so on. It doesn't know the state of the receiver = dimmer has changed. If you don't use remote commands, this works. As soon as you start controlling the "receiver" from another source (HC or physical switch), this scheme breaks down. I'd set parameter 14 to 1, to get sceneActivation and use a scene on your HC.

Link to post
Share on other sites
  • 0

Well, that is the problem, tried scene activation, same behavior :roll: Need to press the switch on the door twice before the scene starts, (but only after I have turned off the dimmer manually with the wall switch). 

 

Link to post
Share on other sites
  • 0

I see. Please check your scene and parameter 3 = 2 monostable switch. I have a push button connected to a FGK-101 to control a Dimmer. This is the code that I use (replace 430, two times, and 378, one time, with your IDs):

--[[
%% killOtherInstances
%% properties
430 sceneActivation
--]]
SwitchID=430
DimmerID=378
function set(level) fibaro:call(DimmerID, "setValue", level) end
sceneID=fibaro:getValue(SwitchID, "sceneActivation")
if sceneID == "10" or sceneID == "11" then
  dimlevel = tonumber(fibaro:getValue(DimmerID, "value"))
  if dimlevel < 5 then
    set(10)
  elseif dimlevel < 20 then
    set(30)
  elseif dimlevel < 50 then
    set(60)
  elseif dimlevel < 90 then
    set(99)
  else
    set(0)
  end
elseif sceneID == "12" then
  set(0)
elseif sceneID == "14" then
  set(99)
end

 

Link to post
Share on other sites
  • 0
10 hours ago, petergebruers said:

I see. Please check your scene and parameter 3 = 2 monostable switch. I have a push button connected to a FGK-101 to control a Dimmer. This is the code that I use (replace 430, two times, and 378, one time, with your IDs):

--[[
%% killOtherInstances
%% properties
430 sceneActivation
--]]
SwitchID=430
DimmerID=378
function set(level) fibaro:call(DimmerID, "setValue", level) end
sceneID=fibaro:getValue(SwitchID, "sceneActivation")
if sceneID == "10" or sceneID == "11" then
  dimlevel = tonumber(fibaro:getValue(DimmerID, "value"))
  if dimlevel < 5 then
    set(10)
  elseif dimlevel < 20 then
    set(30)
  elseif dimlevel < 50 then
    set(60)
  elseif dimlevel < 90 then
    set(99)
  else
    set(0)
  end
elseif sceneID == "12" then
  set(0)
elseif sceneID == "14" then
  set(99)
end

 

Works great, thanks!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...