Periodic Trigger NOT Firing

Hello,

I have a weather station that locks up and needs to be rebooted occasionally. I have the outlet switch set up and I can manually reboot the weather station as needed. However, I really want it automated. I set up a rule with a periodic trigger and selected 0, 15, 30, 45 assuming that's what would run it every 15 minutes with a condition that it hasn't updated in the last 10 minutes, but it never triggered. Then, based on some documentation I stumbled across, I changed it to a Cron string, and it still won't fire. Here is what it looks like now:

When I notice the weather station has locked up, I look and I can see the condition is true so the rule should be firing to restart but it never does.

Any ideas what I'm doing wrong or another approach to rebooting my weather station?

As a side note, Ecowitt is sending a replacement under warranty. Hopefully it is just a bad station, and I don't really need this but would still be nice to have since I have other rules set up to shut down my A/C when it is too cold outside and stop watering when the weather turns bad. So, I still need a reliable method of restarting it if it stops reporting.

What do the logs show?

1 Like

This is what the rule log shows:

image

The device only shows events where I have manually turned it off and back on again.

What is the rule's Required Expression? It's evaluating as False, so the rule will never run.

2 Likes

This is what the condition looks like:

It does evaluate to true when the weather station locks up and stops reporting.

It would be helpful to see the log when the required expression is true.

1 Like

That condition is clearly currently being used specifically as a conditional for the Trigger, but did you (at some point) have that same conditional as a Required Expression for the rule?

Edit to add... Anyway, the point is that your rule thinks there is a Required Expression in play and it thinks it's False... There's a (hopefully rare) bug some of us have noticed lately where an old (but no longer used) Reqd Expression continues to haunt a rule -- I'm wondering if that's what's happening here too.

1 Like

I did start with trying a required expression. Based on your statement, the theory is that if I delete the rule and re-create it, it should work?

1 Like

I think so - that's what I'd try anyway

1 Like

Thanks. I'll give that a shot and let you know what happens.

1 Like

You can also go in, turn the required expression back on, delete all entries in the requried expression (using the edit function), and then turn it back off.

I deleted the rule and rebooted for good measure. Now I'm trying to recreate the rule. I set up the periodic trigger but the condition won't re-create the way it was before. This is how I had it set up before and it evaluated to false as long as updates were happening and then it would evaluate true when the station stopped responding:

Now I can't get it to do what I had before. Maybe I'm taking the completely wrong approach.

I want a rule that detects when the weather station has not updated for ten minutes, turn it off and then back on again.

I'm obviously doing something wrong but I don't know what.

I'm not familiar with your station but couldn't you just look at temp or humidity and make sure it updates every so often.

I can see temperature and humidity among other values, but the condition wouldn't know if it changed or not recently without looking at the last update date/time.

Trigger
temp changes.

Action
wait for temp change with a timeout.

If it times out turn switch off and then back on.

The required expression issue was the problem. I have it all working now.

Thank you for your help!

3 Likes