[BETA] Hubitat Package Manager

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

A question about versions of our package that we want to publish in HPM; apologies if this is answered somewhere up in this long thread that I couldn't find.

Am I supposed to use the main/master git branch for all of the references in all of the config files? The examples that I can find mostly use main:

  1. The reference in a package manifest to the groovy file for the app/driver
  2. The reference in the repository file to the package manifest
  3. The reference in the canonical repositories.json to each repository

To me, it seems like at least 1 and maybe also 2 should reference versions: the package manifest should reference the git-tagged version of the groovy file corresponding to the manifest version, and the repository file should reference the newest git-tagged version of each package manifest. But that's not what I've seen when I looked a bit.

Can someone please confirm what best practices are? And, if you're so inclined, explain why as well? Thank you!

EDIT: @jtp10181's post below points out why what I posted won't work. So I deleted my post to avoid any confusion.

Interesting, you don't see anything if you search under Ecowitt in HPM?

@joshr The URL to the package manifest json (2) file is read from the main repository json when the package is installed, and cached in the HPM app with no way to force it to update it. So you will want to use a link that stays always pointing to the newest file. The link in the package manifest that points to the individual files (1) is read when you go to do an update, so this could be a changing url in theory but most people just use the direct link that always points to the newest file.

3 Likes