[BETA] Hubitat Package Manager

Figured I'd add my debug on this.

I added the app, and put in my Hubitat user/password, not my local security user/password. At this point it seemed locked into having that user/password. Even enabling Hub Security, creating a user, and putting in that user/password didn't work.

Completely removing the App code - not just removing / re-adding the app - but removing the app, and delete the "Apps Code" - then reload from git worked.

I just installed HPM but its not taking my username and password. I do have Hub Security enabled in Hubitat and have verified my credentials are correct. I have removed HPM, reinstalled, entered by Hub Security password, but still get the same error.

I'm on the C-5 running 2.3.0.124.

On the first page of the HPM app, there is a button at the very bottom named Package Manager Settings. Click it, you should see a page like this:

Do you have the top switch turned on? It must match whether you have Hub Security Enabled on your hub. (I don’t). And make sure the username and password for Hubitat Security match what you enter here.

Actually, I don’t get all those settings when I click the sprocket.

You're looking for the settings section in the app itself--that's the "app status" page that, despite being prominently displayed and with an icon that screams "settings!"--is just a platform-level feature that mostly contains information that might be useful for development or troubleshooting.

This is literally what I see though. It seems I don’t have the ability to access settings.

In your second screenshot, what happens if you hit Main Menu ? Should see this:

Then, scrolling to the bottom, you should see this:

This happens:

That’s a mystery, never seen that. Perhaps you have some sort of database corruption of your hub. Have you tried:

  1. Make and download to your computer a backup of your hub’s database (Settings, Backup and Restore)
  2. Copy the hub’s MAC address to your clipboard (Settings, Hub Details). Then, Soft Reset from the Diagnostic Tools menu (yourHubIP:8081), login, paste the MAC address as the password
  3. When the hub reboots to the Getting Started screen after Soft Reset, click the tiny link at the bottom of the page, and select the backup file you downloaded above as the restore file.

Soft Reset details are here:
https://docs.hubitat.com/index.php?title=Soft_Reset

By the way, rather than typing the hub IP and port 8081 to get to the diagnostic tools, there is a shortcut: Settings, Backup and Restore, click the link a few lines down from the top, above the on-hub backup list (“click here”). You will still need to log in with the MAC address, as described above.

Not sure if this has been asked before.... But can I trigger a switch or something similar (method in the driver) when the driver code is updated, either via HPM or HE natively?

What I want to do ultimately is initiate the download of a HTML file from my GitHub repo as part of the install or update of a package (device driver).

Unfortunately a code change/refresh doesn’t generate an event. Haven’t done it on this platform, but in past lives I’ve put in version checks for dependent modules to issue warnings or force updates; i.e. App loads, checks it’s compatible module versions, and as it loads code from dependent modules it queries them for their version information.

Thinking back to this morning (for me), does the configure not get called? Or is that just the Hub Info?

Configure, if the driver has the capability, will be called when the driver is first instantiated (at device creation); Initialize will get called, again if the capability has been declared, at system restart.

2 Likes

Believe it or not, I have the same exact issue as @alex24x7 . Same screenshots and all. I am new to Hubitat and keep hitting one road block at a time.

Spoke too soon, got it to work. I uninstalled both user app and app code, rebooted hub, reinstalled app code only first, then rebooted again. Only then did I install is as a user app. Now it seems to be working fine.

1 Like

Ok I’ll try this too. I haven’t been able to get it to work.

@sonnaps this process also worked for me

What does an update of an app via HPM do to any events scheduled by the app and to the state of the app? Is installed(), initialize(), or updated() invoked? Is it the same answer whether or not updated via HPM or manually?

It's none of the above, and is the same whether using HPM or doing a manual update.

3 Likes

i get an error for microlines old repository for ecowit stuff. but dont want to remove and reinstall as i have 3 locations with weather stations and at least 30 devices.

i dont see his repository in the list to see which one to uncheck so i dont get the error everytime package manager runs. i even added extra debugging to try and find it.. ie please advise