|  Developer
Updated on December 31, 2021

Installing a component

  • Websocket request to install a component. The result of command execution is notified via broadcasts hub.software.update.progress This is an artificial request to install a custom plugin from an archive. There is no corresponding hub.software.update.plan request made before this request is made. A plugin to install should be packaged as a tar.gz file without a plugin root directory in it. An archive should contain both config.json and interface.json files in the root of it. The folder name for a plugin to be installed to will be calculated from the config.json file.

In the case of a development is in progress, a plugin can have only the property in the root of config.json file. In the case of it is a plugin managed by Ezlo Cloud, it should be prefixed properly to avoid overlapping with other publicly published plugins.

In the case of installation passed successfully, the plugin will be installed in a subfolder of directory. Information about the plugin’s metadata will be available via the command hub.custom.nodes.list.

Request Example:

				
					{
    "method": "hub.software.update.execute",
    "id": "_ID_",
    "params": {
        "actions": [
            {
                "operation": "install",
                "source": "http://cloud-provided-place-to-download-the-archive-with-a/plugin.tgz",
                "type": "custom_plugin",
                "id": "prefixedPluginName",
                "version": "1.23",
                "archive_hash_md5": "<md5(plugin.tgz)>"
            }
        ]
    }
}