daikin-controller
daikin-controller copied to clipboard
Add support to change demand control parameters
This PR is on top of #268. It is already functional. I change the maxPower percentage change in my iobroker scripts.
@Matze2 Please rebase after merge of the read PR
Will do tonight.
Hi @Apollon77,
as requested, I rebased this PR against master. Some notes on the implementation:
Most of the code is copied from setACControlInfo and adjusted.
Based on the minimal set_demand_control API (without program schedules support) the following fields must exist:
- "type" must be 1. There is no documentation available about the type field, but it seems that demand control change is only supported if type==1
- "en_demand" must be set to 0 (OFF) or 1 (ON). In case of OFF, the API call is much simpler.
- "mode" must be set to 0 (MANUAL) or 2 (AUTO). 1 (TIMER) is in conjunction with program schedule and not supported currently to have a simple start.
- "max_power" as the demand control value itself - the reason for this PR; for now only values from 40-100 in steps of 5 are accepted. My Stylish FTXA does not accept any other value. This is checked in getRequestDict() method. It can be relaxed later IF there are models who support different ranges and steps.
This means, the following parameters can be changed with this PR:
- demand control can be activated or deactivated ("en_demand")
- the mode can be switched between MANUAL and AUTO
- the demand control limitation can be changed which is only effective for MANUAL mode
seems I lost from radar, sorry, will do next
I try to be available if there is still something to discuss