Carrier/Bryant Infinitive Integration

@mww012 I’m loving Infinitive in Home Assistant and have also been able to push it to my Apple HomeKit App for quite some time. I noticed though that I’m getting a log error in Home assistant tied to the HomeKit integration.
‘TargetHeatingCoolingState: value=0 is an invalid value.
XX:XX:XX PM - components/homekit/type_thermostats.py (ERROR)’
If I click on the error the following shows up:
‘Logger: pyhap.characteristic
TargetHeatingCoolingState: value=0 is an invalid value.’

@scott.parmenter I haven’t noticed them but I’ll see if I’ve overlooked them in the logs. What mode (heat, cool, auto) are you running in this shows up?

Thanks @mww012. I’m currently using heat mode.

I’m running on Auto because I live in the South. This time of year I can’t figure out what to wear in the morning or how to set my HVAC, lol. Temp swing over the next week ranges from 39-78F.

I’ll find a time to kick it over to Heat and see if I hit that error.

@mww012, have you ever heard the Simple Thermostat card (https://github.com/nervetattoo/simple-thermostat)? I set it up so that I can control the fan speed from Lovelace but I’m getting an error trying to set it to medium. I think the service call is using “medium” instead of “med” somehow but I’m no developer so I’m not sure. Here’s the error:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 134, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1230, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 198, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 402, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 433, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 414, in async_set_fan_mode
    await self.hass.async_add_executor_job(self.set_fan_mode, fan_mode)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/infinitive/climate.py", line 326, in set_fan_mode
    self._inf_device.set_fanmode(fan_mode)
  File "/usr/local/lib/python3.7/site-packages/pyinfinitive/pyinfinitive.py", line 96, in set_fanmode
    raise Exception
Exception

Can you tell from that whether it’s Simple Thermostat causing the error? I can set fan speed to medium (using “med”) with a service call in Developer Tools so my guess is Simple Thermostat.

Edit: Checking States, I can see “auto,low,medium,high” are available as fan modes. I think there was an update awhile ago to address med vs medium - it seems this issue may be related to that?

Hi @mww012, just curious if you’ve had a chance to look into the error I’ve been getting regarding the TargetHeatingCooling State?

@scott.parmenter sorry for the wait on this. I haven’t been able to reproduce the error so far. I’ve been able to change modes and temps on HA, Homekit and at the thermostat and it’s working ok. What’s the exact sequence you’re doing to hit this error? Maybe I’m doing something a little different that you are.

@strikeir13 I’m pretty sure you’re right with the medium vs med issue. I pulled in the simple-thermostat card and medium fan mode doesn’t work for me either. I’m working on a fix for it now. Should have it pushed up shortly.

@strikeir13 ok. v0.0.2 should have the fan mode fix. Update it via HACS and let me know how things go.

Thanks for the quick fix, works perfectly! I can’t thank you enough for all your work on this, it is very appreciated!

Hi:
If anyone is interested and would like to test, I create a local back-end Infinitive server for those running Hassio. You can install it as a local add on from https://github.com/5310H/ha_infinitive. It will run in a Docker container on the same hardware as your HA installation. A workable solution from me, because my HA server is near the Infinity furnace, but this setup may not be for everyone.

Please post your results.

5310

@mww012 it looks like the error only comes up when I restart Home Assistant. Not a big deal. I thought it was happening more frequently.

@mww012 on second thought can you see if you get the error the next time you restart HA? I’ve been working hard at clearing everything out of my log and this is the only remaining issue I have… Thanks!

@scott.parmenter Here’s what I’ve been able to hunt down. It looks like there were changes to the homekit component that limited the HVAC mode options that were presented to the user (e.g., if your HVAC doesn’t have an “auto” mode, Homekit shouldn’t show an “auto” mode). Something about that change looks to have generated this issue. Below is another instance of this problem using the KNX thermostat. Not sure there’s much we can do about this one.

KNX Issue

Root Issue - Homekit Change

All,

Just to give a heads-up. I’m taking another swing at the KeyError: ‘mode’ issue because COVID-19 has given me a little extra free time (small silver lining in this whole fiasco). I’m running with the fix on my HA instance and if I don’t see any errors I’ll push it up this evening.

Also, I hope everyone is staying safe and coronavirus free. I don’t know what a random guy that wrote an HA integration could do to help in this situation, but if anybody needs anything I’ll offer whatever help I can.

Thanks for looking into this! It’s not impacting functionality, so all good.

I just got the (hopefully) final fix for the Keyerror ‘mode’ issue that showing up in the logs. I’ve been running on it for a few days and haven’t seen it return. The new version is v0.0.3 for anyone that wants to try it.

@mww012, no biggie, but I was seeing the following error in my HA log:

[homeassistant.loader] Error parsing manifest.json file at /config/custom_components/infinitive/manifest.json: Expecting property name enclosed in double quotes: line 8 column 1 (char 214)

I removed the comma on line line 8 in the manifest.json file on my system.
From:

“codeowners”: [“@mww012”],

to

“codeowners”: [“@mww012”]

And all is good now. Again, no biggie but thought I’d let you know.

Huh, that’s odd. I’ll look through my logs and see if I can find that error. It’s a quick fix either way.

Is anyone else seeing this error?

I found it in the home-assistant.log file itself. It doesn’t show up in the log under developer tools.