Irrigation Controller
Irrigation Controller is a Powered By Shelly device that automates water flow across multiple zones. It manages up to six irrigation zones, each with configurable duration and water output, and can adjust watering schedules dynamically based on real-time weather data.
For more information about the original Irrigation Controller consult: https://frankever.com/.
The following components are available in Irrigation Controller:
Supported virtual components:
Supported BTHome components:
Virtual Component Configuration
The Irrigation Controller has the following virtual components:
| Virtual Component | Type | Access | Description |
|---|---|---|---|
zone0 | boolean | write | Enables irrigation on zone 0. |
zone1 | boolean | write | Enables irrigation on zone 1. |
zone2 | boolean | write | Enables irrigation on zone 2. |
zone3 | boolean | write | Enables irrigation on zone 3. |
zone4 | boolean | write | Enables irrigation on zone 4. |
zone5 | boolean | write | Enables irrigation on zone 5. |
average_temperature | number | read | Reports the average temperature from the weather API, in °C. |
last_precipitation | number | read | Reports the total rainfall in the last 24 hours (mm/m²). |
active_sequence | enum | read/write | Selects the active irrigation sequence. Sequence keys are seq_<index> (e.g., seq_1). |
zones_status | object | read | Reports information about each zone’s status, including its duration, start time, and the source of the last command. |
Handlers Configuration
The Irrigation Controller has the following RPC handlers:
Service.ListSequences
Reports a list of all stored irrigation sequences.
Request
Parameters:
This method takes no parameters.
Response
| Property | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| array | List of stored irrigation sequences. Each sequence object includes:
| ||||||||||||
| number | Revision number of the sequence configuration, reflecting the current state of |
Service.SetSequence
Updates an existing sequence.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Sequence id. |
| string | Sequence name |
| array | List of zone indexes associated with this sequence. If omitted, the sequence’s zones are set to an empty list. |
Response
| Property | Type | Description |
|---|---|---|
| number | Revision number of the sequence configuration, reflecting the current state of |
On error, the request could fail due to:
- Invalid sequence id (
seq_id). - The limit of allowed sequences has been reached.
- Sequence zones contains invalid zone id.
Service.RemoveSequence
Removes an existing sequence.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Sequence id. |
Response
| Property | Type | Description |
|---|---|---|
| number | Revision number of the sequence configuration, reflecting the current state of |
On error, the request could fail due to:
- Invalid
seq_id. Error code 69.
Service Configuration
See the Service Configuration Example section for a full example.
| Property | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| number | Internal revision counter that increases whenever a sequence is created, edited, or removed. It allows the device or connected clients to detect when the list of sequences has changed. | ||||||||||||
| number | Global irrigation time offset in percent. | ||||||||||||
| number | Maximum number of zones that can be active at the same time. | ||||||||||||
| number | Baseline temperature in °C for temperature-based duration adjustment (default 20°C). | ||||||||||||
| boolean | Enables weather-based duration adjustment using average temperature (last 6h) and precipitation (last 24h). | ||||||||||||
| array | List of zone configurations (up to 6). Each zone has:
| ||||||||||||
| number | Service id. |
Method Examples
How to enable irrigation on a zone (zone 0)
- Boolean.Set HTTP GET Request
- Boolean.Set Curl Request
- Boolean.Set Mos Request
http://192.168.33.1/rpc/Boolean.Set?owner="service:0"&role="zone0"&value=true
curl -X POST -d '{"id":1,"method":"Boolean.Set","params":{"owner":"service:0","role":"zone0","value":true}}' http://${SHELLY}/rpc
mos --port ${PORT} call Boolean.Set '{"owner":"service:0","role":"zone0","value":true}'
Response
- Boolean.Set HTTP GET Response
- Boolean.Set Curl Response
- Boolean.Set Mos Response
null
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": null
}
null
How to check the average temperature
- Number.GetStatus HTTP GET Request
- Number.GetStatus Curl Request
- Number.GetStatus Mos Request
http://192.168.33.1/rpc/Number.GetStatus?owner="service:0"&role="average_temperature"
curl -X POST -d '{"id":1,"method":"Number.GetStatus","params":{"owner":"service:0","role":"average_temperature"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Number.GetStatus '{"owner":"service:0","role":"average_temperature"}'
Response
- Number.GetStatus HTTP GET Response
- Number.GetStatus Curl Response
- Number.GetStatus Mos Response
{
"value": 16.3,
"source": "sys",
"last_update_ts": 1761300511
}
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": {
"value": 16.3,
"source": "sys",
"last_update_ts": 1761300511
}
}
{
"value": 16.3,
"source": "sys",
"last_update_ts": 1761300511
}
How to check the last precipitation
- Number.GetStatus HTTP GET Request
- Number.GetStatus Curl Request
- Number.GetStatus Mos Request
http://192.168.33.1/rpc/Number.GetStatus?owner="service:0"&role="last_precipitation"
curl -X POST -d '{"id":1,"method":"Number.GetStatus","params":{"owner":"service:0","role":"last_precipitation"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Number.GetStatus '{"owner":"service:0","role":"last_precipitation"}'
Response
- Number.GetStatus HTTP GET Response
- Number.GetStatus Curl Response
- Number.GetStatus Mos Response
{
"value": 2.1,
"source": "sys",
"last_update_ts": 1761300512
}
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": {
"value": 2.1,
"source": "sys",
"last_update_ts": 1761300512
}
}
{
"value": 2.1,
"source": "sys",
"last_update_ts": 1761300512
}
How to activate a sequence
- Enum.Set HTTP GET Request
- Enum.Set Curl Request
- Enum.Set Mos Request
http://192.168.33.1/rpc/Enum.Set?owner="service:0"&role="active_sequence"&value="seq_1"
curl -X POST -d '{"id":1,"method":"Enum.Set","params":{"owner":"service:0","role":"active_sequence","value":"seq_1"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Enum.Set '{"owner":"service:0","role":"active_sequence","value":"seq_1"}'
Response
- Enum.Set HTTP GET Response
- Enum.Set Curl Response
- Enum.Set Mos Response
null
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": null
}
null
How to check the zones' status
- Object.GetStatus HTTP GET Request
- Object.GetStatus Curl Request
- Object.GetStatus Mos Request
http://192.168.33.1/rpc/Object.GetStatus?owner="service:0"&role="zones_status"
curl -X POST -d '{"id":1,"method":"Object.GetStatus","params":{"owner":"service:0","role":"zones_status"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Object.GetStatus '{"owner":"service:0","role":"zones_status"}'
Response
- Object.GetStatus HTTP GET Response
- Object.GetStatus Curl Response
- Object.GetStatus Mos Response
{
"value": {
"zone0": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone1": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone2": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone3": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone4": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone5": {
"duration": 10,
"started_at": null,
"source": "init"
}
},
"source": "sys",
"last_update_ts": 1761564575
}
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": {
"value": {
"zone0": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone1": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone2": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone3": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone4": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone5": {
"duration": 10,
"started_at": null,
"source": "init"
}
},
"source": "sys",
"last_update_ts": 1761564575
}
}
{
"value": {
"zone0": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone1": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone2": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone3": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone4": {
"duration": 10,
"started_at": null,
"source": "init"
},
"zone5": {
"duration": 10,
"started_at": null,
"source": "init"
}
},
"source": "sys",
"last_update_ts": 1761564575
}
Handlers Examples
Service.ListSequences Example
- Service.ListSequences HTTP GET Request
- Service.ListSequences Curl Request
- Service.ListSequences Mos Request
http://192.168.33.1/rpc/Service.ListSequences?id=0
curl -X POST -d '{"id":1,"method":"Service.ListSequences","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Service.ListSequences '{"id":0}'
Response
- Service.ListSequences HTTP GET Response
- Service.ListSequences Curl Response
- Service.ListSequences Mos Response
{
"sequences": [
{
"seq_id": 0,
"name": "New Sequence",
"zones": [
0,
2
]
},
{
"seq_id": 1,
"name": "New Sequence",
"zones": [
2
]
}
],
"rev": 7
}
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": {
"sequences": [
{
"seq_id": 0,
"name": "New Sequence",
"zones": [
0,
2
]
},
{
"seq_id": 1,
"name": "New Sequence",
"zones": [
2
]
}
],
"rev": 7
}
}
{
"sequences": [
{
"seq_id": 0,
"name": "New Sequence",
"zones": [
0,
2
]
},
{
"seq_id": 1,
"name": "New Sequence",
"zones": [
2
]
}
],
"rev": 7
}
Service.SetSequence Example
- Service.SetSequence HTTP GET Request
- Service.SetSequence Curl Request
- Service.SetSequence Mos Request
http://192.168.33.1/rpc/Service.SetSequence?id=0&seq_id=1&name="Sequence with Id 2"&zones=[0]
curl -X POST -d '{"id":1,"method":"Service.SetSequence","params":{"id":0,"seq_id":1,"name":"Sequence with Id 2","zones":[0]}}' http://${SHELLY}/rpc
mos --port ${PORT} call Service.SetSequence '{"id":0,"seq_id":1,"name":"Sequence with Id 2","zones":[0]}'
Response
- Service.SetSequence HTTP GET Response
- Service.SetSequence Curl Response
- Service.SetSequence Mos Response
{
"rev": 9
}
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": {
"rev": 9
}
}
{
"rev": 9
}
Service.RemoveSequence Example
- Service.RemoveSequence HTTP GET Request
- Service.RemoveSequence Curl Request
- Service.RemoveSequence Mos Request
http://192.168.33.1/rpc/Service.RemoveSequence?id=0&seq_id=0
curl -X POST -d '{"id":1,"method":"Service.RemoveSequence","params":{"id":0,"seq_id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Service.RemoveSequence '{"id":0,"seq_id":0}'
Response
- Service.RemoveSequence HTTP GET Response
- Service.RemoveSequence Curl Response
- Service.RemoveSequence Mos Response
{
"rev": 10
}
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": {
"rev": 10
}
}
{
"rev": 10
}
Service Configuration 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
{
"seq_rev": 0,
"duration_offset": 0,
"limit_zones": 2,
"base_temp": 20,
"weather_api": false,
"zones": [
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
}
],
"id": 0
}
{
"id": 1,
"src": "irrigation-84fce6366d3c",
"params": {
"seq_rev": 0,
"duration_offset": 0,
"limit_zones": 2,
"base_temp": 20,
"weather_api": false,
"zones": [
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
}
],
"id": 0
}
}
{
"seq_rev": 0,
"duration_offset": 0,
"limit_zones": 2,
"base_temp": 20,
"weather_api": false,
"zones": [
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
},
{
"name": null,
"duration": 10,
"water_amount": 10
}
],
"id": 0
}