HestiaPi / hestia-touch-openhab

OpenHAB2 files for HestiaPi Touch model
GNU General Public License v3.0
60 stars 17 forks source link

Implemented boost mode always turn on for x minutes #33

Closed rkoshak closed 4 years ago

rkoshak commented 4 years ago

Implements the change to boost mode to always turn on the device regardless of the setpoint and current sensor readings. Boost works the same for all devices. NOTE: It's possible to have a boost mode for the Fan (the Rule code is in place) but I did not add it to the UI.

Also includes minor fixes for testing whether the temp/humi and setpoints are not NULL/UNDEF before trying to use them in the lambdas.

Had to rename the Boost time Items for Humidity to match the name of the Mode Item.

Removed the mqtt Channel link from the BoostTime Items and put it on the RemBoostTime Items.

Updated the sitemap to show the RemBoostTime Item when Boost mode is actively running and allow the adjustment in minute increments. Show the BoostTime Item when not in Boost mode and have 10 minute increments.

Fixes #23.

Signed-off-by: Richard Koshak rlkoshak@gmail.com

gulliverrr commented 4 years ago

Fan can (now?) stay OFF while heating or cooling is ON. This is dangerous to melt of freeze the HVAC and should not be allowed.

rkoshak commented 4 years ago

I implemented the fan behavior from the original as far as I know. It is not challenging to add a check if someone tries to turn off the fan when heating or cooling is ON. It is already implemented such that when the heating or cooling turns ON, the Fan changes mode to AUTO and the fan turns on. But it would be possible to afterward turn OFF the FanMode. But that can be prevented with a simple check to prevent that.

It's also worth noting that it is equally as damaging to the unit to rapidly turn it on or off so adding hysteresis is a similar safety feature that needs to be added. Perhaps even a timeout preventing any changes faster than once per minute or so is required.

I'll add four layers of protection:

  1. Hide the Fan controls on BasicUI when Heating or Cooling (sitemap)
  2. Prevent/restore FanMode to Auto when Heating or Cooling (fan lambda)
  3. Prevent FanPin from turning OFF when Heating or Cooling (fan_ctrl lambda)
  4. Restore FanPin to ON if it's turned OFF when Heating or Cooling (Pin changed Rule)

I've made the changes and am testing them right now. I'll submit a new PR. I don't think I can add a new commit once a PR is merged and closed.

rkoshak commented 4 years ago

I ended up with a simpler set of checks that work. See PR #34.