Shelly Pro RS485 Addon
The RS485 Addon attaches to compatible Shelly Pro devices, adding an RS485 bus connection.
When rs485 is set as device.addon_type in the System configuration, a Serial component instance becomes available for configuring the framing parameters and function of the serial link.
See the Serial component documentation for the full list of methods, configuration properties, and supported modes.
Examples
Serial.GetConfig
- Serial.GetConfig HTTP GET Request
- Serial.GetConfig Curl Request
- Serial.GetConfig Mos Request
http://192.168.33.1/rpc/Serial.GetConfig?id=100
curl -X POST -d '{"id":1,"method":"Serial.GetConfig","params":{"id":100}}' http://${SHELLY}/rpc
mos --port ${PORT} call Serial.GetConfig '{"id":100}'
Response
- Serial.GetConfig HTTP GET Response
- Serial.GetConfig Curl Response
- Serial.GetConfig Mos Response
{
"mode": "disabled",
"serial": {
"baud": 115200,
"format": "8N1"
},
"mb_server": {
"addr": 42
}
}
{
"id": 1,
"src": "shellypro1-84cca87c1f90",
"params": {
"mode": "disabled",
"serial": {
"baud": 115200,
"format": "8N1"
},
"mb_server": {
"addr": 42
}
}
}
{
"mode": "disabled",
"serial": {
"baud": 115200,
"format": "8N1"
},
"mb_server": {
"addr": 42
}
}
Serial.SetConfig
- Serial.SetConfig HTTP GET Request
- Serial.SetConfig Curl Request
- Serial.SetConfig Mos Request
http://192.168.33.1/rpc/Serial.SetConfig?id=100&config={"serial":{"baud":9600,"format":"8E1"}}
curl -X POST -d '{"id":1,"method":"Serial.SetConfig","params":{"id":100,"config":{"serial":{"baud":9600,"format":"8E1"}}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Serial.SetConfig '{"id":100,"config":{"serial":{"baud":9600,"format":"8E1"}}}'
Response
- Serial.SetConfig HTTP GET Response
- Serial.SetConfig Curl Response
- Serial.SetConfig Mos Response
{
"restart_required": false
}
{
"id": 1,
"src": "shellypro1-84cca87c1f90",
"params": {
"restart_required": false
}
}
{
"restart_required": false
}