[BETA] Hubitat Package Manager

My hub has locked up also. Following advice above I did a repair on Package Manager and it seems okay.

Still trying to get my HPM to work. I tried to install a new app through it today and got the same problem as before. It freezes on the page that says. "Installation in progress. Please wait..."

Backed to the previous page and got this error message if it gives you any clue:

Unexpected Error
An unexpected error has occurred trying to load the app. Check Logs for more information.
Error: Cannot get property 'location' on null object

And the log says:

app:2612021-03-25 22:34:54.290 errorjava.lang.NullPointerException: Cannot get property 'location' on null object on line 521 (prefInstallChoices)

Are you on the latest version? 1.8.1?

I am

What are you trying to install?

Package Explorer. But trying to do other stuff like update apps, repair any random app or repair HPM itself gives me the same result.

if you open the App Code for Package Manager, in the comments at the top of the file it says 1.8.1?

It does (I manually unistalled it and then reinstalled it a couple of days ago to achieve the latest version).

Match up works though.

I think it’s working now. I did a soft reset of my hub and now HPM seems to work again.

1 Like

Far from trying to disturb the master (you @dman2306!) development, I'd like to suggest the following process:

a) everytime a developer submits a package, a hash (MD5 hash, for example) would be created for every file in it;

b) this hash could be calculated by the first user that downloads a new version of an app/driver (or simply runs HPM) and stored at a central repository (where and how to store it is up to the master ... :smile:);

c) similarly, a hash is calculated for each app/driver stored in the user hub, with the last app/driver update date+time;

d) this local hash could be calculated everytime an user asks for a HPM action (any); HPM checks all app/drivers MD5s; for the app/drivers that do not have a hash stored, create and store it locally; if it has been changed (by comparing the last update date+time), update the corresponding hash;

e) finaly, compare the local hashs with the central hash repository instead of comparing files directly: this comparison will tell which app/drivers have changed/need update/machup, etc.

This way, HPM won't download files unless absolutely necessary.

Of course, every solution has its tradeoffs:

a) the first hash calculations would take some time;

b) a lot of hashs would be calculated for files that are not managed by HPM; not a big deal, I think;

b) user processing power would be used to calculate the MD5 when a new package is detected; somehow it should be acknoledge by the user.

HPM is growing - with merit! Its a very, very nice piece of software and, IMHO, should be adopted by every developer here.

And, to finish ...

"For every problem, every programmer have a different solution" - popular IT saying ...

3 Likes

Yep.

3 Likes

OK, HE rookie here (though not new to this, have spent my fair share of time in the ST IDE). How do I install this package manager on HE? The instructions on Git do a great job of showing how to use it once it's installed...but I seem to be missing the part that explains getting it up and running. Likely just an HE learning curve for me, just turned mine on for the first time 5min ago.

Do this:

  • In HE under "Apps Code" click on "New App"
  • Paste the app code in there and hit save, then click on oauth and enable oath.
  • You can save again, don't know if that matters.
  • Go to "Apps", click on "Add User Apps" and add the app... it should be there.
1 Like

Much appreciated, thank you! Assuming the code I need to copy/paste is in 'hubitat-packagemanager/apps/Package_Manager.groovy'? Apologies for being so daft, lol, I guess I'm just used to the ST IDE where you point it at a repository and click go.

You should be able to create a new app in Apps Code and import from:
https://raw.githubusercontent.com/dcmeglio/hubitat-packagemanager/master/apps/Package_Manager.groovy

Or, open that link and copy/paste. That's the raw code link.

1 Like

Thank you both, got it installed and now installing WebCORE....man this is nice! What a great utility you've made here, really appreciate it.

1 Like

So I'm running into an issue with HPM. When I go into Apps I see the name followed by 'Updates Available' in bold green text. When I click on the app, I get the following error message.

Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I'm not sure where this error message is coming from. In the past I've been able to click on and interact with the app. This is my first time seeing the updates available message and first time getting this error. I don't know how many upgrades I've done between the last time I was in HPM and this error showing up.

This error shows up using Chrome or Firefox. I'm running Hubitat version C-7 running 2.2.6.130.

Thanks for any guidance.

After upgrading to 2.2.6.133 HPM is working as expected again.

1 Like