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

"Stair switch" how to write a scene


Alexxxx

Question

Hello.

Please help me write a scene for two wall switch`s.

I`m using two NEO Coolcam light switches. It is impossible to connect them like a "stair switch" so i have to use scene (Associations won't work too).

The goal is to use switches like "stair switches" - turn on with one and turn off with second.

I`m useing HCL.

Link to comment
Share on other sites

Recommended Posts

  • 0

Witam

also two neo and also up/downstairs lights 

never use assoc 

My HC2  used VD now HC3 also use VD/Qa

just syncing two switches 

it’s very easy 

 

 

Link to comment
Share on other sites

  • 0

If you are new to block scenes, have a look at the examples on vesternet.com

 

Some logic that may help:

If the button is pushed AND light is off THEN turn it on

If the button is pushed AND light is on THEN turn it off

Make these two scenes and apply them to both switches 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • I have made some scenes already but i have problem to make this one.

     

    Question to your example : how to make "if the button is pushed...."?

     

    All i can select for the switch is:

    Switch = on/off or different from.

     

    Link to comment
    Share on other sites

    • 0

    Something like this?

     

    If tonumber(fibaro:getValue(yourlightnr, "value") >0 then

      turnoff

    else

      turnon

    end

     

    Link to comment
    Share on other sites

    • 0
    1 hour ago, Twannie said:

    Something like this?

     

    If tonumber(fibaro:getValue(yourlightnr, "value") >0 then

      turnoff

    else

      turnon

    end

     

    HCL. blocks only

    Link to comment
    Share on other sites

    • 1
    1 hour ago, Twannie said:

    you can only  do that with multiple block scenes I think

    bingo!

    ..but i am bad expert in Fibaro block. fibaro block always get on one's nerves me :) 

    Link to comment
    Share on other sites

    • 0

    With multiple block scenes, you can save the light state in a global variable called "LightState". How to create a global variable is in this guide 

    Please login or register to see this link.

     

    Both your on and off scenes should be set to trigger when the switch state is changed ie  "different from" if a toggle, or "on" if a pushbutton...but only one scene will create any action, based on the IF value of the global variable. 

     

    Now, don't forget to include in your scenes to also change the value of the global variable to match the action you just took.

     

    Link to comment
    Share on other sites

    • 0

    Start simple. Create 1 basic scene for 1 switch and once you have that working, expand it. Your two scenes should like this:

     

    The on scene:

     

    (CoolCam1==toggled OR

    CoolCam2==toggled )AND

    (I do not have a coolcam, so can't confirm above syntax)

    LightState==off THEN 

    YourLight = turn on AND

    LightState = on

     

     

    The off scene:

    (CoolCam1==toggled OR

    CoolCam2==toggled )AND

    LightState==on THEN 

    YourLight = turn off AND

    LightState = off

     

    All scenes are set to "start when home centre starts" and "active scene".

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Sorry for late response.
    I`am not able to write this scene.

    I cannot think of how many scenes i should write and what they should look like.

     

    You wrote:

    "Start simple. Create 1 basic scene for 1 switch and once you have that working, expand it. Your two scenes should like this".

    How many scenes there should be total ? Two ? 

    "The on scene:

    (CoolCam1==toggled OR

    CoolCam2==toggled )AND

    (I do not have a coolcam, so can't confirm above syntax)

    LightState==off THEN 

    YourLight = turn on AND

    LightState = on

     

    The off scene:

    (CoolCam1==toggled OR

    CoolCam2==toggled )AND

    LightState==on THEN 

    YourLight = turn off AND

    LightState = off"

     

    I have tried to write those two scenes for "ON" and "OFF" from your example but they don't work properly. Lights are flashing on and off all the time. 

     

    I have added predefined variable "active and inactive"    

    (witch i don`t now how they work) what do they do in these scenes ? 

    Please login or register to see this image.

    /monthly_2020_10/image.png.d93dbe3fcb203c3f64e09b616779cdec.png" />

     

    First of all the only choice i have got for Neo coolcam (called here "przedpokój światło" for light switch one and "przedpokój światło 2" for light switch two) are:

    =, not equal and W

    and ON or OFF.

    So now "toggled" to choose

     

    image.png.8badfb3326222740b3dde4198414fda3.png

     

    I cannot think of how these scene should look like, please help.

     

     

     

     

    Link to comment
    Share on other sites

    • 0

    Witam

     

    can you simple create two scenes 

    1 scene like 

    If swiatlo1 == ON

    then 

    swiatlo2 set ON

    2nd 

    if swiarlo2 == ON

    then

    swiatlo1 set ON

     

    dzieki!

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • This were exactly first scenes i wrote:

     

    if swiatlo1 == ON

    then 

    swiatlo2 set ON

    2nd 

    if swiarlo2 == ON

    then

    swiatlo1 set ON

     

    and

     

    if swiatlo1 == OFF

    then 

    swiatlo2 set OFF

    2nd 

    if swiarlo2 == OFF

    then

    swiatlo1 set OFF

     

    those scenes made my light turn on and off all the time. I had to turn those scenes off.

     

     

    Edited by Alexxxx
    Link to comment
    Share on other sites

    • 0
    On 10/13/2020 at 9:21 PM, Alexxxx said:

    The goal is to use switches like "stair switches" - turn on with one and turn off with second.

     

    The ideas are already above.

     

    A scene with:

    if switch1 then toggle light1 (if on then off, if off then on)

     

    And an other scene with:

    if switch2 then toggle light1 (if on then off, if off then on) 

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • The only choice i have got for Neo coolcam is:

     

    =, not equal and W

     

    and ON or OFF.

     

    So now "toggled" to choose

     

    Please login or register to see this image.

    /monthly_2020_11/image.png.6a81eefcc69332288edbb2c939ccd589.png" />

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks for help. 
    There is only one light and two switches operating this light.
    Switch one called "przedpokój światło" and Switch 2 called "przedpokój światło 2" 
    So how many single scenes ?Two ? 
     

     

    Please login or register to see this image.

    /monthly_2020_11/image.png.af64b5d1902068994d30f30a31391544.png" />

     

    and

     

    image.png.a0f91a2c23b3f10cbcb00bdcd79d9b73.png

     

    ?

     

     

     

    Those scenes don't work properly. Sometimes you have to push the switch two times. 

    Edited by Alexxxx
    Link to comment
    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...