Carrier Infinity integration


#1

I found this project and got my system connected to it

I’ve started writing a basic python client that will have utility methods to retrieve information from the JSON services that it provides for the AngularJS client to use. Would this interest anyone else?


Bryant Evolution Thermostat
#2

It looks like Carrier has upgraded their API since the most recent firmware update. I haven’t had time to sit and watch the requests go out and come back to see what the thermostat is expecting in order to update itself from the “server”.

The Infinitude service sits in the middle acting as a proxy and it intercepts outbound commands to the carrier API servers. It only stops outbound calls to redirect them to its own endpoints sometimes but it totally could work as a proxy to print request/response for analysis.

In the meantime I’ve got a python script cobbled together that can be utilized by a command line sensor and I’ve got a bunch of stuff integrated into Home Assistant. Maybe this weekend I’ll open up the proxy and make changes on the thermostat and on the Carrier web UI and watch how the conversations take place to reverse-engineer them.


#3

@quadmasta - Did you make any progress with this? I have one of these thermostats as well and would be interested in contributing if you needed some help.


#4

I just got one of these and set up infinitude. HASS integration would be next.


#5

Well here is my prototype of a custom platform for climate: (go easy on me this is my first :slight_smile: ) It requires the above github project infinitude.

Some things are still not fully implemented (It is read-only currently). Help would be appreciated.

import homeassistant.helpers.config_validation as cv
from homeassistant.components.climate import (
        ClimateDevice, PLATFORM_SCHEMA, ATTR_FAN_MODE, ATTR_FAN_LIST,
        ATTR_OPERATION_MODE, ATTR_OPERATION_LIST, SUPPORT_TARGET_TEMPERATURE,
        SUPPORT_AWAY_MODE, SUPPORT_OPERATION_MODE, SUPPORT_FAN_MODE,
        SUPPORT_TARGET_TEMPERATURE_HIGH, SUPPORT_TARGET_TEMPERATURE_LOW,
        SUPPORT_TARGET_HUMIDITY)
from homeassistant.const import (
        CONF_URL, TEMP_CELSIUS, TEMP_FAHRENHEIT,
    ATTR_TEMPERATURE, CONF_REGION)

SUPPORT_FLAGS = (SUPPORT_TARGET_TEMPERATURE | 
                 SUPPORT_TARGET_TEMPERATURE_HIGH | 
                 SUPPORT_TARGET_TEMPERATURE_LOW |
                 SUPPORT_FAN_MODE |
                 SUPPORT_TARGET_HUMIDITY
                 #| SUPPORT_OPERATION_MODE | 
                 #) # SUPPORT_AWAY_MODE | 
                 )

import requests

class PyEvolution:
    """ Early prototype of a Python library for MyEvolution with Infinitude  https://github.com/nebulous/infinitude """
    def __init__(self, url):
        self._url = url
        self._status = None


    def update(self):
        """ Update the status of the thermostat """
        thermostat_request = requests.get(self._url)

        if thermostat_request.status_code == 200:
            self._status = thermostat_request.json()['status'][0]['zones'][0]['zone'][0]

    def show_status(self):
        return self._status

    def room_temperature(self):
        return float(self._status['rt'][0])

    def heat_setpoint(self):
        return float(self._status['htsp'][0])

    def cool_setpoint(self):
        return float(self._status['clsp'][0])



def setup_platform(hass, config, add_devices, discovery_info=None):
    """Setup the sensor platform."""
    url = config.get(CONF_URL)
    add_devices([MyEvolutionThermostat(url)])


class MyEvolutionThermostat(ClimateDevice):
    """Representation of a MyEvolution thermostat."""

    def __init__(self, url):
        """Initialize the sensor."""
        self._state = PyEvolution(url)
        self._state.update()

    @property
    def supported_features(self):
        """ supported """
        return SUPPORT_FLAGS

    @property
    def name(self):
        """Return the name of the sensor."""
        return 'MyEvolution'

    @property
    def temperature_unit(self):
        """Return the unit of measurement."""
        return TEMP_FAHRENHEIT

    @property
    def fan(self):
        return self._state.show_status()['fan'][0]

    @property
    def unit_of_measurement(self):
        """Return the unit of measurement."""
        return TEMP_FAHRENHEIT

    @property
    def current_temperature(self):
        """Return the current temperature."""
        return self._state.room_temperature()

    @property
    def target_temperature_low(self):
        """ Return low """
        return self._state.heat_setpoint()

    @property
    def target_temperature_high(self):
        """ Return low """
        return self._state.cool_setpoint()

    @property
    def current_humidity(self):
        """Return the current humidity."""
        return float(self._state.show_status()['rh'][0])

    @property
    def fan_list(self):
        """Return the list of available fan modes."""
        return ["low", "med", "high", "auto"]

    #@property
    #def current_fan_mode(self):
    #    """Return whether the fan is on."""
    #    #if self._has_fan:
    #        # Return whether the fan is on
    #    #    return STATE_ON if self._fan else STATE_AUTO
    #    # No Fan available so disable slider
    #    return "med"

    @property
    def current_operation(self: ClimateDevice) -> str:
        """Return current operation ie. heat, cool, idle."""
        return "auto"

    def update(self):
        """Fetch new state data for the sensor.

        This is the only method that should fetch new data for Home Assistant.
        """
        self._state.update()
       

Example config:

climate:
  - platform: myevolution
    url: "http://myInfinitudeproxy:3000/status.json"

#6

I would like to at least get the info from my system in to home assistant ( and later control it). I have got the proxy in place and it is receiving the info, but I cant figure out how to add the code to Home Assistant.


#7

