Step switch problem?

Jacob Wiqvist shared this problem 8 years ago
Known

I have created this rule:


fad35a90843de41df7c5a6961c648ac9


This rule works so that every time I press one of the remote control buttons or wall switch, connected to the Qubino dimmer or a virtual switch the light level in the living room jumps to one of the 4 values.


This give me fast 3 different dimmer values with the same wall switch.


But the problem is that when I turn of the dimmer with the other wall switch the variable "CIRCLE" dose not recognize that and when I push the second wall switch it jumps to next variable witch end up in that it could be level 0% or 100% on the dimmer depending on when I turn of the dimmer and turn on the "states".


(This works perfect)

For example if the dimmer is off and I:

Press the number 2 wall switch= the lights go to 20%

Press the number 2 wall switch second time= the lights go to 35%

Press the number 2 wall switch third time= the lights go to 100%

Press the number 2 wall switch fourth time= the lights go to 0%


(But if I turn off the dimmer with wall switch number 1)


For examel if the dimmer is on with 35% and I:

Press the number 2 wall switch= the lights go to 100%


(But if I turn off the dimmer with wall switch number 1)


For examel if the dimmer is on with 100% and I:

Press the number 2 wall switch= Nothing happens because the variable jumps to value "1" and number one is 0%


Simply I want the the value to be dependent of dimmer level so when I press any switch the level goes to the next level.


If the dimmer have 10% and I press the number 2 wall switch, the dimmer will go to 20%

And if the dimmer is 0% the next value will be 20% if I press the number 2 wall switch

This means that I can dim the light how ever I want to a exact value and when I press the second wall switch it will jump to the next "VALUE(light level)"

Pleas help someone that think more logical than me!

Replies (34)

photo
1

What about adding a set of if before incrementing circle to check if current value of circle is coherent with dimmer intensity and set it?


I mean something like:


If intensity = 0 then circle = 0

Else if intensity = 20 then circle = 1

...

Increment circle

photo
1

Will try this, thank you!

photo
1

I'm not sure to get the point of what you are trying to achieve.


If I understand correctly now the step switch works correctly but you want that if you shut down the light with dimmer switch at the next press of "step switch" or "dimmer switch" the light starts from latest intensity.


So if you set intensity to step 3 with "step switch", then you shut down with dimmer switch (so intensity goes to 0). At the next press of "step switch" or "dimmer switch" do you want that intensity goes to value assigned to step 3?


Is this correct or do you expect a different behavior from "step switch" and "dimmer switch" after turn off?

photo
1

You understood correctly!


And I never want a state where you press a switch and nothing happens. for example you press step switch to variable 4 and then turn of with the dimmer and press step switch again and nothing happens because it jumped to variable 1.


This works except that it starts at 20% after light off, and I have to cycle threw the stages(variables)!


Or if there's better ways of controlling the lights. Found this: https://forum.z-wave.me/viewtopic.php?f=3424&t=20106


Best regards Jacob!dab47fb77b4e5502d24bd34655d5b164

photo
1

Ok, so I think that if you change a couple of things it may works.


First of all you need a new variable to store current intensity, let's call it "LASTINTENSITY".

As the very last step of your rule you have to set "LASTINTENSITY" to the value of "QUBINO INTENSITY".

Now you have to use this variable for initials IF in substitution of "QUBINO INTENSITY".


If everithings works as I think now you have a step switch that always starts from last selected value.

photo
1

Lets ese if I understand what you mean?


Is this the first step? But then variable LASTINTENSITY folows the dimmer Valu?

photo
1

Now you have to use this variable for initials IF in substitution of "QUBINO INTENSITY".


Can you explain this better. How should this block lock?

photo
1

I mean that now you have to modify initial 4 IFs as follow:


from

IF "QUBINO INTENSITY" BETWEEN 0 AND 2


to

IF "LASTINTENSITY" BETWEEN 0 AND 2


and so ON for the others.

photo
1

Sory does not work!

photo
1

Mmh, could you try to add a "refresh all" block prior of "LASTINTENSITY" = "QUBINO INTENSITY"?

photo
2

Sory not working.... out of ides?


And the lights jump to litle strange?

photo
1

If I have to make everything in another way or smarter way I will do that. With many rules an so on I can do that if someone have some good Ides.


But simply a rule that remember the last dimmer stat before the light was turned off. And set a variable so it is possible to use this variable in other rules and so on.

I don't know what is the best way of configure everything with lights, but you want as fast as possible to turn on a scene. If time change and everything have bin off motion sensor will set another scene and so on.


You never want the lights to turn on unintentionally or off.


That have bin problem with Fibaro multi sensor for me. Lights start in the middle of the night when went to bed. And lights turn off when watching TV. And you don't want the lights to be on more than 20-40 seconds when you go to bed. At the moment it is just experimenting with functionality.


