Simple Automation Rule just stopped working

It's not been reliable enough for me to count on it yet. Hopefully this export/import of the db will solve my issues.

So I did the export/import and it kinda worked for a bit and now this week the outside light rule and the foyer light rule (both of which are basically turn on a device at 30 mins before sunset and turn off the device at either 23:00 or 23:59 depending on the rule) just simply do not turn on the devices. It's a mixture of Z-Wave and Zigbee devices. ALl of the devices work from the hub if you manually choose them, but none seem to work via the rule. Am I doing something wrong? This is VERY frustrating to have something work without having to think about it for months and now I cannot get it to work consistently.

Have you updated to 2.3.7? There was significant memory improvements in that build. Then you can also do a reboot with the "Rebuild" option selected to rule out any database issues left over from 2.3.6.

Also, show us the rule.

I have seen in the past rules with waits in them fail on the second part when the hub is overloaded with poorly coded wifi drivers / apps that keep hammering TCP connections when devices are offline. Usually this generates a lot of errors logs. So it would also be a good idea to review the past logs, you can even filter it to warn and also error, to see if anything stands out.

1 Like

On 2.3.7.145. Just did another export/import/reload to be safe.

I also have a fairly complex rule that runs when I open my back patio door and it works perfectly fine. So just not understanding why these rules just stop working for no apparent reason.

I don't have that many rules. :slight_smile:

:point_down:

Check the logs as I suggested up above.

Also, you can click the gear icon for those rules, and look for the scheduled jobs. I think the way that rule is made you should have two scheduled jobs on each.

Everything seems to have worked today, likely because of the reload last night. I see the turn off scheduled job for tonight and the turn "on" for tomorrow. The logs show that the devices were turned on today. This should have fired yesterday at around 17:17, but there is no record of it even trying. :frowning:

Its also possible the schedules did not get created for some reason, so if you opened the rule and press done it re-creates them. If it fails to work again, before opening the rule at all, open the "gear" from the apps list and see if one of the scheduled tasks is missing.

Everything seems to be back to normal at the moment. I rarely make changes to my system, is there a way to prevent this from happening in the future?

If the issue happened while running 2.3.6 I suspect your hub was running out of memory. That was addressed in 2.3.7 and the memory is very stable over time so the hub should able to run much longer between reboots / issues. Maybe the schedules got lost somehow and in the troubleshooting you opened the rules and pressed done, which would re-create them.

Happened again tonight, the outside light rule said it ran, but didn't. GRRRRR!!!!!!

Should be the 1st one at 17:20. The other is the foyer light and it did come on.

So the app logged that it triggered but the light did not react? Check the event log on the light and see if a command got logged triggered from the app.

I turned it on myself at 18:36 (from the app), but the device never fired at the 17:20 timeframe like it should have.

On the device page, go to the events tab at the top. That gives more information than the hub logs. It will show if the automation called the command or not. That will tell us where the problem is, with the automation or the device. I will need to see before and after the problem spot, all columns.

Looks like the rule fired but the device "ignored" it? On the 12th it received a command but didn't turn on, but on the 13th it did? I think I'm reading that right. Seems to be a problem after the weekly reboot, so I disabled that since the reason I put it in place was to keep the unit from freezing up when the memory filled up (and 2.37 supposedly fixes the memory issues). More to come.

Yes I think you are mostly right.

  1. Worked as expected, command-on folowed by device reporting it turned on.
  2. On 1/11 command-off was sent, device did not report back that it turned off. It may have never turned off, or possibly it did turn off but the reply never made it back to the hub.
  3. On 1/12 command-on was sent. Possibly the device was already On from the failed off command the day before, in this case the device could have reported that it was on but it would not show in the event log since the state was already On.
  4. After that it looks like it got back in sync and worked normally.

One workaround when you have stubborn devices like this is to have a rule that sends the commands twice. You would need to use a different app though, like Basic Rules or Rule Machine.

Here is an RM example for my outdoor lights, I have a second command delayed 10 seconds.

Also, somewhere there is a new-ish lighting / sprinkler scheduler app someone made, it looks pretty slick. It may have a feature in it to make sure the lights react. Trying to find the post for it.

Found the app, not sure if it will help or not

Not trying to jinx it, but worked fine last few nights (since I removed the "rebooter" app). I'll keep y'all posted.

Its working.... can add new stuff if needed