Widget
Learn the specifics of developing a Device plugin.
Create the file structure
Set up a directory structure with the following files
widget.html, widget.css and widget.js scripts
Fill those files with the content that you require and according to the table below, then save them.
File | Purpose |
---|---|
widget.html | Define the Widget's components layout |
widget.css | Define the Widget's components style |
widget.js | Define the Widget's logic as well as dynamically modification of the Widget's style. |
The runtime with which widget.js
runs is NodeJS 20 independently of the selected runtime. Runtime selection only affects the control
, function
and user_code
scripts.
view.xml
For the moment given, this file is not fully implemented for Widget plugin, so it is not relevant at all for this plugin type, however it should contain dummy, albeit valid data so the plugin can be deployed, for this reason, you can use this view.xml file on your Widget plugin development as dummy file:
view_widget.xml
Fill this file with the contents that you require to be displayed when the user is creating the widget in the dashboard.
LICENSE and README.md
Write the contents of the README.md and LICENSE files.
manifest.toml
Fill the contents of this file. According to the widget section within the Private Plugins page, the manifest.toml should look like:
Compressing the files
Compress the files in zip format from the root of the file structure, not the parent folder.
Last updated