Excessive Hub Load message in app

I have some apps monitoring my sump pump. The output shown below is from an app that is triggered when the pump starts, and loops once per second to increment a counter, so I know how long the pump is running. Usually it counts up to about 8, and then the pump shuts down.
Right now it's not logging in real time. The pump is still running about 8-10 seconds, but the loop counter takes several seconds to start, and it only increments to 1 before the pump shuts down. Right now, I'm not getting a notification in the Hubitat app for excessive load, but as you can see, it is showing in the log for this app. About a week ago I was getting an overall high hub load notification, and so I cloned the app and took out some items to minimize the code. Prior to modifying the app, I did shutdown and restart the hub. I should add that this code had been running fine for 9 months or so with no issues. I'm wondering if this app somehow got corrupted? C7 hub on UPS, no recent power outages. Any ideas on how I can fix this? Thanks!

I am now getting a notification "Hub Load is elevated". If I click on an App to edit it, the editing page takes over 20 seconds to appear.

@rlithgow1 Wondered if you had any advice?

Have you tried recreating it? You could easily copy all actions to clipboard, export, and import to the fresh app. Shouldn’t be too taxing.

Also, I can’t see exactly what you’re doing, but have you tried a different approach, such as a wait for condition and timeout, and/or variable math to calculate the run time?

1 Like

Post the rule.. you may have a busy wait snd it could be rewritten better?

No clue...Other people in here are better qualified to dissect rules...

Here's the rule
The trigger is a time, hub variable.
Sump Pump on is a hub variable.

Select Trigger Events (ANY will trigger)

Variable reports SumpHiPwrT1(1680294431) increased

While (Variable SumpPumpOn(false) = true(F) [FALSE]) Repeat every 0:00:01

Set SumpRunDuration to (SumpRunDuration(1) + 1)

END-REP

IF (Variable SumpLongRun(false) = true(F) [FALSE]) THEN

Notify Pixel 6: 'SRD Sump Pump was running for %SumpRunDuration% seconds but has now stopped(SRD Sump Pump was running for 1 seconds but has now stopped)'

Set SumpLongRun to false

END-IF

i am not sure what you are trying to do.. to get run time.. just set a trigger when the pump starts.. log the time in a variable..

set another trigger when it stops also log it in a variable and subtract.. should get the seconds.. no looping etc needed.

I once had a problem where the level switch stuck and the pump didn't shut off. I don't think your method would warn me that the pump is running too long. Need some sort of a loop to do that. Just a reminder that this rule ran for 9 months with no issues at all. I think I may try to build another duplicate rule and delete this one.

that would be another rule.. again without loop..
ie trigger swith on. and stays that way for 1hr..

action: alert.

I think the problem has been resolved.
Thanks @brad, I created a new rule with the same logic and a slightly different name, then deleted the original rule. The high hub load is now gone. I think somehow that rule got corrupted. I had tried something similar earlier by cloning the original app, but I think the cloning must have brought the corruption along with it. Thanks also to @kahn-hubitat, you made me re-think my looping, I've now reduced it to every 10 seconds, I don't need to be super accurate, just need to know when the pump is running too long.

3 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.