Jump to content
  • 0

Controlling lamps with I2 on qubino dimmer?


Question

Hi. I'm about to install 2 qubino dimmers in my kitchen. And with them I can use I2 with a pushbutton as a sensor to trigger other things.

Will it be possible to use it with PLEG as followed?

If sensor1 is triggered an lamp2 is off - turn lamp2 on

If sensor1 is triggered an lamp2 is on - turn lamp2 off

So if I can figure this out I can dim lamp1 with one button and toggle lamp2 with the other

Is it possible with block scene or do I have to use LUA? (wich I'm total novice on)

Hope I made myself clear so u guys can help me

Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

I have the exact setup but with 1D relay. Two double push turning on one light each. I have tried to do it by association but that doesn't seems possible. I have a case with Qubino about it. Parameter 1 seems only affects I1 and not I2.

Having that said. Yes I can probably solve my problem with a scene. I literally installed them last week so I haven't had time to write it yet. And I think you can to.

Link to post
Share on other sites
  • 0

What I figure, and I may have time to try tonight, is that you need to only switch on the positive pulse and keep track of the state of the light.

This is pseudo code for my proposed solution/scene.

If I2 and light is off then turn light on.

If I2 and light is on then turn light off.

Should work in both LUA and block.

Link to post
Share on other sites
  • 0

well,it was THAT easy. Solved it yesterday by creating a block scene and then swith it to LUA and change small things.

 

here it is

--[[
%% properties
17 value
%% events
%% globals
--]]

local startSource = fibaro:getSourceTrigger();
if (
 ( tonumber(fibaro:getValue(17, "value")) > 0 )
or
startSource["type"] == "other"
)
then
	local deviceValue1 = tonumber(fibaro:getValue(31, "value"));
	if (deviceValue1 > 0) then
		fibaro:call(31, "turnOff");
	else
		fibaro:call(31, "setValue", "100");
	end
end

Link to post
Share on other sites
  • 0

What am I doing wrong? Do you have any special parameter setup or is it just parameter 1 that is set to monostable?

--[[
%% properties
101 value
%% events
%% globals
--]]
 
local startSource = fibaro:getSourceTrigger();
fibaro:debug(tonumber(fibaro:getValue(101, "value")));
if (
 ( tonumber(fibaro:getValue(101, "value")) > 0 )
or
startSource["type"] == "other"
)
then
 local deviceValue1 = tonumber(fibaro:getValue(101, "value"));
   fibaro:debug("abc123");
 if (deviceValue1 > 0) then
  fibaro:call(95, "turnOff");
     fibaro:debug("släck");
 else
  fibaro:call(95, "turnOn");
     fibaro:debug("tänd");
 end
end

If I use ID 100 it works (switch connected to I1) and the first debug prints 1 or 0 but if I use 101 the Id connected to I2 I dont get any printout? HC2 version 4.056. Do I need to change parameter 100 or am I doing something wrong?

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...