But if someone could share there philosophy with lights it would be nice. And how it works. And If you got over unintentionally light goes on or off!


I have ordered microwave sensor from ebay and will experiment with that. What sensors are there except for the normal, IR, LUX, TEMP and so on?


Is ther ULTRA SOUND, or microwave sensors, proximity or something like that?

photo
1

I think that the problem is that "last intensity" is not setted correctly by zipabox.


The only workaround that I can figure is to explicitly set "last intensity" to "qubino intensity" in each if and remove the final set.

What I mean is:


IF circle = 1

"qubino intensity " = 0

"last intensity" = 0


And so on for other IFs.

photo
1

But what will happen if I set the dimmer to 55%? Will intensity set variable to 4 and last intensity to the same if I turn the lights off? Any chans you can try this?


Best regards?

photo
1

If you set the dimmer manually to 55% (i.e. using mobile app) and want that, after turning light off by dimmer switch, it will turn on with CIRCLE = 4 you will need a second rule like this:


WHEN QUBINO INTENSITY > 0

IF QUBINO INTENSITY > 2

LAST INTENSITY = QUBINO INTENSITY

photo
1

Check with you if you men like this before I change everything?

photo
photo
1

Hi Jacob,


just a little change, I mean that inside each circle IFs you set last instensity to the instensity that you are setting to the dimmer.


I.e. the first second circle if must be


If circle = 2

Qubino intensity = 20

Last intensity =20


And so on.


Does it works?

photo
1

Something like this?

photo
1

Only starts at 40% now.... ????

photo
1

Mmh but all initials IFs block that check "last intensity" are still present?

I see onlybnow that in your previous screenshot are missing

photo
1

No I removed them should put them back?


But did I do wrong buy adding the "LASTINTENSETY" to the IF states that set the dimmer?

photo
1

Yes, put that IFs back.

Adding last intensity where you set dimmer intensity is correct.

photo
1

Like this?


But is the values right betwen rule 26-29?

photo
1

I dont want to try to much things when at work, with the girlfrind at home.


But when you say it is ok I will try the viritual switch! "STEPP SWITCH"

photo
1

End of rule!

photo
photo
1

Just another thing, all that additional rules that starts when qubino intensity is greater than 20, 40 etc must be deleted. You must keep active only the one with qubino intensity > 0.

photo
1

Rules 27, 28 and 29 must be deactivated

photo
1

Last 2 block of main rule must be deleted (refresh all and last intensity = qubino intensity).

Then leave active rule 26 and deactivate rules 27, 28 and 29.

After that you can have a try with virtuale switch.


If it doesn't work we will continue tomorrow

photo
1

like this?

photo
1

Yes!

Finger crossed

photo
1

So nice of you...


Like this

photo
1

First try it worked.... super duper thank you!


Will try more tomorow!

photo
1

Hi again! After some testing I it did not work as planed, it only goes to 20% then 40% then 20% then40%. If turning of it goes to 20% I think!

photo
1

Does it works using just "soft start"?


Because last four IFs are outside first IF that check switch state, so all the firsts check are executed only if soft start is pressed...

photo
1

Hi Jacob,


I've tried to simulate your setup using a virtual switch and a virtual level control and I created attached rule.

It's behavior is:


  • every time you switchon virtual "step switch" virtual level control goes to next step 0 -> 20 -> 40 -> 100 -> 0
  • if you manually set a value at the next switch on of "step switch" level goes to next step. So if you manually set dimmer to 36 at the next switch on it goes to 40.
  • if level is at a step level (20, 40 or 100) and you manually set level to 0 at the next switch on the dimmer goes to last value (20, 40 or 100)
  • if you manually set a value different than step level and you manually set level to 0 at the next switch on of "step switch" level goes to previous step. So if you manually set to 36 and the manually set to 0 at the next switch on level goes to 20.

I hope that this couple of rules works also for you.

photo
1

Lights go off every 15 minuts.... girlfrind furius :-)


And it never go to 100 % and it jump betwene 40 and 60 every time switch is tuched. from on two off. I have bi stable switches?


It should only be afected when toggle on not when switch go to off possision? Does that work for you?

photo
1

I hade to turn the rule off not to upset the house....

photo
1

Found an error but dont dare to test.


!= should be = in one IF statment!

photo
1

The rule doesn't contain any sleep of 15 minutes so it's very strange that lights go off.

The rule that I attached works with a virtual switch that act like a bistable switch and state change only when I turn on.


I've tested the rule for each of the behavior that I've described.


The only thing that I can suggest is to manually set dimmer level to an intermediate level (i.e. 35%) at the very first test to be sure that circle and last intensity are initialized correctly.

photo
1

I have heard that al rules are read every 15 minutes and that maybe the any state is running the rule again? But it is just a speculation.


Will try it again when I get home!

photo
Leave a Comment
 
Attach a file