Find all pistons with messed up devices

Hi @thebearmay,

I just installed the webCoRE Device Audit app. My process was to import the webCoRE Device Audit into my apps section and then create a user app for it. After running the app, I waited for about 3 minutes, but it was still spinning, so I began working in another browser tab. Then I accidentally closed my browser. When I reopened Hubitat and tried to access the webCoRE Device Audit again, it just kept spinning without loading, and eventually, I got the following error:

Unexpected Error
An unexpected error has occurred trying to load the app. Check Logs for more information.
Error: begin 22266, end 21883, length 33312

The only log I see related to this is:
app:8422024-08-31 01:58:38.051 PM error java.lang.StringIndexOutOfBoundsException: begin 22266, end 21883, length 33312 on line 183 (method mainPage)

A few notes:

  1. After importing the app, I didn’t authenticate it since I didn’t see that mentioned as a requirement in the forum.
  2. I’m running the user version of webCoRE, not the Hubitat version.
  3. My Hubitat hardware version is C7.
  4. Platform version: 2.39.176
  5. webCoRE versions:
  • webCoRE v1.0.95 (app)
  • webCoRE Fuel Stream v1.0.95 (app)
  • webCoRE Piston v1.0.95 (app)
  • webCoRE Storage v1.0.95 (app)
  • webCoRE Graphs Tile Device v1.0.95 (driver)
  • webCoRE Presence Sensor v1.0.95 (driver)
  • webCoRE Weather v1.0.95 (driver)

I’m a bit stuck on how to either get this working or uninstall it now that it won’t open. Any guidance you could provide would be greatly appreciated!

Thanks so much,
David

To remove an app in that state, go to the apps list, click on the cogwheel, and then click remove when the app status page comes up. App only reads the main app status and the piston status pages, and has been tested with the current versions of the built-in and community editions on firmware 2.3.9.166 - 2.3.9.176. Current version is v0.0.6 and should require a button push to start processing.

If it keeps occurring let me know and I’ll put in an exception catch and try to catch the particulars.

Hi @thebearmay,

Thanks for the quick response!

I followed your advice and deleted the app. After verifying that I have version v0.0.6 installed, I recreated the user app and clicked the “Generate List” button. The loading circle next to "Hubitat Hub" kept spinning for about two minutes, so I left it open in a separate tab. Shortly after, my hub reported a “Hub Load is Severe” message. Before I could address it, I encountered the following error:

Unexpected Error
An unexpected error has occurred trying to load the app. Check Logs for more information.
Error: begin 22266, end 21883, length 33312

The log showed:
app:843 2024-08-31 02:42:52.517 PM error java.lang.StringIndexOutOfBoundsException: begin 22266, end 21883, length 33312 on line 183 (method mainPage)

Afterward, the hub stopped reporting the “Hub Load is Severe” message.

I then tried opening the app again, and it showed “Please wait, loading app webCoRE Device Audit...” for about 3 minutes before producing the same error:

Unexpected Error
An unexpected error has occurred trying to load the app. Check Logs for more information.
Error: begin 22266, end 21883, length 33312

I’d be happy to test it with the exception code. Just let me know when it’s uploaded, and I’ll run it again.

Thanks,
David

v0.0.7 is in GitHub

1 Like

I upgraded the version and then It took about four minutes to open the app before logging the following:

app:843 2024-09-01 09:03:20.712 AM warn method mainPage of app webCoRE Device Audit ran for 222,685ms
app:843 2024-09-01 09:03:20.664 AM error begin 22266, end 21883, length 33312

After that, I selected "Generate List," which ran for about two minutes but didn’t seem to find anything. The same errors appeared in the logs:

app:843 2024-09-01 09:08:25.465 AM warn method mainPage of app webCoRE Device Audit ran for 221,718ms
app:843 2024-09-01 09:08:25.458 AM error begin 22266, end 21883, length 33312

Interesting. Looks like I have something out of order. The first error shouldn’t have generated before the button is pushed.

v0.0.8 is up - splits the catch into 3 pieces. Still not sure why you are getting the error, but this change should let you run to completion.

1 Like

tried V0.8 and it did not find the one I created... thx again for your work on this!!

image

I can't seem to recreate your situation to test. I do have a small that can capture the pages I need for this if you wouldn't mind running it and send the resultant files delimited by ``` in a PM.
The source for the app is at: https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/pageSave.groovy

It's sole function is to read the page and save it as a .txt in the File Manager; file name will be in the format PS9999999999999.txt.

The pages I need to see are the Status page for the main webCoRE app and the Status page for the Piston. URL's should look like:
http://<hubIPaddress>/installedapp/status/<appID>
For the app to run correctly since we're pointing at the hub itself change the URL to use port 8080, i.e. http://<hubIPaddress>:8080/installedapp/status/<appID>

it was not clear how to download a file from the file manager..I opened up the file and copied it to a notepad++ file and messaged it to you.... not sure if there is a better way

Thanks, I’ll try to take a look at them in the next couple of days.

2 Likes

@thebearmay

Cool! Thank you for this!

1 Like