Introduction
In the Components and Services
section, you can find information for all possibly available (may differ, depending on the device/device profile) Components
and Services.
Each Component/Service page in here is structured as follows:
Methods
All Components always contain the following methods:
- Component.SetConfig
- Component.GetConfig
- Component.GetStatus
Services may not have GetConfig
/SetConfig
or GetStatus
.
Additionally, component-specific methods are listed on each page.
More information on how to work with those methods can be found in:
- General - RPC Protocol - Protocol used in Shelly Gen2 devices
- General - RPC Channels - Different channels which can be used for working with the API
- General - Component Concept - Core explanation of the concept of a Component
Configuration
Each Component, would have a configuration, available through GetConfig
and SetConfig
.
Configuration for Services is optional.
Status
Each Component, would have a status, available through GetStatus
.
Status for Services is optional.
Webhook Events
Components may trigger web hook events. If such are available, for the specific component, they would be documented in the Webhook Events section.
Notifications
Notifications are a concept that handles events
and status changes
.
Each component and service, may support those.
The core ones are:
1) config_changed
- when a configuration (Component.GetConfig
) is changed (mostly via Component.SetConfig
):
{
"component": "switch:0",
"id": 0,
"event": "config_changed",
"restart_require": false,
"ts":1654698383.84,
"cfg_rev":10
}
2) State changes - when a state (in Component.GetStatus
) changes:
{
"id": 0,
"output": true,
"source": "WS_in"
}
Component specific articles, where needed
Some components, may introduce their own concepts and require explanation on how they work. For such cases, there would be separate component specific articles.
Examples
Examples are a list of requests (with specific methods and parameters), shown together with responses.