[RELEASE] Hubitat Package Manager (HPM) -- HubitatCommunity

Haha - got it, thank you!

1 Like

Just FYI - I just ran the repair and it worked - I'm see a dup in the inventory list though.

image

Have you given this a read?

2 Likes

Sorted - thanks again!

1 Like

new problem.. for some reason It wont let me search anymore. any ideas? how do i wipe it and start over, perhaps that is a fix?

Have you read this Topic yet?

3 Likes

I have some parent child apps, often I will only be updating a Child App. Is the release notes section only supported at the package level, or is it possible to have release notes for each of the modules within a package?

Also, do you have any advice on versioning of package\parent\child\driver apps.
Let's say I do an initial release and everything is at V1.0.
Now I find a bug in a child app and I rev that child app to V1.0.1.
Should I always rev the package version with any change to the contents? Or do I only rev the package when I add or delete something from the package?

Thanks, great app and thanks for supporting it. Makes things a lot easier.

HPM simply displays the Release Notes. It doesn't use them. And I think the hint is that it's a "Package" manager :smiley: If 10 items are a Package, then there's one Package Manifest and within, one Release Notes, and so on.

I understand 100% how "we developers" organize and revision our code, but HPM isn't focused in that direction. It's Package oriented not component oriented. HPM does not look into the code itself, it strictly uses the Package Manifest to identify a package that needs updating.

You need only update Package Manifest (whatever you actually name it) to cause an Update. As an extreme example, you could revision your components as v1.0.6 + 1.2.4 + 0.1.2 and so on, for each component.. then in the Package Manifest, revision it as v1000.4.a -- where the relationship is entirely obscure to me... you'd understand it, and the package users wouldn't care. I understand in this example it's MORE difficult to organize, but I'm hoping to clarify the 'no relationship' that actually exists between the code version within the code and the version in the Manifest.

Personally, I update Parent/Child apps independently and when I have a child only code update, the entire package is updated, because a "Package" is the smallest granularity of HPM. (Ignoring Modify, which focuses on components.)

2 Likes

So HPM is only looking at the versions on github and local hub and doing a string compare? If the strings are different then it's an update? The actual version strings are just for us humans.

If the package version changed but none of the Apps or Drivers versions changed would HPM still indicate there was an update available? I'm thinking maybe I'll just go with a perpetually increasing integer for the package version to break any appearance of connection with the app versions.

No.

For Update, HPM loops through the installed Packages, reading in the PackageManifest.json for each, comparing against the internally stored data. (state.manifests)

2 Likes

But it's just a string compare right? As long as the "manifest" version string is different from the "installed" version string it will prompt that there is an update? I could go from 1.4.2 to a.b.c and it wouldn't care?

It's groovy and strings are, as you know, easy by default :slight_smile:

versionStr == installedVersionStr
where
versionStr is from the Package Manifest.json file, either beta version or version.
installedVersionStr is from hub memory of beta version or version.

2 Likes

How do I structure my releaseNotes: tag to allow me to have multiple well formatted lines as shown in the example below.

Don't see any reference to this in the docs but I may have missed it.

Thanks.

I use this site so I can see what I have going on and then the "escaped" output below you copy and paste into the JSON: JSON Escape / Unescape Online - AppDevTools

4 Likes

It's a free format field so.. just count.

"releaseNotes": "v1.9.0 Install 'location:' can't be empty.\n add color to download icon \n take advantage of endpoint for app code list in v2.3.6 \nv1.8.11 merge of: Add support for hub SSL (HTTPS) from kevdliu PR \nv1.8.10 correct File where contents are HTML [installFile() & uninstallFile()]\n fix for default installBundle() (tomw)\n",

For me formatting the HPM note, I count: >v1.9.0 < 9 columns/characters. The next line, to indent properly needs 9 spaces after the \n before the first word. Others may use a different count or method.

3 Likes

IMPO, any indent >= 1 provides sufficient readability as long as it's consistent. An indent of 0, or random/inconstant N, really messes up readability.

2 Likes

hello, HPM gives me this error whenever I open it or do anything:

[app:169] 2023-11-02 06:50:23.949 PM [error] Unable to get the app ID of the package manager

however, HPM works correctly, i can click on that error, it takes me to HPM. HPM will check for updates (will gen error), everything works fine, it just kicks out this error if i do anything in HPM. how can i fix this?

I've tried this a dozen different ways and can't duplicate it.

My logs begin with launching HPM and then clicking Update (without actually updating anything.)

