Just a "short" note on a few things I've learned over the past couple of weeks and a progress update.
First, the local ecobee integration via Home Assistant is pretty limited in its functionality. It really only exposes the mode (Heat, Cool, Auto, and Off), the operating state (Heating, Cooling, or Idle), the setpoints for each mode, and the "average" temperature of the thermostat and any active remote sensors. Two things noticeably missing are the ability to monitor/control the fan status and the "comfort setting/program/schedule." The current states of "motion" and "presence" are also available for the thermostat as well as the individual states (temperature, motion, battery level) of any remote ecobee sensors. That said, even with it's limitations, it has proven to be a reliable and robust way to monitor the operating state and use that information to trigger rules within Hubitat.
On the flip side, the Universal Ecobee Suite (Community App) exposes an incredible amount of information, albeit via ecobee's cloud service. I can use UES to do things that even the native ecobee app can't do. However, because I want to avoid reliance on the cloud service, I've limited my use of the UES to only a those functions that can be operated in a "failsafe" mode if the cloud service is unavailable.
Current Equipment: Ecobee thermostat with 3 remote sensors, Raspberry Pi running Home Assistant (HA), HomeKit Controller, and Mosquitto MQTT Broker, and Hubitat Hub running xAPPO/MQTT client, 3 powered dampers (normally open) connected to a Zooz ZEN16 controlling airflow to the trunk zones.
The basic theory of operation is as follows:
The ecobee is located on the main floor and programmed with a standard shedule using the standard Programs of Home, Away, Sleep. Two additional programs (HomeB, SleepB) are also programmed but not used in the schedule (more on these later). One remote sensor is located in each main "truck" zone (basement, main floor, upstairs). The programs are set up to ignore one or more remote sensors based on expected occupancy. For example, all of the bedrooms are on the second floor, so the Sleep program is set to ignore all of the temperatures except the remote sensor on the second floor. Any manual change to the thermostat settings (setpoints, mode, etc.) results in a "Hold" that lasts until cancelled by the user.
UES reads the current program from the cloud service on a set polling interval of 1 minute. A RM rule is triggered to run if this value changes. The rule has conditional statements for each program name and sets three virtual "occupancy" switches based on the program. These occupancies must match the sensors included in the ecobee's internal program/schedule as noted above. Following the previous example, if the program name is Sleep, the occupancy switches for the basement and main floor are turned off, while the second floor switch is on.
MQTT reads the operating state locally via HA using the MQTT service. This is broadcast from the ecobee/HA and updates in real time. On a change, a RM rule is triggered that checks the state (heating, cooling, idle, etc.) and calls a separate rule to control the individual dampers.
The damper control rule first checks if the state is idle. If true, all dampers are turned off (opened) and the rule exits. It then checks to see if a manual override switch is on or off. If on, the dampers are set to a fail safe position and the rule exits. If neither of these is true, the rule sets the damper positions based on the virtual occupancy switches. Dampers in occupied zones are left open, dampers in unoccupied zones are closed. Thus, conditioned air is sent only to those zones that the ecobee is programmed to monitor. When the call for heating or cooling is satisfied, the state is changed to idle, the rule is triggered again, and all dampers are opened until the next cycle.
Now, back to the "special" programs HomeB and SleepB. Our basement is not someplace we spend a lot of time, so is programmed to be "unoccupied" for the standard programs. But sometimes we will watch movies down there or have guests in the guest bedroom and will want the basement to be conditioned with the rest of the house. So, I created the programs HomeB and SleepB in the ecobee and included the appropriate remote sensor to be included in the program. There is no way to manually select a program from the ecobee interface or from the app, but the UES can be used to force the ecobee into any stored program. So, I created a dashboard button and a rule that toggle an HE global string variable through the various programs that I've created in the ecobee. That way I can use the dashboard button to choose the HomeB or SleepB program as appropriate. The ecobee thermostat "holds" that program indefinitely. In order to resume the normal schedule, I can use the dashboard button to cancel the hold.
So far this setup has been working great. Now that the basics are covered, there are a few things I am still planning to implement...
-Verify everything will function as intended for cooling mode. Until now we've been using heating mode exclusively.
-Implement a looping rule to close the dampers to any zones that have been conditioned beyond their setpoint. For example, if two zones are "occupied" but only one has been satisfied, it's damper can be closed to force additional air to the remaining zone(s). Rule must loop and also also ensure that at least one zone is always open to maintain minimum airflow.
-Automatically change to override/failsafe mode if connectivity to the cloud is lost. Right now this is a manual intervention.