Skip to content

Downloading packages

Christian edited this page Nov 24, 2018 · 1 revision

Summary

All plugins for Wirehome.Core are called packages and stored at the local machine where Wirehome.Core is running. These packages are not part of the binary package of the core. They are available at the official Wirehome.Packages repository.

Package UID

Each package has an ID which has the following format:

[type].[name]

The type is either service, component_logic, component_adapter or tool. More types may follow in the future. The name may contain additional dots and must use the snake case naming convention. A service may have the following ID.

service.wirehome.open_weather_map_importer

Every package may have multiple versions. The ID and the version together are called the UID (unique identifier) of a package. The full UID of a package may look like this.

[email protected]

The version information is separated by the @ sign. For some cases it is supported to omit the version number. The core will then select the newest (locally) available version automatically.

Package API

Wirehome.Core provides several APIs in order to manage packages. The packages are stored in the folder Packages at the local installation. It is supported to modify files in this folders directly or cloning the whole GIT repository manually. But for most cases the built-in APIs are recommended.

The command for downloading a package may looks like this.

POST http://wirehome/packages/[email protected]/download

This will download all required files of the specified package to the local installation. All files which are already existing are overridden.