SUPLA / supla-cloud

https://www.supla.org
GNU General Public License v2.0
71 stars 46 forks source link

HVAC - add support for new configuration parameters #843

Open przemyslawzygmunt opened 3 days ago

przemyslawzygmunt commented 3 days ago

user_config: Similarly to the case of auxThermometerChannelNo, it can be a channel number or null.

{ "masterThermostatChannelNo": null, "heatOrColdSourceSwitchChannelNo": null, "pumpSwitchChannelNo": null }

klew commented 3 days ago

There will be new functions for Relay channel type:

Relay channel will support it if there is corresponding function bit set:

define SUPLA_BIT_FUNC_PUMPSWITCH 0x04000000

define SUPLA_BIT_FUNC_HEATORCOLDSOURCESWITCH 0x08000000

Those channels design/functions will be defined later (generally, those will be on/off "relays", with dedicated icon and we have not decided yet, if it should be possible to turn on/off them from app/cloud).

New HVAC configuration parameters: Those three new parameters can be set to channels within the same device (the same restriction as for main/aux thermometers and binary sensor). Parameters can be readonly and/or hidden. Additionally new parameters should be hidden:

  1. "masterThermostatChannelNo" - when there is only one HVAC channel on a device (only self)
  2. heatOrColdSourceSwitch, pumpSwitch - when there is no relay channel with heatOrColdSourceSwitch or pumpSwitch function on the same device. All parameters can be set to null or to other valid channel.

Additional logic for masterThermostatChannelNo:

  1. if set to another HVAC, then thermostat will get temperature setpoints, schedules, and mode from master thermostat, so weekly schedule should be hidden, "actions" box should be hidden (with a note, that This thermostat is controlled by another device XYZ - with a link).
  2. After setting the "master thermostat", user should be asked if "main/aux thermometers", "binary sensor", "heat or cold switch", and "pump switch" should be set to the same value as master - this is optional and user may stay with current config, or may modify those parameters later. We can show "same as master" for fields which share config with master thermostat. When shared parameters are modified on master thermostat, their setting should be reflected also on dependant thermostat.