Jump to content
  • 0

"Stair switch" how to write a scene


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 post
Share on other sites

15 answers to this question

Recommended Posts

  • 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 post
Share on other sites
  • 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 post
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 post
Share on other sites
  • 0

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 post
Share on other sites
  • 0

Something like this?

 

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

  turnoff

else

  turnon

end

 

Link to post
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 post
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 https://www.vesternet.com/pages/apnt-26-motion-activated-light-with-fibaro-home-center

 

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 post
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 post
Share on other sites
  • 0

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 ? 

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 post
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 post
Share on other sites
  • 0

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