dave-atx / homebridge-platform-smartac

A homebridge plug-in for ThinkEco SmartAC thermostats.
MIT License
14 stars 10 forks source link

Set device as HeaterCooler instead of Thermostat. #5

Closed DFurnes closed 5 years ago

DFurnes commented 6 years ago

Thanks for the fantastic plugin!!

I wanted to be able to tap the accessory in the Home app in order to turn on & off my air conditioner. Switching the service to be a HeaterCooler seems to have done the trick.

After swapping that, I was also able to toggle the "state" from COOLING to IDLE based on whether the thermometer read lower than the target, so that the app would show the correct icon and verb:

DFurnes commented 6 years ago

Added some error checking in 432adea, in case the thermostat is broken:

DFurnes commented 6 years ago

Updated for the new mymodlet.com in 5453fd7.

Tecnico1931 commented 6 years ago

I got it working after installing https://github.com/cheeriojs/cheerio.

DFurnes commented 6 years ago

It turns out the new website allows controlling the A/C when the thermostat is offline! I've updated this pull request's error checking in 9427bf0 to only error out with "No response" if the modlet itself is offline, and otherwise show "0°" for the current temperature to indicate if the thermostat is broken.

picnicbob commented 6 years ago

Thanks for this. So far your branch is the only way I've found to get the modlet working with homebridge again after the web update. I do have an issue now though that might be related to the HeaterCooler change, and I'm not sure if it's an Apple bug or if it's something we can fix: If an automation is run that should set the AC OFF it seems to toggle it instead, turning it ON if it is already OFF. Anyone else having this issue? I'm going to investigate a little bit today.

DFurnes commented 6 years ago

Oh, good catch @picnicbob! Fixed in cf3e48f.

matthew-gerstman commented 5 years ago

just wanna leave this command here if anyone is trying to install this branch

npm install -g https://github.com/DFurnes/homebridge-platform-smartac#cf3e48f66fbd728fa33f670ad9053c4fab184ea6

installs the plugin @DFurnes branch commit

dave-atx commented 5 years ago

Apologies for the long absence -- I moved and don't have a AC unit that can use the SmartAC devices anymore. I'll merge this in and do a new release.

If anyone would like to take over stewardship of the project, please reach out.