This object is in archive! 

Inoperative rule - roller shutter closure based on virtual weather station sunset

Erokani shared this question 3 years ago
Need Answer

Hi all,


I've been trying and playing around for some time now, without success. I need your help to understand why it does not work.

I'm trying to launch the closure of my roller shutter, if not already closed, if sunset is passed, and during a period of the day.

This gives rule enclosed. It does not work, and I could not understand why.

Could you please help?

By the way, is there any way to debug a rule?? o_O

Thank you in advance

Mat

Comments (8)

photo
1

What is the scheduler set for (time or astro)?


First I would not over complicate the rule, keep them simple. Just create 2 rules, one triggered on sunset, the other by a time variable. No need really for a time between either unless it misses the time event for some reason, just use the scheduler again to set a time for 17:30. You only need a time between variable when something else changes state between these times, such as a light level.

Though I would personally create a separate rule for triggering a virtual switch for sunset and sunrise. this way you can use this switch to activate many different rules.

Also I dont see a need to have the check "if the blinds are not at 0 position" just set them to 0. If they already at 0, they are not going anywhere anyway.

Good luck.

photo
2

I agree with Adrian, do not over complicate rules, they're harder to debug. Also I would recommend you to split the rule, and since sunset/sunrise is something we could potentially use in many rules, instead of having a scheduler for every one I have created a virtual sensor "Daylight" which I'm going to turn ON at sunrise and turn it OFF at sunset, and then I would just use this sensor in any rule that I want.


See attached rules, I did add the OR just because the scheduler with astro depend on internet connection, if for some reason I loose my internet connection, the scheduler with time will take care of it (times are set to aproximately one hour after the average sunset/sunrise at home). If you do this you will see that this rule becomes much more simple.

photo
1

Hi gents,


Thank you very much for the advices, it's appreciated.


I tried to follow them, and played around as far as possible to make it works, but it still doesn't!

I'm lost... :-(


See enclosed rules.


Could you please help me make this working??....


Thank you in advance

photo
1

again, why do you have some many schedulers? Try and keep things simple. Have you tried the rule based on a time puzzle. very simple to find where the problems are occuring. When "time now "equals select a time, then the action puzzles. Have you also tried to group the blinds so you dont need so many action puzzles. Or try just a sensor or switch in the sensor block and try activating the rule. Then expand and add you other sensor devices such as virtual sensors or scheduler.


I dont know which puzzle is causing it to not operate as I do not know all the factors for each scheduler or virtual sensor you have set.

Why didn't you just try the example we posted for you? Then expand on them.

photo
1

Hi Adrian,

I should have come back to this thread earlier.

I had a ticket opened for another subject, and while fixing it, Zipato support also unlached something else which allowed recovering the rules. They are well working now (like described above).

Nevertheless I slightly simplified them since, see enclosed.

Thanks again for your help. It's all working like a charm now! :-)

Cheers,

Matthieu

photo
1

I should mention that the "sunset" and "sunrise" values in the Zipabox weather device don't actually contain any values, as far as I can gather. Rather like tempMaxC and tempMinC, they're always 0.

So your first rule never had a chance, for that reason alone. :-)

photo
1

After some more investigation, the "sunrise" and "sunset" values in the Zipato weather station seem, in fact, to be strings. If I copy those values to a virtual meter and try to compare them to other date values, they always behave as 0. If I send them to an email, the reason becomes clear. This is what I see (the description in brackets were added by me).


19:36 (Sunset)

08:25 (Sunrise)

They're not numerical time values at all.

photo
2

The comparison with sunset in the original rule should work if you use

hour of (sunset)

rather than just sunset, because "hour of" seems to cast it to a valid time value.