home-climate-control / dz

Home Climate Control Core: *the* Open Source multi-zone temperature and climate control system.

Home Page:http://homeclimatecontrol.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support "optimistic" switches

climategadgets opened this issue · comments

Existing Behavior

Hardware drivers verify results of setState() with getState(). Benefits: guaranteed behavior. Disadvantages: complicated control logic, chances to get stuck.

Problems with Existing Behavior

One particularly vile problem is with ESPHome switch MQTT component which reports the hardware state if it changes but doesn't report it if it stays the same, resulting in an apparent deadlock.

Behavior Adjustment

It is possible to treat hardware as 100% reliable and assume that it always accepts and executes commands, as long as reliability is enforced by other means.

Mandatory precautions

  • Optimistic behavior for performance sake must never be a default option
  • Whenever optimistic behavior is used, a clearly visible log warning must be issued.

Related Issues

#47, #271, #290