nothing unexpected logs
app:139 2023-11-02 10:01:37.643 PM debug Updates available
app:139 2023-11-02 10:01:35.979 PM info  Checking for updates for Z-Wave Firmware Updater
app:139 2023-11-02 10:01:35.977 PM debug Updates found package for https://raw.githubusercontent.com/HubitatCommunity/HoneywellThermo-TCC/master/docs/HoneywellThermo-TCC.json -> null (force production: true)
app:139 2023-11-02 10:01:35.974 PM debug Updates found for package https://raw.githubusercontent.com/HubitatCommunity/HoneywellThermo-TCC/master/docs/HoneywellThermo-TCC.json
app:139 2023-11-02 10:01:35.570 PM info  Checking for updates for HoneywellThermo-TCC
app:139 2023-11-02 10:01:35.316 PM info  Checking for updates for Aeotec Range Extender 7
app:139 2023-11-02 10:01:35.217 PM info  Checking for updates for Device Activity Check
app:139 2023-11-02 10:01:35.112 PM info  Checking for updates for Hubitat Package Manager
app:139 2023-11-02 10:01:34.856 PM info  Checking for updates for Hubitat-BetterLaundryMonitor
app:139 2023-11-02 10:01:34.853 PM debug Updates found package for https://raw.githubusercontent.com/TonyFleisher/tonyfleisher-hubitat/beta/Apps/mesh-details/packageManifest.json -> null (force production: true)
app:139 2023-11-02 10:01:34.846 PM debug Updates found for package https://raw.githubusercontent.com/TonyFleisher/tonyfleisher-hubitat/beta/Apps/mesh-details/packageManifest.json
app:139 2023-11-02 10:01:34.737 PM info  Checking for updates for Hubitat Z-Wave Mesh Details
app:139 2023-11-02 10:01:34.634 PM info  Checking for updates for Hub Information Device
app:139 2023-11-02 10:01:34.416 PM info  Checking for updates for NTP client
app:139 2023-11-02 10:01:34.299 PM info  Checking for updates for GetAttributeApp
app:139 2023-11-02 10:01:34.132 PM info  Checking for updates for Basic Z-Wave tool
app:139 2023-11-02 10:01:33.859 PM info  Checking for updates for HubConnect_v2_UnversalDrivers
app:139 2023-11-02 10:01:33.576 PM info  Checking for updates for AeotecMultiSensor6
app:139 2023-11-02 10:01:33.319 PM debug Update chosen
app:139 2023-11-02 10:01:08.300 PM info  Refreshing repository list

I guess some basics please? What Hub model and Platform version. What HPM version?

Latest HPM:Screenshot 2023-11-02 at 10.05.02 PM

i am running C-7, 2.3.6.146
Hubitat Package Manager v1.8.3

these are logs for starting up HPM, and then running check for updates. note that i am only starting up HPM once. i dont know why the logs look like i am starting HPM twice:

[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:44.286 AM[error](http://192.168.1.10/logs#)Unable to get the app ID of the package manager
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:44.202 AM[debug](http://192.168.1.10/logs#)Installing HPM Manifest
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:44.100 AM[debug](http://192.168.1.10/logs#)Grabbing list of installed apps
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:42.556 AM[debug](http://192.168.1.10/logs#)No updates available
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:41.134 AM[info](http://192.168.1.10/logs#)Checking for updates for iPhone WiFi Presence Sensor
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:40.818 AM[info](http://192.168.1.10/logs#)Checking for updates for Z-Wave Firmware Updater
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:40.628 AM[info](http://192.168.1.10/logs#)Checking for updates for Inovelli Drivers (Gen 2)
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:40.512 AM[info](http://192.168.1.10/logs#)Checking for updates for Echo Speaks
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:40.376 AM[debug](http://192.168.1.10/logs#)Update chosen
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:21.308 AM[error](http://192.168.1.10/logs#)Unable to get the app ID of the package manager
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:21.222 AM[debug](http://192.168.1.10/logs#)Installing HPM Manifest
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:21.157 AM[debug](http://192.168.1.10/logs#)Grabbing list of installed apps
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:20.993 AM[error](http://192.168.1.10/logs#)Unable to get the app ID of the package manager
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:20.911 AM[debug](http://192.168.1.10/logs#)Installing HPM Manifest
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:20.849 AM[debug](http://192.168.1.10/logs#)Grabbing list of installed apps
[app:169](http://192.168.1.10/logs#)2023-11-03 04:03:20.626 AM[debug](http://192.168.1.10/logs#)Refreshing repository list

i installed HPM years ago. i see from documentation that there is a bundle install now. i believe i just did a copy paste code when i installed. i do not have any bundles installed.

Have you read this topic yet?

It explains that Platform v2.3.6 changed and broke the ability of HPM to read and build a list of installed Apps.

HPM v1.9.0 is the fix. If you are running Platform v2.3.6 or higher, then HPM v1.9.0 is required.

2 Likes