home-climate-control / dz

Home Climate Control Core: *the* Open Source multi-zone temperature and climate control system.
http://homeclimatecontrol.com/
GNU General Public License v3.0
59 stars 7 forks source link

Make reactive shutdown orderly #277

Closed climategadgets closed 11 months ago

climategadgets commented 1 year ago

Expected Behavior

Upon receiving a termination signal, the system shuts down all the peripherals and then exits. Shutdown must be executed in this order:

  1. Disable WebUI and console
  2. Disconnect unit directors so they can't cause mischief
  3. Shut off HVAC devices and economizers
  4. Move dampers to "safe" position
  5. Disconnect collectors
  6. Disconnect connectors
  7. Put switches into "safe" state, if provided
  8. Cancel sensor streams subscriptions
  9. Deactivate MQTT and hardware drivers

Actual Behavior

The system relies on old behavior utilizing Autocloseable with Spring assist which wasn't reliable to begin with, and probably doesn't work at all in reactive branches.

Related Issues

47

climategadgets commented 11 months ago

271 contributed to this; the work is not done completely because there are still missing subsystems in reactive branch, but for the practical purposes it is complete.