Shelly UART Add-On
UART add-on provides RPC communication over UART bus to extend the device functionality, having external add-on plugged to Shelly device serial interface.
Currently Shelly LoRa add-on is supported.
AddOn.GetInfo
to get information about UART add-on GetInfoAddOn.CheckForUpdate
to get if add-on firmware update is available CheckForUpdateAddOn.Update
to update firmware version if available Update
Methods
AddOn.GetInfo
Find the request and response properties in GetInfo section
AddOn.CheckForUpdate
Find the request and response properties in CheckForUpdate section
AddOn.Update
Find more about request properties in Update section
GetInfo
The method gets information about plugged add-on.
Request
The method takes no parameters.
Response
Attributes in the result (only the ones available are shown):
Properties:
Property | Type | Description |
---|---|---|
| string | Plugged add-on's type for example |
| string | Add-on's hardware revision |
| string | Add-on's firmware version |
GetInfo: AddOn.GetInfo Example
CheckForUpdate
The method checks for new firmware version of the plugged add-on and returns information about it. If no update is available returns null
as a result.
Request
The method takes no parameters.
Response
Attributes in the result (only the ones available are shown):
Property | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| object | Information about available updates. This information is automatically updated every 24 hours.
|
CheckForUpdate: AddOn.CheckForUpdate Example
Update
The method updates the firmware version of the plugged add-on.
Request
Property | Type | Description |
---|---|---|
| number | Timeout for firmware update attempts,default is |
| string | Url address of the update. optional |
Update: AddOn.Update Example
Examples
AddOn.GetInfo Example
- AddOn.GetInfo HTTP GET Request
- AddOn.GetInfo Curl Request
- AddOn.GetInfo Mos Request
http://192.168.33.1/rpc/AddOn.GetInfo
curl -X POST -d '{"id":1,"method":"AddOn.GetInfo"}' http://${SHELLY}/rpc
mos --port ${PORT} call AddOn.GetInfo
Response
- AddOn.GetInfo HTTP GET Response
- AddOn.GetInfo Curl Response
- AddOn.GetInfo Mos Response
{
"type": "LoRa",
"hw_ver": "1.2.0",
"fw_ver": "1.9.0"
}
{
"id": 1,
"src": "shelly1pmg3-dcda0ce0d36c",
"params": {
"type": "LoRa",
"hw_ver": "1.2.0",
"fw_ver": "1.9.0"
}
}
{
"type": "LoRa",
"hw_ver": "1.2.0",
"fw_ver": "1.9.0"
}
AddOn.CheckForUpdate Example
- AddOn.CheckForUpdate HTTP GET Request
- AddOn.CheckForUpdate Curl Request
- AddOn.CheckForUpdate Mos Request
http://192.168.33.1/rpc/AddOn.CheckForUpdate
curl -X POST -d '{"id":1,"method":"AddOn.CheckForUpdate"}' http://${SHELLY}/rpc
mos --port ${PORT} call AddOn.CheckForUpdate
Response
- AddOn.CheckForUpdate HTTP GET Response
- AddOn.CheckForUpdate Curl Response
- AddOn.CheckForUpdate Mos Response
{
"available_updates": {
"type": "LoRa",
"stable": {
"version": "1.9.0"
}
}
}
{
"id": 1,
"src": "shelly1pmg3-dcda0ce0d36c",
"params": {
"available_updates": {
"type": "LoRa",
"stable": {
"version": "1.9.0"
}
}
}
}
{
"available_updates": {
"type": "LoRa",
"stable": {
"version": "1.9.0"
}
}
}
AddOn.Update Example
- AddOn.Update HTTP GET Request
- AddOn.Update Curl Request
- AddOn.Update Mos Request
http://192.168.33.1/rpc/AddOn.Update?timeout=600
curl -X POST -d '{"id":1,"method":"AddOn.Update","params":{"timeout":600}}' http://${SHELLY}/rpc
mos --port ${PORT} call AddOn.Update '{"timeout":600}'