Sunrise / Sunset Bug in 2.2.3.145

@gopher.ny Don't want to continue to pester but any update? I continue to see issues - old & new. Is hub gone bad (I only have had it for 4 months). I just created a new rule (motion rule) and it continues to fail every now & then on & off. Sometimes the rule works and sometime it doesn't. Here is the new rule that I created:

Here are the rule logs:

Device (LED Strip) Logs:

Motion Sensor Logs

These logs aren't really useful. What you label as "rule logs" are device logs.

Please turn on logging in the Motion Lighting app, and show those logs when it fails.

So tonight I noticed things all over the place not working. When I went into one of the rules, even though I have all logging turned on, no events showed up in the log and in fact, no new events have been added to the device log for months.

When I Look at the main logs, I see a lot of these:
dev:892020-09-23 11:34:00.494 pm errorjava.lang.RuntimeException: java.sql.SQLException: Connections could not be acquired from the underlying database! (parse)

app:3332020-09-23 11:34:00.478 pm errorjava.lang.RuntimeException: java.sql.SQLException: Connections could not be acquired from the underlying database! (motionHandler)

app:6832020-09-23 10:59:00.511 pm errorjava.lang.RuntimeException: java.sql.SQLException: Connections could not be acquired from the underlying database! on line 7069 (allHandlerT)

dev:892020-09-23 10:40:37.753 pm errorjava.lang.RuntimeException: java.sql.SQLException: Connections could not be acquired from the underlying database! (heartbeat)

dev:762020-09-23 10:40:37.704 pm errorjava.lang.RuntimeException: java.sql.SQLException: Connections could not be acquired from the underlying database! (parse)

Here are some screen shots for context...

This looks ripe for a hub reboot. If that does not cure the issue, next step is soft reset. Here's a "best practice" approach to it:

  • Take a backup, and download it locally (just in case).
  • Perform a soft reset in the Diagnostics Tool. DO NOT DO A FULL RESET - that will clear radios.
  • Restore from the latest backup (one you've just taken). If you don't see backups listed immediately after soft reset (we saw it happened a few times), reboot the hub, and it will pick them up.

Time jumps will be addressed in 2.2.4 firmware update. There's no built in battery, but huge jumps into either future or past will be detected. Hub time might still be off until proper time sync, but not by years.

The logging is already enabled. Here is the output:

The event at ~9:33 failed to turn the LED on whereas the motion was triggered at 9:32:13. The device logs says that LED was already on, but it was not.

Then the same rule worked just fine at 9:54

If you look at the second log, where you have the red arrow, just above that (later) it explains that it is not turning on the light because it thinks the light is already on.

You can override this with the option under Options for On called 'Do turn on if already on':

Thanks for the assist. I turned that config 'on' and will monitor. But isn't it still is issue that it thinks that light is on when it is not really 'on'?

Here is a simple one that I caught that is not triggering. The logging was turned off on it. I just turned logging on, and I bet that will "fix" the issue.

Just look at the App Status page and see if there is a Schedule Job at the bottom, for 7:30 AM tomorrow. App Status page is gotten to by the gear icon upper right in the app, or to the left of the app in the Apps list.

Oh, and turning on logging won't make it work, but throwing salt over your left shoulder should do the trick.

Keeping the joy going, here is yet another of my Mode apps, that is not working:

Nothing in the App Events

Here is the App status page

Last time the LED 1 & LED 2 turned on were >8 days ago, also looks like something went bonkers on 20th for LED 1 & 18th for LED2 respectively, there are dozens of events on those respective days

You are misunderstanding the purpose of this app. It doesn't turn things on or off with mode changes. Its purpose is for switch activated lighting to be set to an appropriate level per mode when the switch is activated. You don't even have an activation switch selected. But, that's irrelevant -- you need a different app. Take a look at Simple Automation Rules.

Haha, Thanks. So far the automations that did not work started working again as soon as logging was enabled.

Here is the screen shot for scheduled job:

QED.

How could turning on logging make it work when it won't even run until tomorrow morning? Don't overdue the salt, it makes a mess.

2 Likes

I don't know about this one. I am just saying that the simple automation rules that were broken for more then a week when I started this post all started working again when I turned logging back on, which is why I did not continue to post until I found something else that stopped working.
It is like observing the issue changes the outcome.

Nice theory, but it just has no factual basis. Don't want you spreading misinformation. Turning on logging in any of the apps has no impact on whether or not they work -- none.

1 Like

Ha, ok! What I need one light to turn on first and others to come on a few second later. Simple Automation will not allow that. Will write it in RE. Thanks for the assist & pointers!

Ok, just wanted to point out what started to make it work again. The other 10 or so rules I found that were broken all started working as soon as I enabled logging. So far I have used this method to fix the rules that no longer run. I don't know how this could just be coincidental as every time I find a rule that is broken, enabling the logging fixes the issue. This rule has been broken for weeks, but I just caught it. I turned on logging today, so we will see if it works correctly tomorrow.

Except this is not what made them start working again. Did you hit Done after turning on logging? If so, that's what made them start working, not turning on logging. Hitting Done refreshes an app, renews its subscriptions and schedules.

4 Likes

Ok, that info is good to know, and was not brought up before. So basically "Touching" the app is causing things to start working again. No reason to upset at me about it. I'm just trying to provide info on what is and isn't working to help you guys figure out what is going wrong.