DALI
The DALI component provides methods to scan and ping control gears. It uses DALI as RPC namespace and provides the methods:
DALI.GetConfigto obtain the component's configurationDALI.SetConfigto update the component's configurationDALI.GetStatusto obtain the component's statusDALI.StartScanto start scanning for control gearsDALI.PingKnownDevicesto ping scanned control gears
All control gears are controlled through light:0 component.
Methods:
DALI.SetConfig
DALI component does not provide configuration
DALI.GetConfig
DALI component does not provide configuration
DALI.GetStatus
DALI.GetStatus does not expect any arguments
Find more about the status response properties in status section
DALI.StartScan
This method starts scanning the DALI bus for control gears.
DALI.StartScan does not expect any arguments
Response
The result from this method is null when scan is started succesfully.
If invoked while scanning is already in progress, an error is returned:
{
"code": -114,
"message": "scan is already in progress"
}
If invoked and internal dali bus driver can not be loaded, an error is returned:
{
"code": -114,
"message": "driver error"
}
DALI.PingKnownDevices
This method pings all scanned control gears. If some control gears can not be accessed, error control_gear_missing is raised in component status.
DALI.PingKnownDevices does not expect any arguments
Response
The result from this method is null when pinging is started succesfully.
If invoked while scanning is already in progress, an error is returned:
{
"code": -114,
"message": "scan is already in progress"
}
If invoked and internal dali bus driver can not be loaded, an error is returned:
{
"code": -114,
"message": "driver error"
}
If invoked and bus has hever been scanned, an error is returned:
{
"code": -114,
"message": "bus not scanned"
}
If invoked and there are no control gears found during scan, an error is returned:
{
"code": -114,
"message": "there is no devices on bus"
}
Configuration
DALI component does not provide configuration
Status
The status of the DALI component contains information about number of scanned control gears on DALI bus and scanning process information.
Properties:
| Property | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| number or null | Number of scanned control gears ( | |||||||||
| object | Information about the scan process, only present when scan is running
| |||||||||
| array of type string | Shown only if at least one error is present. May contain |
* control_gear_missing is an error indicating that some ot the scanned control gears can not be accessed.
* driver is an error indicating internal DALI driver error.
Notifications
This section describes notifications for events specific to the DALI component. For general information please see this page.
DALI component can send notifications for the following events:
scan_completeping_complete
Examples
DALI.GetConfig example
DALI component does not provide configuration
DALI.SetConfig example
DALI component does not provide configuration
DALI.GetStatus example
- DALI.GetStatus HTTP GET Request
- DALI.GetStatus Curl Request
- DALI.GetStatus Mos Request
http://192.168.33.1/rpc/DALI.GetStatus
curl -X POST -d '{"id":1,"method":"DALI.GetStatus"}' http://${SHELLY}/rpc
mos --port ${PORT} call DALI.GetStatus
Response
- DALI.GetStatus HTTP GET Response
- DALI.GetStatus Curl Response
- DALI.GetStatus Mos Response
{
"cg_count": 0
}
{
"id": 1,
"src": "shellyddimmer-c8f09e8a2bbc",
"params": {
"cg_count": 0
}
}
{
"cg_count": 0
}
DALI.StartScan example
- DALI.StartScan HTTP GET Request
- DALI.StartScan Curl Request
- DALI.StartScan Mos Request
http://192.168.33.1/rpc/DALI.StartScan
curl -X POST -d '{"id":1,"method":"DALI.StartScan"}' http://${SHELLY}/rpc
mos --port ${PORT} call DALI.StartScan
Response
- DALI.StartScan HTTP GET Response
- DALI.StartScan Curl Response
- DALI.StartScan Mos Response
null
{
"id": 1,
"src": "shellyddimmer-c8f09e8a2bbc",
"params": null
}
null
DALI.PingKnownDevices example
- DALI.PingKnownDevices HTTP GET Request
- DALI.PingKnownDevices Curl Request
- DALI.PingKnownDevices Mos Request
http://192.168.33.1/rpc/DALI.PingKnownDevices
curl -X POST -d '{"id":1,"method":"DALI.PingKnownDevices"}' http://${SHELLY}/rpc
mos --port ${PORT} call DALI.PingKnownDevices
Response
- DALI.PingKnownDevices HTTP GET Response
- DALI.PingKnownDevices Curl Response
- DALI.PingKnownDevices Mos Response
null
{
"id": 1,
"src": "shellyddimmer-c8f09e8a2bbc",
"params": null
}
null
Notifications example
- Scan complete:
Example 1:
Notification that the DALI bus scan process has finished.{
"src": "shellyddimmer-c8f09e8a2bbc",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1631266595.43,
"events": [
{
"component": "dali",
"event": "scan_complete",
"cg_count": 2,
"ts": 1631266595.43
}
]
}
}
- Ping scanned control gears complete:
Example 2:
Notification that the DALI bus ping control gears has finished.{
"src": "shellyddimmer-c8f09e8a2bbc",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1631266595.43,
"events": [
{
"component": "dali",
"event": "ping_complete",
"ts": 1631266595.43
}
]
}
}