This object is in archive! 

Four Day Cycle

David Ryan shared this question 6 years ago
Answered

How do I set a vitual switch to turn on for four days then off for four days and repeat forever?

Replies (1)

photo
2

Hi David!

I guess you could do something like this:

693144624d85c6d5cea39eb58099cc41


If you could use Virtual sensor for the daycount, much better. But this option also would work. Hope it helps.


Pablo

photo
1

Thanks Pablo.


I will try your idea with a few changes. The switch needs to turn off on day five and reset after day eight for this to work for me.


I work four days on and four days off so it's an eight day cycle.

photo
1

or just use a simple virtual meter, add 1 every day up to 4 then reset meter to 0. activate switch if meter is less than 4. Pretty much the same as pablo wrote above. You just need to be aware that variables are store locally and virtual meters on the Cloud. So a reboot of your controller will reset the variables to 0, and a disconnection from the zipato servers will not allow you to read or change the value of the v meters.

photo
1

Thanks Adrian I'll look into this.

photo
1

@Adrian


It looks like you were correct in what you said about variables. My zipabox must have rebooted and started my rule all over again on day three. I will have to rethink the rule with meters.

photo
1

How do you add to a virtual meter and how do you reset it?

photo
1

You add virtual meter as a virtual device under option Add new device.

Then the values (i believe up to 20 endpoints can be controlled by HTTP link and also the rule creator.

photo
1

I meant how do you add a 1 to the virtual meter not how to add the meter. Sorry for the confusion.


There doesn't seem to be any documentation on using a virtual meter.

photo
1

Also possible to just 'toggle' the switch every 4 days

photo
1

I'm having no luck trying to get a rule working for this. Could anyone help?


I need something to turn a virtual switch on for four days and then turn it off for four days and repeat forever.

photo
Leave a Comment
 
Attach a file