[BETA] Hubitat Package Manager

I'm thinking of a "Repair" option as well, just like installers usually have. Basically just reinstall the whole package if you screw soemthing up (like I just did with Ecobee Suite due to a bug in HPM)

3 Likes

Wouldn’t solve my problem, thanks for trying.

This is tracked as issue #70

This has been great! Appreciate the effort. Any thoughts to disable the buttons before they should be useable? It seems like “Next” is always available even when you are in the middle of a function like updating. Going back might be normal but moving forward isn’t typical while something is executing or refreshing on screen.
Thoughts?

-Travis

Thanks, Hubitat does not provide a way to disable the Next button. However, there is no harm in clicking it. If you click it it just reloads the current page.

1 Like

For anyone using the hpm.exe, I did a little more reading on .NET Core (Core is new to me, sorry!) and found a way to make it so you do NOT need to install anything other than the exe and run it. I released version 1.2.2. Because it's now a "once and done" there are three different downloads, one for Windows, one for Mac, one for Linux. Release hpm-1.2.2 · dcmeglio/hubitat-packagemanagertools · GitHub Note this will NOT run on an rpi (I only compiled for x64, not arm, if that's a problem for anyone let me know). I tested the Windows and Linux (on Ubuntu) and all I had to do was run either hpm.exe or ./hpm (after chmod) and it worked without installing anything else. If there's someone out there with a Mac (@bertabcd1234 think you tried Mac before?) it'd be cool if someone could let me know whether or not that works. I don't own a Mac!

What’s the exe?

It's a tool for the developers to generate a packageManifest.json more easily

omg. Thank you! I literally just went through updating all the ecobee suite before I found this referenced in one of the things I was updating. Thank you!

1 Like

This looks very useful, but how do I install it in Hubitat? I am new to Hubitat. I have been able to add new apps and new drivers, but I have yet to figure out how and where I add the Package Manager. Thanks.

1 Like

It gets added as an App in the Apps Code section. Then Add User App in the Apps section. There is a setup screen to go through, and it's possible to choose additional apps/drivers for it to manage/install.

It is beta software, so if you aren't comfortable with adding the Package_Manager.groovy code to Apps Code, it might not be time to try this yet. It should make installing/updating user apps/drivers much easier, though!

1 Like

OMG! Where have you been my entire Hubitat Life! This software has been sorely missing in Hubitat. Love this tool and I am hopeful that more developers adopt it. I think like the sales guy that I am so naturally I am trying to think how we promote use of this tool on the forums for all developers. I will try to do my part. I am adding it to my forum signature and everyone should do the same. That’s a start.

Donation has been sent. Great work!

LJ

EDIT: oops no forum signature available. that's seems weird. this software must allow it. Do they have it turned off?

Thank you, Brian. That's what I thought, but the URL that I used for import, did nothing. Could you also please let me know the URL for import? Elliott

The import URL is the raw code URL:
https://raw.githubusercontent.com/dcmeglio/hubitat-packagemanager/master/apps/Package_Manager.groovy

It comes from the "Raw" link on GitHub.

3 Likes

Well that worked! Thanks. :blush:

1 Like

Okay, here's something I've been working on. There are a dozen directions it could go in, but right now it's been helpful to me personally so I thought it'd be worth sharing. Feedback welcome. If it's all hate mail, I'll still end up using it for my own stuff.

https://hubitat-package-manifest.herokuapp.com (functionally blank homepage) will generate package manifest files for projects on github, like this:


reasoning and caveats


There are a bunch of packages out there which aren't likely to publish manifest files because they're not doing ongoing maintenance.

I'm hoping that in the long term everyone will add a manifest file with their release post to the forums. But I'm also pretty sure that there's going to be less than 100% adoption.

So what I put together is a little api integration with github which will (take a stab at) generating a manifest file for a package.

This comes with some caveats:

  • Broadly, this is pretty early stage software. It's a prototype at best right now.
  • The file unique identifiers are a simple hash of the filename, but that's likely to be different from whatever a package maintainer selects as a uid.
  • Since there's no way to "unmatch" the installed plugins, the only way to unlink a plugin from Hubitat Package Manager is to uninstall the Package Manager or the plugin.
  • The manifest files generated currently have no required files -- everything is optional because there's no way for me to guess what's required and what's not.
  • Generated manifests are cached for 10 minutes. The Github API is rate limited, and this is deployed using my personal token so be gentle. Each manifest lookup requires N+1 api calls, where N=the number of .groovy files.

That said, I have something similar pointing some of my packages to their github sources so when things are updated I can one-click-update (or auto update!).

If you want to browse the code, it's posted here it's written in Crystal.


manual


The home page is blank, so you'll have to read this in order to make it work.

Simply take the github username and repository (and subpath, if needed) and add it to the application url:

https://hubitat-package-manifest.herokuapp.com/g/<username>/<repository>

or

https://hubitat-package-manifest.herokuapp.com/g/<username>/<repository>/subpath for those monolith projects -- though I believe most of the contributors prolific enough to have that kind of structure have probably added manifest and repository json files to their own stuff.

5 Likes

I have a bit of an issue, I ran the package manager and it says it has 3 apps to update, so I selected the first one only and it ran through and did the update. Then I ran the package manager again and it says there are now 2 updates to do which is correct. The problem is when I select either of these or both together and select update a blank page shows up with just the box DONE. If I run the package updater again it shows the same 2 updates still available.

Could you include the logs?

I went into the logs on the Hubitat and ran it again and this is all it showed, nothing after the last checking for updates for the Flasher

app:1292020-04-29 18:47:04.213 infoChecking for updates for The Flasher

app:1292020-04-29 18:47:03.874 infoChecking for updates for Hub Rebooter

app:1292020-04-29 18:47:03.519 infoChecking for updates for One at a Time

app:1292020-04-29 18:47:03.176 infoChecking for updates for Life360 with States

app:1292020-04-29 18:47:02.824 infoChecking for updates for Hubitat Package Manager

app:1292020-04-29 18:47:02.498 infoChecking for updates for Matthew (@scottm61)

app:1292020-04-29 18:47:01.712 infoChecking for updates for OpenWeatherMap-NWS Alerts Weather Driver

--- Live Log Started, waiting for events ---

Hmm could you try again? That makes it seem like it's waiting for a response from github. Maybe I need to add some more error handling on failed requests.