[RELEASE] Error Monitor - Keep an eye out for errors that may pop up in the log

Things still seem to be acting up for me. May be best if I explain what I understand the function to be and what is happening. It may be that I am simply misunderstanding the expected function.

First off, I have one app with a flaky API so it is putting out the same error several times a day. Makes it great for testing this out I guess. :man_shrugging:

I get an error...notified by push

That turns the switch on in the child device and therefore no more pushes will be sent but errors will continue to be logged in the device.

I have the "allow duplicates" option turn on.

I've been turning the switch off when I receive notifications in order to allow notifications to continue.

here's the issue that I think I have....

There comes a point that I think I am no longer receiving notifications but they are still going to the device. If the switch is off and duplicates are allowed, shouldn't I still be receiving pushes?

Are you hitting the 'Max number of repeat errors' described in the first post?
What are you seeing in the log? Without a debug log I don't know what is going on with your setup.

On another note, If an app is throwing the same error several times a day, then the app needs to be fixed. At the least it should log a warning that something is wrong, rather than constantly throwing errors.

I have the same issue... app cannot be fixed. It is the honeywell home api app and fails several times a day but.then works fine on the next try
Their apis are just crap just like their older apic.

1 Like

Any app can be fixed. It shouldn't error out. There should be code in place to gracefully handle the condition, not just crash and burn.

I just checked and I have a new error. The child device shows it. The switch is off (was and still is) but I was notified.

I thought I had debug on but I guess not. I turned it on now and hopefully I'll catch something useful.

I'm really sorry for the word vomit and making it sound like I'm just having problems.

well in my opinion it should show the error it is an error and it does not crash and continues on.. so not sure what you would do.

I’m still seeing exceptions in makeList. It’s odd that it says listSize is 11, but then throws an exception saying that listSize is only 10.

Edit: when looking through the state for device, it looks like it’s having trouble parsing the errors like this:
Ambient Weather API::04/13-17:25::groovyx.net.http.HttpResponseException: status code: 401, reason phrase: Unauthorized on line 150 (method fetchNewWeather)

which gets parsed into this for bpt-logData:

Ambient Weather API - 04/13-17:25 - groovyx.net.http.HttpResponseException: status code: 401
reason phrase: Unauthorized on line 150 (method fetchNewWeather) - NoData - NoData

New version...

app:
1.0.4 - 04/15/22 - Added option to ignore same error repeating and repeating and repeating...

driver:
1.0.7 - 04/15/22 - Took another crack at makeList, added 'useSafety' feature

2 Likes

Again, appreciate all you do!

1 Like

Honest question: what’s the purpose of these two lines? I think this is causing the incorrect parsing behavior I mentioned above, and it seems to be joining and then immediately splitting unnecessarily.

This is actually old code from another app I wrote a couple years ago. I'll take a look.

Okay, break it again... :grin:

driver:
1.0.8 - 04/15/22 - Minor mods

2 Likes

What about this instead? It removes the split(",") statement that is causing the parsing issues with my particular errors (which contain additional commas in the text of the error message).

I can see the importance of this code if Hubitat was flattening the list to a string when storing it in state, but it seems to be maintaining it as a list, even when stored and retrieved.

1 Like

BOOM!

1.0.9 - 04/16/22 - For the love of commas!

4 Likes

Nice teamwork! :slight_smile:

1 Like

I can't pause the app, every time I use one of the sliders, the one at top or the one under app control, I get an error and I have to remove and reinstall the app to get it working again. Is it just me or are others having this issue.

I get this error. Running latest hub firmware 2.3.1.139 and error monitor 1.0.4

java.lang.IllegalArgumentException: Command 'close' is not supported by device 715. on line 116 (method pageConfig)

Whoops!

1.0.5 - 04/17/22 - Fixed typo

2 Likes

Thanks for this - trying it out.
I have a request, but if I'm the only one in the world (I probably am), then don't sweat it -
I like my switches Normally Off. I would like to use the Enable/Disable switch as ON to DISABLE monitoring. I would have just done it with a rule, but don't seem to have access to pause/resume with this app in rules. Can a toggle be added to the driver?

Pretty sure that's the way it works now.

Oh, then nevermind. :blush:

1 Like