Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team
Question
vanni177 0
Hope someone can help on it
I have the problem that some lights doesn't switch off and some randomly switch on.
In detail:
I have an ON Scene and an OFF Scene for the lights. They are triggered by Motion Sensor.
I can see after the Motion Sensor is save again, the OFF scene is running, after a while it's not running anymore and the light is still on.
The thing is it happens only sometimes, but too often.
Here is an OFF Scene:
--[[
%% properties
262 value
97 value
%% events
%% globals
CRLED
--]]
--CR_LED_OFF ID 156
local date = os.date( '*t' )
local time = tonumber( string.format( '%02d%02d', date.hour , date.min ) )
local startSource = fibaro:getSourceTrigger();
if(startSource["type"] == "other") then
fibaro:call(28, "turnOff");
else
if (( tonumber(fibaro:getValue(262, "value")) == 0 ) --Motion Dressroom
and ( tonumber(fibaro:getValue(97, "value")) == 0 )) --Motion Bedroom
then setTimeout(function()
local delayedCheck0 = false;
local tempDeviceState0, deviceLastModification0 = fibaro:get(262, "value");
if (( tonumber(fibaro:getValue(262, "value")) == 0 )
and (os.time() - deviceLastModification0) >= 120) then
delayedCheck0 = true;
end
local delayedCheck1 = false;
local tempDeviceState1, deviceLastModification1 = fibaro:get(97, "value");
if (( tonumber(fibaro:getValue(97, "value")) == 0 )
and (os.time() - deviceLastModification1) >= 120) then
delayedCheck1 = true;
end
local startSource = fibaro:getSourceTrigger();
if (
( delayedCheck0 == true
and delayedCheck1 == true
and fibaro:getGlobalValue("CRLED") == "Active" )
or
startSource["type"] == "other"
)
then
fibaro:call(28, "turnOff"); --Light Changeroom
end
end, 2*60000) --delay 2min
end
end
********************************************************************************
BTW I'm sure and double confirm the variable CRLED is Active
Here is an ON Scene:
--[[
%% properties
262 value
%% events
%% globals
CRLED
Mode
--]]
--CRBF_LED_ON 150
local startSource = fibaro:getSourceTrigger();
if (
( tonumber(fibaro:getValue(262, "value")) > 0 ) --Motion Dressroom
and
( fibaro:getGlobalValue("CRLED") == "Active"
and ( fibaro:getGlobalValue("Mode") == "Day"
or fibaro:getGlobalValue("Mode") == "Evening" ))
or
startSource["type"] == "other"
)
then
fibaro:call(28, "turnOn"); --LED ON
end
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.