-
Notifications
You must be signed in to change notification settings - Fork 151
Description
Issue Description
I ran into a weird issue this morning. I came downstairs and it was cold. My Ecobee was off when it should have been on. When I checked the logs I see that the attempt to change mode to heat failed.
Looking at the code I noticed that when setMode() fails to change the thermostat mode (e.g., from 'off' to 'heat'), the driver and parent app do not implement any retry mechanism or queue the failed command for later execution. The failure is logged but no corrective action is taken, leaving the thermostat in an incorrect state with no automatic recovery.
Steps to Reproduce
- Thermostat is in 'off' mode
setThermostatMode('heat')is called- Parent app's
setMode()sends API request to Ecobee - API request fails (returns non-zero status code, but API connection is still 'full')
setMode()returnsfalseto driver- Driver logs error and sets
changed = false - No retry is attempted
- No queueing occurs (queueing only happens if API is not fully connected)
- Calling app/controller receives no indication that the command failed
- Thermostat remains in incorrect state
Options would be to update the driver to include a retry mechanism. And/or add in pushover or something to indicate that the API had not done what it was told to do?
Also this brought up a second issue of sending set points out when the system is not in a mode to receive it which I will post separately.