Overview
The information below is intended for app and driver developers who wish to use Hubitat Package Manager to provide your apps and drivers. Two things are needed, each package must provide a manifest and you must provide a repository that lists your packages. A small little tool called Hubitat Package Manager Tools has been provided which assists in the creation of these files. On Windows simply run the hpm.exe --help to get help, and on MacOS and Linux run ./hpm --help
Package Manifest
The package manifest is a JSON file that lists the apps and drivers that are part of your package. A recommendation when versioning your packages is to use SemVer. This will ensure that the Hubitat Package Manager is always able to detect updates properly. You can either version the entire package as a whole, or each app/driver can be versioned, but don't mix-and-match within the same package.
{ "packageName": "My Package", "minimumHEVersion": "2.1.9", "author": "Dominick Meglio", "version": "1.0", "dateReleased": "2020-04-07", "licenseFile": "", "releaseNotes": "", "apps" : [ { "id" : "67d9cc01-a5cb-453c-832a-e78c5a6b978b", "name": "The App", "namespace": "abc.theapp", "location": "https://raw.githubusercontent.com/app.groovy", "required": true, "oauth": false } ], "drivers" : [ { "id": "22597029-98db-490b-b8b9-c23b972ee5f2", "name": "Required Driver", "namespace": "abc.reqdriver", "location": "https://raw.githubusercontent.com/driver1.groovy", "required": true }, { "id": "e012ffff-7959-466b-a2ae-3181a33010f9", "name": "Optional Driver", "namespace": "abc.optdriver", "location": "https://raw.githubusercontent.com/driver2.groovy", "required": false } ], "files" : [ { "id": "9eb61fd9-1538-4162-b3f0-9440b5418a2d", "name": "myFile.js", "location": "https://raw.githubusercontent.com/file.js" } ] }
Commands Used
hpm manifest-create packageManifest.json --name="My Package" --author="Dominick Meglio" --version=1.0 --heversion=2.1.9 --datereleased=2019-04-07 hpm manifest-add-app packageManifest.json --location=https://raw.githubusercontent.com/app.groovy --required=true --oauth=false hpm manifest-add-driver packageManifest.json --location=https://raw.githubusercontent.com/driver1.groovy --required=true hpm manifest-add-driver packageManifest.json --location=https://raw.githubusercontent.com/driver2.groovy --required=false hpm manifest-add-file packageManifest.json --location=https://raw.githubusercontent.com/file.js --name=myFile.js
Repository File
The repository file is another JSON file that can be created using the Hubitat Package Manager Tools. This lets you list all of the packages you have available in your repository. When assigning a category to your packages please reference the list below.
Categories & Tags
Categories are being phased out in favor of tags. A complete list of categories and tags can be viewed at
https://raw.githubusercontent.com/HubitatCommunity/hubitat-packagerepositories/master/settings.json
If you need additional tags because the existing ones don't cover your use, submit a PR against this file.Publishing your Repository
When your repository file is ready to go, submit a Pull Request against
https://raw.githubusercontent.com/HubitatCommunity/hubitat-packagerepositories/master/repositories.json
which includes the name of your new repository and the location of your repository JSON. Once your pull request is merged it will become available to all Hubitat Package Manager users.{ "author": "Dominick Meglio", "gitHubUrl": "https://github.com/dcmeglio", "payPalUrl": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7LBRPJRLJSDDN&source=url", "packages": [ { "name": "Package 1", "category": "Integrations", "location": "https://raw.githubusercontent.com/package1/packageManifest.json", "description": "This is Package 1" }, { "name": "Package 2", "category": "Convenience", "location": "https://raw.githubusercontent.com/package2/packageManifest.json", "description": "This is Package 2" } ] }
Commands Used
hpm repository-create repository.json --author="Dominick Meglio" --githuburl=https://github.com/dcmeglio --paypalurl="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7LBRPJRLJSDDN&source=url" hpm repository-add-package repository.json --manifest=https://raw.githubusercontent.com/package1/packageManifest.json --name="Package 1" --category=Integrations --description="This is Package 1" hpm repository-add-package repository.json --manifest=https://raw.githubusercontent.com/package2/packageManifest.json --name="Package 2" --category=Convenience --description="This is Package 2"