6 dimming, 8 check services available, 9 api coding – Dovado 4GR User Manual
Page 25: Check services available, Api coding

T h e M o b i le C h o ic e f o r y o u r B r o a d b a n d I n t e r n e t
API
25
© 2013 Dovado FZ-LLC
There will always be one group, 'all', available. This group contains all configured aliases.
When executing group commands, they are executed in a random sequential fashion per device.
Adding:
ts add_group [alias] [list_of_device_aliases] (the list is a space separated list of devices)
Example: ts add_group livingroom myfridge mylamp myotherlamp
Removing:
ts remove_group [alias]
Example: ts remove_group livingroom
Listing:
ts groups
4.7.6
Dimming
If an alias is configured as a dimmer these extended commands are available:
Dim the device to XX%:
ts dim [alias] [0...100]
Example: ts dim mydimmer 70
Turn the device off and dim to XX%:
ts dims [alias] [0...100]
Example: ts dims mydimmer 60
Dim from start to stop level over XX minutes:
ts dimot [alias] [Start level 0...100] [Stop level 0...100] [Duration xx min]
Example: ts dimot mydimmer 20 80 5
4.8
Check services available
Services available in current session:
To display which services that are available in current session, execute the command:
services
It will respond with the services (Home Automation and SMS) that are currently available
Example:
HOMEAUTOMATION=enabled
SMS=enabled
4.9
API Coding
The API can easily be extended with a custom front-end. When implementing a front-end, mind the
following:
The router might be behind a high-latency connection. Set a high timeout for your connection.
When logging in to the API, the password must be encoded either ISO-8859-1or UTF-8
When executing a command (for example ts aliases), each line of output from the API is
terminated with LF (Line Feed, ASCII character 10d) and the last line of output from the
command is ETB (End of Transmission Block, ASCII character 23d).
Since there can only be one instance of the API running on the Router, a session that has been
inactive for more than 60 seconds will be dropped in favor of a new session.