XT1
XT modules extend the standard API responses with additional properties. The sections below describe XT1-specific attributes and available Service methods. XT1 modules also support XMOD service.
Virtual Components
In addition to the Virtual Components listed, XT1 devices supports one more type of Virtual Component called Virtual Object.
Virtual Object
The virtual Object component is used to store an object (or null). It uses Object as RPC namespace and has the following methods:
Object.SetConfigto update the component's configurationObject.GetConfigto obtain the component's configurationObject.GetStatusto obtain the component's statusObject.Setto update the component's value
Methods
Object.SetConfig
| Property | Type | Description |
|---|---|---|
| number | Id of the component instance |
| object | Configuration that the method takes |
Find more about the config properties in config section
Object.GetConfig
Properties:
| Property | Type | Description |
|---|---|---|
| number | Id of the component instance |
Find the Object.GetConfig response properties in config section
Object.GetStatus
Properties:
| Property | Type | Description |
|---|---|---|
| number | Id of the component instance |
Find more about the status response properties in status section
Object.Set
This method updates the Object component.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the component instance. Required |
| object | Object to be saved. Required |
Configuration
The configuration of the Object component contains information about its properties and how it will be rendered in the UI. To Get/Set the configuration of the Object component its id must be specified.
Properties:
| Property | Type | Description |
|---|---|---|
| number | Id of the component instance |
| string or null | Name of the component instance |
| object or null | Stores the component's metadata |
Status
The status of the Object component contains information about its current value, the timestamp for the value update, and the source of the last command. To obtain the status of the Object component its id must be specified.
Properties:
| Property | Type | Description |
|---|---|---|
| string | Source of the last command |
| object | Value of the component |
| number | Unix timestamp for the value update |
For all virtual components owned by a service, the API methods can be addressed using the owner and role parameters instead of the numeric id.
For example:
Button.GetConfig example
- Button.GetConfig HTTP GET Request
- Button.GetConfig Curl Request
- Button.GetConfig Mos Request
http://192.168.33.1/rpc/Button.GetConfig?owner="service:0"&role="open"
curl -X POST -d '{"id":1,"method":"Button.GetConfig","params":{"owner":"service:0","role":"open"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Button.GetConfig '{"owner":"service:0","role":"open"}'
Response
- Button.GetConfig HTTP GET Response
- Button.GetConfig Curl Response
- Button.GetConfig Mos Response
{
"id": 201,
"name": "Open",
"meta": {
"ui": {
"view": "button"
}
},
"owner": "service:0",
"access": "crw"
}
{
"id": 1,
"src": "watervalve-84fce6368be0",
"params": {
"id": 201,
"name": "Open",
"meta": {
"ui": {
"view": "button"
}
},
"owner": "service:0",
"access": "crw"
}
}
{
"id": 201,
"name": "Open",
"meta": {
"ui": {
"view": "button"
}
},
"owner": "service:0",
"access": "crw"
}
Note that any virtual component owned by a service includes additional fields in the response:
| Property | Type | Description |
|---|---|---|
| string | Identifies the owning service. |
| string | Describes access permissions:
|
Button.Trigger example
- Button.Trigger HTTP GET Request
- Button.Trigger Curl Request
- Button.Trigger Mos Request
http://192.168.33.1/rpc/Button.Trigger?owner="service:0"&role="open"&event="single_push"
curl -X POST -d '{"id":1,"method":"Button.Trigger","params":{"owner":"service:0","role":"open","event":"single_push"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Button.Trigger '{"owner":"service:0","role":"open","event":"single_push"}'
Response
- Button.Trigger HTTP GET Response
- Button.Trigger Curl Response
- Button.Trigger Mos Response
null
{
"id": 1,
"src": "watervalve-84fce6368be0",
"params": null
}
null
Access Restriction
Depending on the virtual component's permissions, some API requests may be blocked.
In that case the response will look like:
Boolean.SetConfig example
- Boolean.SetConfig HTTP GET Request
- Boolean.SetConfig Curl Request
- Boolean.SetConfig Mos Request
http://192.168.33.1/rpc/Boolean.SetConfig?id=200&config={"owner":"service:0","role":"has_power","name":"Has Power","meta":{"ui":{"titles":["Close","Open"]}}}
curl -X POST -d '{"id":1,"method":"Boolean.SetConfig","params":{"id":200,"config":{"owner":"service:0","role":"has_power","name":"Has Power","meta":{"ui":{"titles":["Close","Open"]}}}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Boolean.SetConfig '{"id":200,"config":{"owner":"service:0","role":"has_power","name":"Has Power","meta":{"ui":{"titles":["Close","Open"]}}}}'
Response
- Boolean.SetConfig HTTP GET Response
- Boolean.SetConfig Curl Response
- Boolean.SetConfig Mos Response
{
"error": {
"code": -107,
"message": "Permission denied: SetConfig!"
}
}
{
"id": 1,
"src": "watervalve-84fce6368be0",
"params": {
"error": {
"code": -107,
"message": "Permission denied: SetConfig!"
}
}
}
{
"error": {
"code": -107,
"message": "Permission denied: SetConfig!"
}
}
Shelly.GetDeviceInfo
Request
Response
On XT1 devices, the response contains extra fields describing the Service configuration and metadata:
| Property | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| object |
| ||||||||||||
| object | Service definition stored on the device file system.
|
Methods
The Shelly.ListMethods RPC call on XT1 device shows the Service’s available methods.
Generic methods include:
Custom methods may also be defined for a specific device.
Example: Service.ReceiveWiFiSensorData.
Service.GetResources
Returns information about the resources owned by the service.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Service id. Required. (Currently, only 0 is supported). |
Response
| Property | Type | Description |
|---|---|---|
| string | Unique MD5 hash of the current service file. |
| object | Each entry is a key–value pair where the key is the role of the component and the value is the key of the component formatted as "type:id". |
Service.GetInfo
Returns details about the Service and its metadata.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Service id. Required. (Currently, only 0 is supported). |
Response
| Property | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| string | Service type. | ||||||||||||||||||
| string | Service version. | ||||||||||||||||||
| string | Service build identifier. | ||||||||||||||||||
| string | Unique MD5 hash of the current service file. | ||||||||||||||||||
| object | Additional service information
|
Service.GetConfig
Retrieves the configuration parameters defined for the service instance.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Service id. Required. (Currently, only |
Response
On success, a JSON object containing the current service configuration is returned. The configuration is service-specific.
Service.SetConfig
Updates the service's configuration.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Service id. Required. (Currently, only 0 is supported). |
| object | New configuration object. Include only the properties that need to be updated. |
Response
| Property | Type | Description |
|---|---|---|
| boolean | True if restart is required, false otherwise |
Service.GetStatus
Reports current service state, memory usage, errors and flags.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Service id. Required. (Currently, only 0 is supported). |
Response
| Property | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| string | Unique MD5 hash of the current service file. | |||||||||
| string | Current state of the service. | |||||||||
| object | System resource usage statistics.
| |||||||||
| string[] | Active service errors. Optional (Only if there are active errors). | |||||||||
| string[] | Active service flags. Optional (Only if there are active flags). |
Examples
Service.GetResources example
- Service.GetResources HTTP GET Request
- Service.GetResources Curl Request
- Service.GetResources Mos Request
http://192.168.33.1/rpc/Service.GetResources?id=0
curl -X POST -d '{"id":1,"method":"Service.GetResources","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Service.GetResources '{"id":0}'
Response
- Service.GetResources HTTP GET Response
- Service.GetResources Curl Response
- Service.GetResources Mos Response
{
"etag": "bb7083b2d6d1c4647a89ea441da69fac",
"vc": {
"anti_freeze": "boolean:200",
"current_humidity": "number:200",
"current_temperature": "number:201",
"enable": "boolean:201",
"fan_speed": "enum:200",
"target_humidity": "number:202",
"target_temperature": "number:203",
"working_mode": "enum:201"
}
}
{
"id": 1,
"src": "st-802-54320440a210",
"params": {
"etag": "bb7083b2d6d1c4647a89ea441da69fac",
"vc": {
"anti_freeze": "boolean:200",
"current_humidity": "number:200",
"current_temperature": "number:201",
"enable": "boolean:201",
"fan_speed": "enum:200",
"target_humidity": "number:202",
"target_temperature": "number:203",
"working_mode": "enum:201"
}
}
}
{
"etag": "bb7083b2d6d1c4647a89ea441da69fac",
"vc": {
"anti_freeze": "boolean:200",
"current_humidity": "number:200",
"current_temperature": "number:201",
"enable": "boolean:201",
"fan_speed": "enum:200",
"target_humidity": "number:202",
"target_temperature": "number:203",
"working_mode": "enum:201"
}
}
Service.GetInfo example
- Service.GetInfo HTTP GET Request
- Service.GetInfo Curl Request
- Service.GetInfo Mos Request
http://192.168.33.1/rpc/Service.GetInfo?id=0
curl -X POST -d '{"id":1,"method":"Service.GetInfo","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Service.GetInfo '{"id":0}'
Response
- Service.GetInfo HTTP GET Response
- Service.GetInfo Curl Response
- Service.GetInfo Mos Response
{
"type": "simple-water-valve-controller",
"ver": "1-dev141902",
"build_id": "20251009-103105/6997087",
"etag": "a65f22cee777aefc3284442124a98b72",
"meta": {
"ui": {
"actions": [
{
"component": "open",
"name": "Open valve",
"method": "trigger",
"params": {
"event": "single_push"
}
},
{
"component": "close",
"name": "Close valve",
"method": "trigger",
"params": {
"event": "single_push"
}
},
{
"component": "position",
"name": "Set position",
"method": "set",
"input": {
"value": {
"type": "number",
"name": "Position",
"min": 0,
"max": 100,
"step": 10
}
}
}
],
"conditions": {
"position": [
{
"name": "Position changes",
"event": "number.change"
}
],
"has_power": [
{
"name": "Power supply status",
"event": "boolean.change"
}
]
}
}
}
}
{
"id": 1,
"src": "st-802-54320440a210",
"params": {
"type": "simple-water-valve-controller",
"ver": "1-dev141902",
"build_id": "20251009-103105/6997087",
"etag": "a65f22cee777aefc3284442124a98b72",
"meta": {
"ui": {
"actions": [
{
"component": "open",
"name": "Open valve",
"method": "trigger",
"params": {
"event": "single_push"
}
},
{
"component": "close",
"name": "Close valve",
"method": "trigger",
"params": {
"event": "single_push"
}
},
{
"component": "position",
"name": "Set position",
"method": "set",
"input": {
"value": {
"type": "number",
"name": "Position",
"min": 0,
"max": 100,
"step": 10
}
}
}
],
"conditions": {
"position": [
{
"name": "Position changes",
"event": "number.change"
}
],
"has_power": [
{
"name": "Power supply status",
"event": "boolean.change"
}
]
}
}
}
}
}
{
"type": "simple-water-valve-controller",
"ver": "1-dev141902",
"build_id": "20251009-103105/6997087",
"etag": "a65f22cee777aefc3284442124a98b72",
"meta": {
"ui": {
"actions": [
{
"component": "open",
"name": "Open valve",
"method": "trigger",
"params": {
"event": "single_push"
}
},
{
"component": "close",
"name": "Close valve",
"method": "trigger",
"params": {
"event": "single_push"
}
},
{
"component": "position",
"name": "Set position",
"method": "set",
"input": {
"value": {
"type": "number",
"name": "Position",
"min": 0,
"max": 100,
"step": 10
}
}
}
],
"conditions": {
"position": [
{
"name": "Position changes",
"event": "number.change"
}
],
"has_power": [
{
"name": "Power supply status",
"event": "boolean.change"
}
]
}
}
}
}
Service.GetConfig example
- Service.GetConfig HTTP GET Request
- Service.GetConfig Curl Request
- Service.GetConfig Mos Request
http://192.168.33.1/rpc/Service.GetConfig?id=0
curl -X POST -d '{"id":1,"method":"Service.GetConfig","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Service.GetConfig '{"id":0}'
Response
- Service.GetConfig HTTP GET Response
- Service.GetConfig Curl Response
- Service.GetConfig Mos Response
{
"temp_offset": 1,
"humidity_offset": 0,
"temp_unit": "C",
"thermostat_mode": "auto",
"ext_sensor": {
"enable": true,
"ext_sens_type": "wifi",
"on_timeout": "use_internal",
"temperature_keys": [],
"humidity_keys": [],
"timeout": 1
},
"ws_rev": 7,
"id": 0
}
{
"id": 1,
"src": "st-802-54320440a210",
"params": {
"temp_offset": 1,
"humidity_offset": 0,
"temp_unit": "C",
"thermostat_mode": "auto",
"ext_sensor": {
"enable": true,
"ext_sens_type": "wifi",
"on_timeout": "use_internal",
"temperature_keys": [],
"humidity_keys": [],
"timeout": 1
},
"ws_rev": 7,
"id": 0
}
}
{
"temp_offset": 1,
"humidity_offset": 0,
"temp_unit": "C",
"thermostat_mode": "auto",
"ext_sensor": {
"enable": true,
"ext_sens_type": "wifi",
"on_timeout": "use_internal",
"temperature_keys": [],
"humidity_keys": [],
"timeout": 1
},
"ws_rev": 7,
"id": 0
}
Service.SetConfig example
- Service.SetConfig HTTP GET Request
- Service.SetConfig Curl Request
- Service.SetConfig Mos Request
http://192.168.33.1/rpc/Service.SetConfig?id=0&config={"name":"Water valve"}
curl -X POST -d '{"id":1,"method":"Service.SetConfig","params":{"id":0,"config":{"name":"Water valve"}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Service.SetConfig '{"id":0,"config":{"name":"Water valve"}}'
Response
- Service.SetConfig HTTP GET Response
- Service.SetConfig Curl Response
- Service.SetConfig Mos Response
{
"restart_required": false
}
{
"id": 1,
"src": "st-802-54320440a210",
"params": {
"restart_required": false
}
}
{
"restart_required": false
}
Service.GetStatus example
- Service.GetStatus HTTP GET Request
- Service.GetStatus Curl Request
- Service.GetStatus Mos Request
http://192.168.33.1/rpc/Service.GetStatus?id=0
curl -X POST -d '{"id":1,"method":"Service.GetStatus","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Service.GetStatus '{"id":0}'
Response
- Service.GetStatus HTTP GET Response
- Service.GetStatus Curl Response
- Service.GetStatus Mos Response
{
"etag": "bb7083b2d6d1c4647a89ea441da69fac",
"state": "running",
"stats": {
"mem": 1479,
"mem_peak": 1710
},
"errors": [
"TEMP_USE_INTERNAL",
"TIMEOUT_END"
]
}
{
"id": 1,
"src": "st-802-54320440a210",
"params": {
"etag": "bb7083b2d6d1c4647a89ea441da69fac",
"state": "running",
"stats": {
"mem": 1479,
"mem_peak": 1710
},
"errors": [
"TEMP_USE_INTERNAL",
"TIMEOUT_END"
]
}
}
{
"etag": "bb7083b2d6d1c4647a89ea441da69fac",
"state": "running",
"stats": {
"mem": 1479,
"mem_peak": 1710
},
"errors": [
"TEMP_USE_INTERNAL",
"TIMEOUT_END"
]
}
Actions
Actions specify which states of a Service’s Virtual Components can be controlled programmatically (via schedules or webhooks). Virtual Components represent real device features that the Service exposes for interaction.
Each action specifies:
- component – target feature (e.g., thermostat enable).
- name – human-readable label.
- method – RPC method to execute (e.g.,
Set). - input – expected data type and UI widget (toggle, slider, text).
Example:
{
"component": "target_temperature",
"name": "Set target temperature",
"method": "Set",
"input": {
"value": {
"type": "number",
"name": "temperature",
"min": 5,
"max": 95
}
}
}
In this example, the thermostat's target temperature can be adjusted.
Conditions
Conditions define events that can trigger webhooks.
They describe when a webhook should be triggered.
Each condition includes:
- name – description of the event.
- event – event type (e.g.,
boolean.change).
Example:
{
"current_temperature": [
{
"name": "Current temperature change",
"event": "number.change"
}
]
}
This condition means that when the "current_temperature" Virtual Component changes (the thermostat’s current temperature is updated), it can trigger linked webhooks.
Object.SetConfig example
- Object.SetConfig HTTP GET Request
- Object.SetConfig Curl Request
- Object.SetConfig Mos Request
http://192.168.33.1/rpc/Object.SetConfig?id=200&config={"name":"Irrigation Controller"}
curl -X POST -d '{"id":1,"method":"Object.SetConfig","params":{"id":200,"config":{"name":"Irrigation Controller"}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Object.SetConfig '{"id":200,"config":{"name":"Irrigation Controller"}}'
Response
- Object.SetConfig HTTP GET Response
- Object.SetConfig Curl Response
- Object.SetConfig Mos Response
{
"restart_required": false
}
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": {
"restart_required": false
}
}
{
"restart_required": false
}
Object.GetConfig example
- Object.GetConfig HTTP GET Request
- Object.GetConfig Curl Request
- Object.GetConfig Mos Request
http://192.168.33.1/rpc/Object.GetConfig?id=200
curl -X POST -d '{"id":1,"method":"Object.GetConfig","params":{"id":200}}' http://${SHELLY}/rpc
mos --port ${PORT} call Object.GetConfig '{"id":200}'
Response
- Object.GetConfig HTTP GET Response
- Object.GetConfig Curl Response
- Object.GetConfig Mos Response
{
"id": 200,
"name": "Irrigation Controller",
"meta": null,
"owner": "service:0",
"access": "crw"
}
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": {
"id": 200,
"name": "Irrigation Controller",
"meta": null,
"owner": "service:0",
"access": "crw"
}
}
{
"id": 200,
"name": "Irrigation Controller",
"meta": null,
"owner": "service:0",
"access": "crw"
}
Object.GetStatus example
- Object.GetStatus HTTP GET Request
- Object.GetStatus Curl Request
- Object.GetStatus Mos Request
http://192.168.33.1/rpc/Object.GetStatus?id=200
curl -X POST -d '{"id":1,"method":"Object.GetStatus","params":{"id":200}}' http://${SHELLY}/rpc
mos --port ${PORT} call Object.GetStatus '{"id":200}'
Response
- Object.GetStatus HTTP GET Response
- Object.GetStatus Curl Response
- Object.GetStatus Mos Response
{
"value": {
"zone0": {
"duration": 15,
"started_at": 1761221505,
"source": "rpc"
},
"zone1": {
"duration": 5,
"started_at": 1761221506,
"source": "init"
},
"zone2": {
"duration": 10,
"started_at": 1761221507,
"source": "init"
}
},
"source": "rpc",
"last_update_ts": 1761289589
}
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": {
"value": {
"zone0": {
"duration": 15,
"started_at": 1761221505,
"source": "rpc"
},
"zone1": {
"duration": 5,
"started_at": 1761221506,
"source": "init"
},
"zone2": {
"duration": 10,
"started_at": 1761221507,
"source": "init"
}
},
"source": "rpc",
"last_update_ts": 1761289589
}
}
{
"value": {
"zone0": {
"duration": 15,
"started_at": 1761221505,
"source": "rpc"
},
"zone1": {
"duration": 5,
"started_at": 1761221506,
"source": "init"
},
"zone2": {
"duration": 10,
"started_at": 1761221507,
"source": "init"
}
},
"source": "rpc",
"last_update_ts": 1761289589
}
Object.Set example
- Object.Set HTTP GET Request
- Object.Set Curl Request
- Object.Set Mos Request
http://192.168.33.1/rpc/Object.Set?id=200&value={"zone0":{"duration":15,"started_at":1761221505,"source":"rpc"},"zone1":{"duration":5,"started_at":1761221506,"source":"init"},"zone2":{"duration":10,"started_at":1761221507,"source":"init"}}
curl -X POST -d '{"id":1,"method":"Object.Set","params":{"id":200,"value":{"zone0":{"duration":15,"started_at":1761221505,"source":"rpc"},"zone1":{"duration":5,"started_at":1761221506,"source":"init"},"zone2":{"duration":10,"started_at":1761221507,"source":"init"}}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Object.Set '{"id":200,"value":{"zone0":{"duration":15,"started_at":1761221505,"source":"rpc"},"zone1":{"duration":5,"started_at":1761221506,"source":"init"},"zone2":{"duration":10,"started_at":1761221507,"source":"init"}}}'
Response
- Object.Set HTTP GET Response
- Object.Set Curl Response
- Object.Set Mos Response
null
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": null
}
null