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
tigrufero 0
Hi guys!
I've recently bought HC2 and started to "play" with it. I've even updated to 3.590 and with some little problems works fine.
I wanted to create a scene in which my motion sensor ID 220 to light up one lamp (ID 56)using one small fibaro dimmer to 100% if light intensity in my motion sensor (ID 222) area is below 500 lux (any value will be just fine) and if another 3 scenes are not active (scene IDs are 20,21,22) and then after 3*60 seconds to light off or if the light intensity on that ID 222 sensor is greater than 500 to close completly (0 % becouse I use dimmer) two lamps (ID 56 and ID 57)
but, if the first condition is true, to close that 2 lamps after 15 mins.
I encountered some small problems which make my scene to be imposible to start:
- I used underline to highlight where the scenes condition I think I need to write but I get an error
[ERROR] 15:10:35: line 16: ')' expected (to close '(' at line 12) near 'fibaro'
- If I use -- so the code is not checked (comments) I get another error:
[ERROR] 14:52:10: line 39: ')' expected (to close '(' at line 38) near '='
I tried to put every condition in its own ( ) also not working and I'm stuck...
ps: Does anyone know how to increase log in time remotly via home.fibaro.com? becouse I need to log in very often...
--[[ HERE IS MY CODE
%% properties
not sure if here to declare 220 value and armed (not yet sure what I need to put in here!)
%% globals
--]]
if (fibaro:countScenes() > 1) then -- HERE IS LINE 7
fibaro:abort();
end
if ( -- HERE IS LINE 12
tonumber(fibaro:getValue(220,"value")) >0 and
tonumber(fibaro:getValue(220,"armed")) >0 and
tonumber(fibaro:getValue(222,"value")) <500
--fibaro:countScenes(20) = 0 and -- HERE IS LINE 16
--fibaro:countScenes(21) = 0 and
--fibaro:countScenes(22) = 0
)
then
fibaro:call(56, 'setValue', 100);
fibaro:sleep(180);
fibaro:call(56, 'setValue', 0);
end
if ( tonumber(fibaro:getValue(222,"value")) >500 ) -- lumina mai mare de ...
then
fibaro:call(56, 'setValue', 0);
fibaro:call(57, 'setValue', 0);
end
fibaro:debug("senzor HL_LI a fost trigerat");
fibaro:sleep(900); -- asteapta un timp
if ( -- HERE IS LINE 38
fibaro:countScenes(20) = 0 and
fibaro:countScenes(21) = 0 and
fibaro:countScenes(22) = 0
)
then
fibaro:call(56, 'setValue', 0);
fibaro:call(57, 'setValue', 0);
end
5 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.