#home-automation #add-on #registry #publish #cli #api-bindings #ohx

bin+lib ohx-addon-publish

This is the CLI to automate building and publishing an OHX home automation addon

1 unstable release

0.0.1-preview Sep 19, 2019

#29 in #add-on

MIT license

43KB
832 lines

Addon Registry Commandline tool

OHX CLI Logo

Build Status

OHX is a modern smarthome solution, embracing technologies like software containers for language agnostic extensibility. Written in Rust with an extensive test suite, OHX is fast, efficient, secure and fun to work on.

This is the repository of the command line utility to publish Addons to the OHX Addon Registry.

How to get started

The tool does the following:

  1. It validates your addon.yml Addon description file.
  2. Checks your login status. If not logged in yet, you will be redirected to https://openhabx.com/auth where you can create an account / login and grant the CLI access to your account.
  3. If the registry
    • contains an Addon which matches with the addon-id of the current directory,
    • but you are not the owner, the procedure will be aborted.
  4. The CLI builds your Addon for the architectures x86-64 and armv7 (raspberry pi 2+3) and armv8 (raspberry pi 4) via the Dockerfiles found in the directory of the addon.yml file.
  5. Uploads the container images to the docker.io container registry.
  6. Updates your addon.yml file to point to the uploaded images.
  7. Adds or updates your addon to the OHX Addon Registry.

Cross compiling for c / c++

One way is to use qemu (via a software container) and let the entire toolchain run under the target architecture:

sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Dependencies

~13–29MB
~422K SLoC