Closed NorthernMan54 closed 6 years ago
Thanks for reporting! Did you implement it in your branch and want do commit/merge?
Sorry I won't be able to merge the changes back, as I did major work to support the TCC Portal. To get the thermostat polling working correctly, I had made those changes. In principle what I changed was rather than having an if statement for each characteristic, had it update all characteristics by calling the getValue function for each. I had started down the path of adding an if for all the new characteristics, but after awhile found it easier just to call them all that way instead.
I also added a section to do this as part of device setup, so that on a restart it has the current values rather than the default ones.
Does the periodic update work successfully for you?
I cloned your work to create an implementation for the Total Comfort Connect WebSite called homebridge-tcc and found a couple of issues with your periodicUpdate function.
1 - To update the status in home kit directly, you need to use this
And not setValue. This triggers the 'get' function
myAccessories[i].device = device;
before any of the update checking, as that object is used for the status update.