Jump to content

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


  • 0

Problem with scenes SOLVED


Question

Guest sk8er000
Posted

hello,

I've update to 1.047 to 3.517 and something is working wrong..

for example i've this kind of scene to turn on the light on the kitchen in the evening with a FGS221 Switch 2x1,5kW:

Everyday at 18:00 (at exact time)

and

ligh 1 = off

and

light 2 = off

then

light 1= on

this simple scene was working well on 1.047 but now in 3.517 if I try to manually turn off the light from the switch the light turns off and immediately on again...If I deactivate the scene the light turns off..

Someone knows what's wrong?

thanks in advance

10 answers to this question

Recommended Posts

  • 0
Posted

Check if autostart is deactivate.

  • 0
Guest sk8er000
  • Inquirer
  • Posted

    if it's the field: "Start when Home Center 2 starts" yes i've tried to uncheck it but the problem remains..

    for the hc2 this scene means: at 18:00 when the lights are off turn on the light 1 and leave it on forever..

    I only need to turn on the light at 18 but I also need to turn it off manually later

    • 0
    Posted

    Everyday at 18:00 (at exact time)

    and

    light 1 = off

    and

    light 2 = off

    then

    light 1= on

    for Hc2 that mean (if scenes is active and checked option Start when Home Center 2 starts)

    if its 18:00 and light1 and light2 is turn off then turn on light1 on forever

    so if you turn off light1 and is still 18:00 then it's gonna turn on that light again

    • 0
    Guest sk8er000
  • Inquirer
  • Posted
    Everyday at 18:00 (at exact time)

    and

    light 1 = off

    and

    light 2 = off

    then

    light 1= on

    for Hc2 that mean (if scenes is active and checked option Start when Home Center 2 starts)

    if its 18:00 and light1 and light2 is turn off then turn on light1 on forever

    so if you turn off light1 and is still 18:00 then it's gonna turn on that light again

    understood but this scene was working with 1.407, I've unchecked option Start when Home Center 2 starts but the problem is still there. what's the right setting to turn the light on at 18:00 and have the possibility to turn it off manually when i need?

    thanks in advance and thank youfor your hard work

    • 0
    Posted

    sk8er000, can you go to that scene check option "covert to lua" and copy and pastle it here? (don't use save batton)

    • 0
    Guest sk8er000
  • Inquirer
  • Posted
    sk8er000, can you go to that scene check option "covert to lua" and copy and pastle it here? (don't use save batton)

    i've tried again with more attention:

    if scene is active and "Start when Home Center 2" also now 12:38 so before 18:00 when I click save, with both lights off, light 1 turns on.

    then

    if I turn off the light 1 with light 2 on ---->light 1 turns off

    if I turn off the light 1 with light 2 off---->light 1 turns on and then turns on again

    here's the LUA (not saved):

    --[[

    %% properties

    6 value

    4 value

    %% globals

    --]]

    local sourceTrigger = fibaro:getSourceTrigger();

    if (sourceTrigger["type"] == "autostart") then

    while true do

    local currentDate = os.date("*t");

    local startSource = fibaro:getSourceTrigger();

    if (

    ( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "18:00") )

    and

    ( tonumber(fibaro:getValue(6, "value")) == 0 )

    and

    ( tonumber(fibaro:getValue(4, "value")) == 0 )

    )

    then

    fibaro:call(6, "turnOn");

    end

    fibaro:sleep(60*1000);

    end

    else

    local currentDate = os.date("*t");

    local startSource = fibaro:getSourceTrigger();

    if (

    ( (currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) )

    and

    ( tonumber(fibaro:getValue(6, "value")) == 0 )

    and

    ( tonumber(fibaro:getValue(4, "value")) == 0 )

    or

    startSource["type"] == "other"

    )

    then

    fibaro:call(6, "turnOn");

    end

    end

    • 0
    Posted

    ok use that code for lua scene it will work how you want

    Please login or register to see this code.

    • 0
    Guest sk8er000
  • Inquirer
  • Posted

    Thank you very much, I'll try it as soon as I come back home and I'll let you know if it works!

    Just a question for the future:

    Is it possibile to make this kind of scenes with blocks interfacce?

    • 0
    Posted

    yes and no

    yes you can do scene in block but will work like your prv scene then you must covert it to LUA and then edit it (delete part with else)

    • 0
    Guest sk8er000
  • Inquirer
  • Posted

    OK thank you for the tip, so next time I'll need something similar just create the scene in blocks interface, convert in lua interface and erase the part with else

    Please login or register to see this image.

    /emoticons/default_icon_biggrin.gif" alt=":-D" />

    [ Added: 2013-03-21, 18:05 ]

    thank you A.Socha it works!

    Please login or register to see this image.

    /emoticons/default_icon_biggrin.gif" alt=":-D" />

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