Creating packages
Build your own components and boards — and publish them for any studio to install.
Anything the built-in packages don't cover — a sensor, a protocol, a board —
you can add yourself. A package is a plain npm package with a manifest.yaml: write it, publish it
to a registry, and install it from the studio by its name. (New to packages? Start with
Package.)
Building a component
Actions and triggers in MicroPython, described by a manifest.
Building a board
A board's pins, connection, capabilities and firmware.
The manifest
Every field of a package's manifest.yaml, for reference.
Component or board?
| You want to… | Build a |
|---|---|
| Use a new sensor, display, motor driver or protocol. | Component — its actions and triggers, in MicroPython. |
| Run workflows on another MicroPython board. | Board — its pins, its connection, its firmware. No code. |
How it goes
Describe it
Write its manifest.yaml: the nodes, their settings and what they publish (a component), or
the pins and firmware (a board).
Write the scripts
A component's nodes are MicroPython classes — an HIOAction per action, an HIOTrigger per
trigger. A board has none.
Publish it
npm publish — to the public registry, or to a private one (a local Verdaccio is enough to try
it out).
Install it
Open the studio's store and install it by its package name. A workflow picks it up the next time it runs: the driver compiles what it uses and puts it on the board — no flashing.
Before you publish
- The platform range —
dependences.platformsays which platform versions it works with. - Capabilities — a component that needs Wi-Fi, Bluetooth… says so in
dependences.capabilities, so it's never added to a board that can't run it. - A new version per change — a workflow keeps the exact version it was built with; publish a new one, and update it from the workflow.