-
Notifications
You must be signed in to change notification settings - Fork 34
Web API
A simple HTTP API is available at the following URL: http://[hostname or IP]/api.html It is not a REST based API, so reading values and settings parameters should be a GET (Browser default) with parameters being passed in the request URI.
The request should be formatted as follows:
http://[hostname or IP]/api.html?[param]=[value]
Unless specified otherwise:
A successful command will return 'OK', an unsuccessful command will return 'NOK'.
String params/values are supplied without quote marks.
Values outside specified values/ranges will be ignored or 0 in case of an overflow.
Key | Value | Description |
---|---|---|
vremotecmd | away, low, medium, high, timer1, timer2, timer3, join, leave, auto, autonight, cook30, cook60 | These commands emulate a normal physical remote, available commands depend on type of remote configured to emulate. For these commands to work, the virtual remote needs to be activated and joined with the itho unit first. If the "vremoteindex" or "vremotename" key is not present, the first virtual remote will be used. |
vremoteindex | 0-11 | The vremoteindex key/value enables the selection of a specific virtual remote if more than 1 virtual remote is configured. The index can be found on the "Virtual remotes" page. If both "vremoteindex" and "vremotename" are provided, "vremotename" will be used. |
vremotename | name | The vremotename key/value selects a specific virtual remote based on the name configured. The name can be configured through the "Virtual remotes" page. If more than one remote exists with the same name, the name match with the lowest index number will be used. |
username | string | max 20 chars long |
password | string | max 20 chars long |
clearqueue | true | Clear all timers on the queue, scheduled to run after all other commands have been processed. Speed will fallback to last value before items got enqueued |
get | ithostatus | Returns JSON with all available sensor data, status data and system information. Available keys depend on itho device and firmware version |
get | remotesinfo | Returns JSON with all configured remotes where key=remote name, value is JSON with all received capabilities of the remote. Depending on make and model this can be the last command, temperature, humidity, battery and/or co2 levels. |
getsetting | 0-255 | Returns a JSON object containing the result of the API call. If successful it contains a data object with the current, minimum and maximum value of the given setting, using its index. If the setting index is invalid, the data object contains a key failreason. |
speed | 0-255 | Speed without a timer will reset the queue (different behaviour configurable) and set a new base/fallback speed. For MQTT; sending only the value instead of a JSON key/value pair also works for single commands. Only works on itho devices that support the PWM2IC2 protocol |
timer | 0-65535 | Only effective with "command" or "speed" key/param present, could overrule timer value of timer1, timer2, timer3. Highest speed setting on the queue will be active for the duration of the timer. Only works on itho devices that support the PWM2IC2 protocol |
command | low, medium, high, timer1, timer2, timer3, clearqueue | Resulting speed/timer settings are configurable. Value without timer sets the base/fallback speed of the fan. Timers will be queued on highest speed setting first for the duration of the timer. |
get | currentspeed | Returns current speed in 0..255 range as set by the PWM2I2C protocl |
Commands only for devices with CC1101 module | ||
rfremotecmd | away, low, medium, high, timer1, timer2, timer3, join, leave, auto, autonight, cook30, cook60 | These commands emulate a normal physical remote using the CC1101 module and a RF signal, available commands depend on type of remote configured to emulate. For these commands to work, the rf remote needs to be joined with the itho unit first. This can be done with a physical remote or with the RF remote buttons on the RF devices page. If the "rfremoteindex" key is not present, the first RF remote will be used. |
rfremoteindex | 0-11 | The rfremoteindex key/value enables the selection of a specific RF remote if more than 1 RF remote is configured. The index can be found on the "RF devices" page. |
API Commands below this line can change the settings of your Itho Daalderop unit, and this may affect its behaviour (i.e. turn it to a non working state). Only use this part of the API if you know what you're doing and are certain it won't damage your unit. | ||
setsetting | 0-255 | |
value | any number | |
Comments: Sets the current value of a setting using its index. The value must be specified in the "value" parameter. The new value must be within the minimum and maximum of the setting. Returns a JSON object containing the result of the API call. If successful it contains a data object with the current, previous, minimum and maximum value of the given setting, using its index. If the setting index or value is invalid, the data object contains a key failreason. Example: http://192.168.4.1/api.html?setsetting=4&value=10 |
Replace 192.168.4.1 with your actual IP
-
Set mode to medium (CVE only).
http://192.168.4.1/api.html?command=medium -
Set speed to 150 for 15 minutes (CVE only)
http://192.168.4.1/api.html?speed=150&timer=15 -
Send timer2 command with virtual remote on index 3 (CVE and non-CVE).
http://192.168.4.1/api.html?vremotecmd=timer2&vremoteindex=3 -
Send timer2 command with virtual remote on index 0 and provide username itho and password 'mysecret'.
http://192.168.4.1/api.html?vremotecmd=timer1&username=itho&password=mysecret -
Get current speed (CVE only)
http://192.168.4.1/api.html?get=currentspeed