Error Domain=HMErrorDomain Code=54 "Network or other communication failure occurred."
I've since discovered that this error is the more frequent one that leads to a failure in setting my thermostat.
By comparison, I also have two Homekit wall plugs (the iHome SmartPlug and a Koogeek P1) and never encounter the communications error that I see with my Ecobee 3 thermostat.
I have found a post at Ecobee hinting that the thermostat reacts badly if too many commands are received in a short period of time. In my app's logic, setting the target temperature is the very last thing to occur, it happens after reading the temp and humidity, setting the seasonal mode (summer versus winter) and so on. So it's believeable that it would be the most prone to a "command overload" problem.
I see this too occasionally when updating my Ecobee thermostat. What's really strange is that my app get a notification for the motion sensor shortly after but the characteristic.value is an NSNumber rather than a Bool.