SmartThing CLI Edge Driver Packaging

I see in the public repo, that there is a GitHub action to upload drivers. I was surprised to see that it wasn’t using the SmartThings CLI: .github/workflows/upload-driver-packages.yml

This step is the most interesting since it doesn’t use the CLI:

- name: Package the driver
working-directory: ${{ matrix.driver }}
run: |
zip -v ${{env.package_key}}.zip config.yml fingerprints.yml search-parameters.yml $(find . -name ".pem") $(find . -name “.crt") $(find profiles -name ".yml") $(find . -name ".lua”) -x “test

“Package the driver” is just a zip call that selectively selects files to be zipped. This list coincides with the docs on driver structure: Driver Components and Structure | Developer Documentation | SmartThings

The only additional files grabbed are pem and crt files. I presume that is some sort of signing that only applies to platform level drivers.

Questions?

  • Is the pem and crt support only for platform drivers? I don’t see docs for it. How is it used?
  • Is the CLI just zipping the driver? Can we just zip drivers in our own pipelines rather than requiring the CLI?

Did you know that you can output a zip file?

smartthings edge:drivers:package -b driver.zip my-package

Create a driver.zip and examine its content.

1 Like

Did some digging and I think I found answers. Just would like confirmation from ST

How are pem/crt certificates used?
Based on the codebase, the certificates appear to be for:

• Encryption/signing of driver communication with protected devices (notably in Matter lock drivers)

• Credential handling for ALIRO readers (door locks with advanced authentication)

• Device-to-driver authentication for OEM devices that require certificate-based validation

Is the CLI just zipping the driver?
Yes - it can optionally assign drivers to channels and install to hubs via --assign, --channel, and --hub flags

Can we just zip it?

Core functionality is just zip → upload

It can push a pre-zipped driver with smartthings edge:drivers:package --upload driver.zip

Yes. I just wasn’t sure if there was anything else the CLI did to the zip files it creates. Based on the GitHub action, doesn’t look like it.

1 Like

Hi @blueyetisoftware

The engineering team has confirmed the following information.

1- They are used for communication for some device types, but it’s not related to Matter locks.
2- You can do the zipping on your own if you like, but we recommend letting the CLI do it for you.

Perfect. Thank you very much. I am working on a tool that allows drivers to use and package third party libraries. This is helpful information.