Plugin guide
This guide explains how the parts of the SDK fit together and when to use each one, one topic per page. It is for looking things up: read the pages you need, in any order.
New to plugins? Follow the tutorial first; it builds a complete plugin step by step. For a compact list of every signature see SDK at a glance, and for the generated API pages see the reference.
Understand the model
| Page | Read it when |
|---|---|
| How Nexus sees a plugin | You have never seen a Nexus plugin: what runs where, and which files a plugin has. |
| The lifecycle of a plugin | You wonder where a piece of code belongs, or why something runs again. |
| The plugin class | Always: what the class declares, what the instance gives you, what you can override. |
Describe what the user sees
| Page | Read it when |
|---|---|
| Config: what the user fills in | You add a setting, a Test connection button, a Find button, or change the settings' shape in a later release. |
| Sensors | You carry a value from the device to Nexus. |
| Actuators | You carry out a command on the device. |
| Catalog | The device can list what it has, so users pick signals instead of typing ids. |
| Panel and actions | The user needs facts about the device on the instance page, or a button there. |
Run reliably
| Page | Read it when |
|---|---|
| Starting, failing and degrading | The device can be unreachable or a login can be wrong. |
| Lifetimes, timers and time zones | You start a timer, listen to an event, or work with the time of day. |
| Logging, store and status | You tell the user what happens, or keep a token or cursor across restarts. |
| Webhooks | The other system pushes to you. |
| Watching signals | Your plugin receives values instead of offering them (an exporter). |
| Limits and rules | You look for a number (a time, a size), or for the short list of rules. |
Also: Values (the types a signal carries), Testing and Publishing a plugin.