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
Fatman01 0
Hello all,
so I am setting up my house & used Block Scenes for standard on/off by sensor & day/time activity scenes, coupled with standard day/night & awake/asleep variables. all is going OK but getting adventurous, i wanted to try & include LUX decision into auto light switching on & off & it will not work for the life of me.. Can someone review & help me get this right please:
2-3 days ago in Block Scene creation: working on the variable 'Awake' (between 08:00am to 9:00pm each day) depending on the LUX being below '5' in my master bedroom, i wanted the triggering Fibaro PIR sensors in the 'foyer, bedroom or the wardrobe' to activate the bedroom floor light for 60 seconds powered by an Aeotec Z-wave Plus Smart Switch 6..
Please login or register to see this image.
/monthly_2019_07/image.png.30d4a9b8d4da33d23762948980756bbd.png" />The light triggered by the PIR's being breached, works & the light turns "ON" & 60 seconds later turns "OFF" -- but the 'Awake' Variable & 'Lux' setting of less than or equal to '5' does not seem to have any control. Last night outside the awake timeframe, the light kept triggering when motion detected by the PIR's. Also: Yes the variable awake is working as another light routine is controlling correctly <does not turn on during this time-frame> & the LUX for Bedroom at this time is reporting back as 18 __ so the light should NOT be turning on because of Lux.
I have checked HC2 location & time is correct & I have reset the Energy Metering just in case per some other forum questions.
I took the plunge & transferred a copy of the scene above into LUA and have been learning, investigating on:
--[[
%% autostart
%% properties
151 value
131 value
149 value
107 value
%% weather
%% events
%% globals
Awake
--]]
local startSource = fibaro:getSourceTrigger();
if (
( fibaro:getGlobalValue("Awake") == "Yes" )
and
( tonumber(fibaro:getValue(151, "value")) <= 5 )
and
( tonumber(fibaro:getValue(131, "value")) > 0 )
or
( tonumber(fibaro:getValue(149, "value")) > 0 )
or
( tonumber(fibaro:getValue(107, "value")) > 0 )
or
startSource["type"] == "other"
)
then
fibaro:call(269, "turnOn");
setTimeout(function()
fibaro:call(269, "turnOff");
end, 60000)
end
I think it is correct & but the Problem continues -- can anyone tell me what I am doing wrong please or any adjustments to make this scene work only when dark per LUX setting & during the 'awake' variable time-frame..??
Thank you in advance for any guidance or assistance.
Cheers AH.
Please login or register to see this attachment.
2 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.