I’ve actually been using. Infinitive with my Bryant(runs the same bus and protocol as the carrier) unit. I’ve got it running on a pi zero with a rs-485 usb serial adapter that’s plugged directly into the ABCD bus.

I’ve written a python wrapper for the API and a custom component for HA. It’s working pretty well except for the hold functionality and I haven’t gotten the logic to handle the min/max setpoints. I’m hoping to have that finished this week.

I don’t have the code on github yet but I can definitely put it up if anybody is interested in testing.


#8

grr I am really annoyed by this solution … working on a python replacement. I’m just stuck now trying to update from the server side back to the thermostat.


#9

How did you fair with this? Did you ever get it sorted out? I have a Carrier system I’d like to integrate into HA and so far I’ve been SOL.


#10

I got the system up and running. It’s still got a few quirks but it works. I’ll hopefully find time to polish it up soon. First thing is to get infinitive up and running on its own. Then you can kick in the ha component. One thing you’ll want to make sure you’re using is Will1604’s fork of infinitive. It’s a little more polished and that’s the api that the pyinfinitive package is expecting. Below is a link that to a reddit post that should have enough info to get you going.

Let me know if anything isn’t clear or if you need any more info and I’ll help however I can.

https://reddit.com/r/homeassistant/comments/9ee6ak/infinitive_software_for_bryantcarrier_hvac/


#11

Great! Looking forward to your continued work on this. It’s the one thing in my system I straight up hate.


#12

I’m close to being ready to tackle this product. I feel really confident with everything except for connecting the RS-485 Adapter - RS-485 (or 232 for that matter) is not something I have worked with as far as the wiring. It looks like I will need to run some wiring from the little terminal board that comes with the product that you are using but I’m not sure what that would look like - doesn’t help that I haven’t upgraded my thermostat to the Touch one yet. Which I’m not even sure if I need to do that or if the current, non-smart, Carrier Infinity thermostat (SYSTXCCUID01-B) that I have supports this connection? Anyways - my main question is if you would be able to post a picture of the RS-485 adapter connected to the thermostat so I can have an image of what that looks like. Thanks and thanks for your work on this, I’m excited to get it going.


#13

I’m hoping to run some cable in the attic for another HA project this weekend so I’ll grab a few pics and post them.

No worries on the older thermostat. I actually think I’m running the same model. I had some extra solid core power wire up in the attic that I used for this. Just an FYI, I’ve heard of a few people having issues with stranded copper wire between the RS-485 adapter and the Carrier/Bryant board.

Also, because of the file architecture changes in the 0.88 release I’ve changed things around to be compliant. I’ve been running it at the house for the past few days and it’s been working as normal. I’ll try to get that pushed to my repo this weekend as well.


#14

That would be great, thanks for the info, that helps a lot.


#15

Below are the pics of my setup. The rs-485 adapter came with the db9 to bare wire converter.

It’s a pretty simple install. Remove the main cover on the HVAC unit then there’s a panel cover on the left-hand side you’ll need to unscrew and remove to see the board. There’s a safety trigger at the top right behind that cover that will kill power to the unit when the cover is removed. I think you can see it in one of the pics. When you replace the cover just make sure that trigger is pressed in. It’s almost impossible to put back on improperly but I managed to miss it once and you’ll get a ominous feeling in the pit of your stomach when you turn power on and nothing happens. On the Carrier board, A and B are for serial communication. C and D handle power for the thermostat so don’t plug your serial connections in those. The thermostat has a connection to ABCD and I just plugged the serial adapter into AB along side it. Once you’ve got everything put back together fire up infinitive and see what you get. There’s messages on the bus constantly so you should start seeing logs immediately. My little pi zero has been running through a 95-100 degree summer and below freezing winter and handled it like a champ.

Obligatory disclaimer:
Obviously you’re working with something that carries a lot of power so take all the necessary precautions and be safe. It’s technically not necessary to kill power to the unit but I definitely recommend it. Done safely you’ve got nothing to worry about.


#16

One thing I forgot to mention. I didn’t get the new version uploaded to github so if you’re running 0.88 you’ll get warnings but everything should still work. I’ll try to get it uploaded in the next day or so.


#17

This is perfect, thank you so much! I actually thought this was supposed to connect to the thermostat itself so this helps a lot knowing it’s to the attic unit.


#18

Glad it helps. Let me know how it goes.


#19

Will do. I ordered all of the equipment last night and it should arrive on Wednesday.


#20

Somehow this discussion flew under my radar…

I have a couple of software-only solutions that allow HA to control my Infinity thermostat, which I’ve been using for close to year.

I went a down a couple of paths in this journey:

Using Infinitude as a proxy.

I wrapped the Infinitude proxy server in a docker container, and wrote a custom climate component that used its web API. But during the development, a firmware update broke Infinitude, and there was not an active response to resolve the issue. As a result, I ended up writing my own proxy (read more below). Long story short, development eventually resumed on Infinitude, and everything seems to work again. I was already considering a cleanup of my custom component, which I could then release to the public. This thread is probably the push I need to get that done.

Using my InfinityTouch proxy

As mentioned above, when Infinitude broke, I decided to write my own custom proxy entirely in Python. This is the solution I am currently using at home, and it exposes a more robust REST API than Infinitude. It can read & write every available option on the thermostat. The only gap in functionality is that it does not support the “passthrough” mode of Infinitude, in which the proxy will sync back to the Carrier cloud, allowing you to continue using the Carrier web/app controls in addition to HomeAssistant. At this point, I don’t think I’m going to release that feature - too many quirks to work out, and I have other areas of HA that I’d like to focus my time on. But the core proxy works great - I just need to provide some basic “How to Use” instructions, and package up the corresponding custom HA component.

Anyway, just wanted to raise some awareness to other working options. I’ll try to release the missing code shortly.