Minimum and maximum temperature for homekit binding thermostat

Tags: #<Tag:0x00007f617bcc4cd0> #<Tag:0x00007f617bcc4b40> #<Tag:0x00007f617bcc4960>

How does one set minimum and maximum temperature for homekit. It takes the -100 to 100 range.

I tried adding
org.openhab.homekit:minimumTemperature = 10
org.openhab.homekit:maximumTemperature = 60

to the cfg file but this gives the below error. The documentation doesn’t mention the exact syntax

[ERROR] [org.openhab.io.homekit ] - [org.openhab.homekit(189)] The modified method has thrown an exception
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double
at org.openhab.io.homekit.internal.HomekitSettings.fill(HomekitSettings.java:61)
at org.openhab.io.homekit.internal.HomekitImpl.modified(HomekitImpl.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_65]
at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_65]
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:729)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:684)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:602)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:566)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:419)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.scr.impl.config.ConfigurationSupport.configurationEvent(ConfigurationSupport.java:315)[33:org.apache.felix.scr:2.0.2]
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:2046)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:2014)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]

Am I really the only one that has -100 to 100°C ranges for a thermostat in homekit ?

It makes changing the temperature set in the IOS Home application challenging. Any idea how to set min and max temperature?

Hi, I’ve resolved this by editing the configuration using paperUI. When you go Configuration - Services - HomeKit Integration - Configure - Expert mode - scroll down - Add Parameter

Add two parameters with desired values, for example
minimumTemperature with parameter 5
maximumTemperature with parameter 27

Restart OH.

I’ve figured this out after an extensive search and I’ve was frustrated with this setting for almost a year. Therefore I’ve opened pull request #2861.

3 Likes

Thanks a lot for this !!! I put your variables in the homekit.cfg file and that works as well.

— some additional input -----
This works great but one thing to bear in mind. The temp ranges are far all temp items you have defined, so not just for thermostats. In my case I also measure the outdoor temperature and the temp of the DHW (Domestic Hot Water) installation.

Initially I had configured the range something like 15 to 25°. This caused the Home app to crash because the outdoor temp and DHW temp fall out of this range. So eventually I ended up extending the range to -15 to 75 (which is not that far off of the original -100 to 100 (but still better).

I might end up taking other temps out of OH and link them through node red so they become a separate accessory for Apple Home and allowing me to reduce the ranges again to thermostat friendly ranges.

Hope this helps some other people

2 Likes

i dont get it, isnt that what you were doing before, adding the variables to the homekit.cfg in services? i am issuing the same problem, thats why i am asking :wink: