Help for newbe who wants to put a custom device driver into the public domain

I am all new to HE after 10 years on Vera. I have developed a device driver for Hikvision cameras that I would like to put on my public github repository and release to the world. This will be my first time releasing anything I've written to the world.

Key question I have is: What do I need or what can I get away with in terms of a License statement? Do I need to quote the Apache 2.0 license like I've seen in so many other public drivers? Or can I get away with a simple statement like this: "Copyright 2022 me, This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation", which I have seen in others?

And then, do I simply post it out here with a BETA or RELEASE topic? And elsewhere perhaps?

Just looking for some guidance. Are there any guidelines that you can direct me to? Thanks!

Github encourages you to put a LICENSE file (along with a README.md) in your repository. Then at least reference that in the body of your code. I would call that 'standard'. You can do far less but if you really wish to allow the code to be used by others, you must say so. Your example would be fine. No License SHOULD mean it's not to be used.

As to distributing the code, as you suggest, just making a Topic here is enough. However, most developers have come to rely on the community developed Hubitat Package Manager. That 'investment' will need you to create 3 JSON files, details at the website, linked.

5 Likes

There is also a wiki with a list of Community supported devices, which may be worth updating:

2 Likes

I would say not just developers but users as well, some users only like to install from HPM, and may not know how to install the code manually.

4 Likes

A simple license and HPM it is. And the wiki too which I found earlier. Lots to learn... thanks guys

2 Likes

ps... just didn't expect it to be so much. The HPM json structures are easy to build but ONCE AGAIN, the doc assumes you know what do with them, using terminology that makes no sense. So the first thing I have to do is a "manual Pull" to get me into the master? Ok, well, how do I do that? I have no experience with this. The doc assumes all developers are well versed in json and the github world. So once again, I'm sure its super easy and all I need are some good examples of how to get the job done.
Help! :slight_smile:

I would suggest you 'start from the end." :slight_smile:

Create the PackageManifest.json first. (Call it anything, but PackageManifest is common.) It's the json that tells HPM what you define as the package. Might be one file, might be a hundred, split between driver code, app code, files and bundles. Put that file adjacent to your source code. That provides you the Location you will need for the next file: repository.json or repo.json. Anything you want to name it, but a variation of repo is common. This file is YOUR collection of Packages, pointing to the PackageManifest for each. Finally, with the Location of your repo.json in hand, create the change that you want added to the Master Manifest. It's two lines inside some json braces. The name you want and the location of the repo.json

There's a cute little package to assist with generating HPM json files:
HPM Manifest Generator or install it via HPM.

Also the developer section of HPM's documentation will send you to:

for another tool to create the json files.

2 Likes

This is all excellent information, thank you. So I'll be getting myself well versed in HPM and json soon enough and looking forward to it. Because I think my Hikvision camera driver has some potential for becoming a built-in after some time spent in Community, perhaps with some professional massaging first. It also provides a working example of an HTTP GET/PUT XML app using the HE/Groovy httpget/put methods, thanks to all the help I got out here!

But first, I need to get some real world beta testers to see if there's anything I missed and catch the bugs before I go Community. So I'll be posting a topic in Custom Drivers soon to introduce my new Hikvision Actuator for Input Alarms and Motion Detection, with links to the code and User Guide in my public github rep.

2 Likes