steilerDev / homebridge-openhab2-complete

A homebridge plugin for openHAB, that has the expectation to fully support all Services offered by Apple's Homekit Accessory Protocol (HAP)
GNU General Public License v3.0
52 stars 16 forks source link

Queries and inconsistencies with thermostat service #59

Closed DigiH closed 4 years ago

DigiH commented 4 years ago

Hi,

I've just implemented all the thermostats for my setup and have some queries about the implementation, as well as finding some inconsistencies I'm unsure about:

with both Temp and the Humidity items being numbers in OH and the heatingItem being a switch.

My first question here is: Should I still see the Cooling and Auto Modes in the Home thermostat UI, even if I only have the heatingItem defined?

ThermModes

Now to the inconsistencies I'm experiencing when using the above setup:

Setting the target temperature in Home correctly sets the target temperature in OH and sending an ON to the heatingItem switch.

Only using the Mode selection from OFF to Heating in Home however, does not send either an OFF or ON command to the heatingItem switch. Reversely setting the heatingItem switch in openHAB to OFF does not set the Mode in the Home thermostat to OFF either, setting the heatingItem switch to ON brings the following - Thermostat mode stays OFF in the UI, but the new target temperature is recognised and at the top it says 'Heating to xxº'

IMG_0386

Only after quitting Home and reopening it, or sending the iPhone to sleep with this screen present and logging in again does the expected UI show.

IMG_0387

Anyone experiencing similar issues with their thermostats, or have any ideas on how to investigate this further?

Thanks

Configurations iOS 13.1.3 openHAB 2.5.0 M3 Homebridge 0.4.50 Homebridge Openhab2 Complete 1.1.0

steilerDev commented 4 years ago

Hi DigiH,

the thermostat is a pain in the a**..., I really don't like how Apple defined this service.

But I think you are not understanding the items correctly:

I hope this clarifies things.

DigiH commented 4 years ago

Hi steilerDev,

Thanks for the reply. I do understand the modes, but having only set up heatingItem for my heater valves I was still puzzled that Cooling and Auto still showed up in Homekit. Wasn't sure if this is a Homebridge or Homekit issue. My links are also fine as far as heating is concerned, apart from the issues mentioned in my original bug, parts of it looking like a possible Homekit bug ("Only after quitting Home and reopening it, or sending the iPhone to sleep with this screen present and logging in again does the expected UI show.") or the interaction between Homekit and Homebridge.

Am looking forward to seeing how things will develop and improve with future releases of both Homebdrige and Homekit/Home.

Thanks

steilerDev commented 4 years ago

Yeah, that is a HomeKit thing...one cannot tell HomeKit, that the thermostat only supports certain modes. If I recall correctly, when not specifying a mode, my plugin will always tell HomeKit "Auto", if you manually change the mode, this change will be reverted, as soon as you open/close the Home.app.

I too hope that Apple changes this, but for people living in the USA, it is very normal to have heating and cooling, which is very uncommon in central European countries, like Germany.