First

This Manfest is located where you can change it at will. The Package Manifest defines one full package of components, which is any mix of Drivers, Apps, Bundles or Files. Some are optional and will result in the user selecting the options.

{
        "packageName": "AeotecHEMGen5",
        "releaseNotes": "v0.1.4   Tiny bit of cleanup.",
        "documentationLink": "https://community.hubitat.com/t/beta-release-aeotec-hem-gen5-2-phase-driver/60053",
        "communityLink": "https://community.hubitat.com/t/beta-release-aeotec-hem-gen5-2-phase-driver/60053",
        "author": "viertaxa",
        "version": "0.1.4",
        "minimumHEVersion": "0.1.4",
        "dateReleased": "2020-12-27",
        "category": "Control",
        "tags": "Lights & Switches",
        "drivers": [
           {
                  "id": "b8f0f07a-557a-4379-99df-1ad05cbfa382",
                  "name": "AeotecHEMGen5",
                  "namespace": "HubitatCommunity",
                  "location": "https://raw.githubusercontent.com/viertaxa/hubitat/main/Drivers/AeotecHEMGen5-2-Phase/aeotec-home-energy-monitor-gen-5-2-phase.groovy",
                  "required": true,
                  "oauth": false,
                  "description": "A more preference filled alternative driver."
           }
        ]
}

In the above sample, it's clear that the format is two parts, a Package details part and then "drivers" or "apps" or "bundles" segments. Each segment points to the actual code, GitHub is a common storage but not required.

./hpm repository-create PackageManifest.json --author="Dominick Meglio"

Then one or more of these:

./hpm manifest-add-app PackageManifest.json --location=https://raw.githubusercontent.com/someuser/hubitat-app/master/app.groovy
./hpm manifest-add-driver PackageManifest.json --location=https://raw.githubusercontent.com/someuser/hubitat-app/master/driver.groovy"
./hpm manifest-add-file PackageManifest.json --location=https://raw.githubusercontent.com/someuser/hubitat-app/master/file.groovy

The minimum packages pairs when manually creating are:

  • "packagename":
  • "author":

Within each package segment, the minimum packages pairs when manually creating are:

  • "id":
  • "location":
  • "category":
  • "description":
"id": is needed per package and is a standard UUID but isn't required in the intermediate manifest.

Finish

Be certain your JSON is perfect using some type of checker. jsonlint is recommended. Broken JSON will result in your package being ignored or quarantined.