Issue with complex multi-conditional setup

I have 10 automated shades in my sunroom. I use PLEG to close and open them based on x hours before or after sunset etc. The goal is to close some shades depending on if the sun is beaming in on that side of the room. This works no problem.

My issue is that when the weather is no good and the sun is not shining, I want all of the shades open. If the weather turns good then I want to resume my normal open/closed schedule. I used the weatherunderground plugin and created a PLEG condition to look at the grouped wx condition. This worked perfectly, well too perfectly. I poll the wx every 3 minutes. Sometimes the status would change from cloudy to sunny every 3 minutes. This caused the shades to go up and down and annoyed my wife lol. So… I didnt want to change the polling on the wunderground plugin because I use the temperature for other conditions in other scenes and would rather have more current data.

So… I wanted to have the wx status be true for 15 minutes before the condition became true. The only way I could do this was this way:
1st condition:
cWxBad tCloudyOvercast OR tWxFog OR tWxRain OR tWxSnow OR tWxThunderstorm OR tWxFreezingRainSleet OR tWxMostlyCloudy OR tWxFlurries OR tWxHaze

Then my second condition that uses the first one (I couldn’t combine them for some reason)
cWxBadFor15Min cWxBad AND (cWxBad; Now > 15:00)

Finally my third condition to open all the blinds if the wx is bad (the lockout is a vSwitch to defeat the condition if I want to)
cOpenAllShades_wxNotClear pSunRoomLockoutStatus==0 AND mHome AND sSunriseToSunset AND cWxBadFor15Min

This seems to work OK. The problem is when the wx turns back to clear. (I added the repeats but I am not sure if this was the right thing to do Also cWxGoodFor15Min follows the same logic as the cWxBadFor15Min condition above except it has different wx triggers)
cCenterShadesClosed_wxClear Repeats pSunRoomLockoutStatus==0 AND mHome AND s3hrPastSunrise_to_30minBeforeSunset AND cWxGoodFor15Min

The wx was flip flopping back and forth today and at several points I checked these three conditions individually and they were all true and had previously been false
pSunRoomLockoutStatus==0 --true
mHome --true
s3hrPastSunrise_to_30minBeforeSunset --true
cWxGoodFor15Min --true

But the cCenterShadesClosed_wxClear remained false??? I can’t figure it out, each individual portion was true. I added the repeats functionality but that didn’t change anything right away, not sure if I needed to let the schedule be true again or not. The only thing I changed is the “being true for 15min”. It works fine if it evaluates at the “top” of the schedule.

I thought about using cWxGoodFor15Min and !cWxGoodFor15Min instead of 2 separate conditions but want the status to be true for 15min before any action happens. So basically it has to stick with that status for 15 min and if it flip flops the 15min starts over again.

Is there anything obvious I am missing? Is there an easier way to do all of this? I know I am chaining conditions together in like 3 layers so I dont know if that is an issue.

Any help would be appreciated!

Some bad news for you. WeatherUnderground is closing soon so will need to find another way to poll for the weather conditions you need.
Search this forum for further info.

As far as your conditions, it would help if you post a Status report, although you have it working you just want to tweak it, so it’s going to be a matter of playing with it until it works the way you want it to.
The centre blinds problem I would think is caused by a hidden character that has sneaked into the condition. There was a similar PLEG problem a couple of days ago that was solved by re-writing the condition.
http://forum.micasaverde.com/index.php/topic,115916.0.html
Try rewriting it into a new condition (don’t copy&paste) and see how you go.

It’s pleasing to see your method for blind control, I use outside awnings, however once the temp hit’s 26C then they all go out. I don’t bother bring them in until dusk. Blinds are different, so I see your problem and how you thought your way around it.

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules