Announcement

Collapse
No announcement yet.

Carrier Infinity Homeseer Integration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Carrier Infinity Homeseer Integration

    I finally have control (though limited and growing) of my Infinity HVAC system and want to share what I did to make it work. I know there is a plugin in the works, but personally I have been trying to integrate this thing since install over a year ago and this wasn't too bad to setup in the meantime while I wait for the plugin to have full control. I work from home, so the automation of the HVAC for home/away isn't really of concern for me, and the thermostat itself actually does a really good job of maintaining the system without a lot of intervention. My main goal (that my wife really wanted back from our old system), was to have the system turn on and off depending on if the windows/doors were opened (I have a delay of 2 minutes of anything opened before it turns off, so that it doesn't just turn off if you are walking into the house). And return to it's previous state once the house was closed up again.

    I warn you, this is a hack, but I have to say, probably one of the most reliable things I have in my automation setup right now. Also I will share my scripts i created, but realize, I am not a coder and though there might be better ways to create the scripts, they do work for my needs without issue . Google was very kind to me in building them.

    Things you will need:
    - Raspberry Pi (easiest to setup and use, but anything with linux can be used depending on your skills in linux)
    - Infinitude software, someone else much smarter then me reverse engineered the carrier protocol. It basically tricks your thermostat to think its calling home thru a proxy change on the thermostat itself
    - You can also get a USB to RS485 adapter if you want to connect into the serial communication on the heater, but honestly, I didn't see the need or hassle. You don't need it to control the heater.
    - You have to have the WIFI version of the carrier infinity thermostat for this to work as well.

    Ok first, get the communication going with your heater and the Pi. Go to this location and download everything. There is also a very good write up on how to install it on the Pi and get up and running:

    https://github.com/nebulous/infinitude

    Here is the direct link for the install instructions for the Pi:

    https://github.com/nebulous/infinitu...%28raspbian%29

    Once you have it installed and the thermostat setup changed to point to your new Pi (adjust the proxy setting in the wifi setup, not the physical address to carrier. This got me initially, and it will default back ). You should be able to go to the website your Pi created and see all the data coming from your heater and even control things like setpoints from it. Once this is done, the hard work is completed!

    Now to work on the integration into Homeseer. First lets get the data from the heater into HS. This is where I created a script to scrape the XML files that are hosted and updated on the Pi.

    You have two XML files that include all data you would ever want. You can adjust the scripts to add things I didn't if you want, or remove things I put in you don't think is needed.

    The two files are at this location:

    http://{Pi IP and port}/systems.xml (includes everything related to the heater and also the settings for the different profiles)

    http://{Pi IP and port}/status.xml (Includes the data for the zones, mainly what I use to receive data)

    Also there is JSON files if that is your preference at the same locations labeled systems.json and status.xml. I have attached mine so you can see the data that can be accessed.

    Create all the virtual devices you need to house the info you scrape from the XML files and adjust the script accordingly to parse it into the proper devices. Create an event to run the script, I have mine set to run every minute. It's not real time, but close enough and is only for visual needs, has no impact on the actual control of the heater.

    Now the part to actually control the heater. It is a very limited rest command structure. Things to keep in mind:
    - The heater will not take the updated settings you send to it unless the thermostat is in a resting state (don't play with it. I think this is by design that if someone is in front of it, to ignore outside setting changes. At first i thought the changes were not working, but found if I just left the thing alone, it would adjust)
    - You cannot turn the heater on/off. I have put in a request with the designer of infinitude on the github site to have this added
    - Changing to different profiles does require that a hold until is in place. Meaning if you are currently in your program for "Home" and you want to force it to away that is outside of its normal schedule, it will force a 3 hour hold until, or you can extend this by adding it into the rest command you send. Again I think this is by design on the system itself.

    What i did to pseudo control on/off of my heater is i utilize the manual profile. This does limit my other abilities to adjust remotely the temperature, but once on/off control is added into the rest commands, I will change how I do things and regain being able to utilize manual profile to temporary adjust the temperature if wanted.

    I have the manual profile set for heat to 55 degrees and cool at 90 degrees, both temps are extreme enough that the heater would never turn on if in the manual profile. This is how I mimic on/off.

    I setup two events, one attached to a timer that starts when the doors are opened and turns the heater off if the 2 min threshold is hit. And another that puts the heater back to normal once everything is closed.

    In the events (run immediate script), I send one of these two commands:

    Turns heater off:
    &hs.GetURL("10.0.254.204","/api/1/hold?activity=manual&hold=on",FALSE,3000)

    You can see this sets it to manual and turns hold on (hold status has to change for the profile to change)

    Turns heater on:
    &hs.GetURL("10.0.254.204","/api/1/hold?activity=home&hold=off",FALSE,3000)

    Turns hold off and changes activity back to home. Really the activity change doesn't matter if you turn hold off, since it will just go back to whatever profile is programmed for the time, but is needed in the URL to make the change happen. This command also sets the heater to sleep in the evenings if sleep is normally what is happening at that time.

    Here is the details from the github wiki on the rest commands:

    Set current activity thusly:
    /api/yourZoneIdMostLikely1/hold?activity=(home|away|sleep|wake|manual)&until=HH:MM&hold =(on|off)

    Edit settings for each activity like so:
    /api/yourZoneIdMostLikely1/activity/(home|away|sleep|wake|manual)?htsp=99&clsp=60&fan=(high|med| low|off)

    Files attached:
    hvac.txt - Script to scrape XML files (change to .vb once downloaded)
    status.xml - From Infinitude
    systems.xml - From Infinitude


    Attached Files

    #2
    Update:

    The programmer that made Infinitude just updated the API to be able to control everything now. You can turn it on/off set temp points, all you need to do is modify the XML thru the REST commands. Here is the info from the github request:

    Added an endpoint to get/set any single valued system variable by path. This is for basic settings. Not trying to reinvent XPath here. This is quite flexible, but as such it does zero validation. Meaning it will set your mode to heat, cool, or banana if you ask it to.



    Mode example:
    examine single variable <code>/api/config/mode</code>
    examine entire config structure <code>/api/config</code>
    set mode <code>/api/config?mode=heat</code>
    set mode and backlight at once <code>/api/config?mode=cool&blight=70</code>

    Comment


      #3
      i have been working on this some more and now have more control. I can set cool/heat setpoints, control activity and mode as well as the fan.

      I am still working on making this cleaner and more robust, but as stated earlier, I know enough about coding to be dangerous.

      I have another script now that I am using events to call on the different subs depending on the function.

      Sharing the scripts and screenshot in hopes that it helps others, or someone helps me .

      Change .txt to .vb
      Attached Files

      Comment


        #4
        way to go!

        wish i could ust go.. hey this isnt automated... there a plugin so it is now.. ....hah..
        HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

        HS - HS3 Pro Edition 3.0.0.435

        Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

        Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

        Comment


          #5
          I looked at trying my hands at creating a plugin... and well, as you see it's still scripts (and probably not even good scripts ).

          Comment


            #6
            Well, I think it's time for me to give this a whirl. I have their newer wi-fi echo enable thermostat so that may be a problem but I guess we'll just start at the beginning and look at the data the stat is sending to the proxy and go from there. Carrier does have an API they will license only the anointed and gifted and I'm told a lone homeseer user doesn't qualify and they won't release it despite my willingness to pay their license. Too bad and sad at the same time and thanks for all of the legwork you have done to-date.
            -Rick

            Comment


              #7
              Okay, I have a raspberry pi, it's working I can log into it. I was able to have it execute the preamble

              Code:
              sudo apt-get update && sudo apt-get upgrade
              sudo apt-get install cpanminus libchi-perl libmojolicious-perl libdatetime-perl libxml-simple-perl libmoo-perl libjson-maybexs-perl libhash-asobject-perl libdata-parsebinary-perl libdigest-crc-perl libcache-perl libtest-longstring-perl libio-pty-perl
              cpanm -S WWW::Wunderground::API IO::Termios
              sudo apt-get install git
              cd ~
              git clone https://github.com/nebulous/infinitude.git
              chmod +x ./infinitude/infinitude
              cd ~/infinitude
              cpanm -S --installdeps .
              cd ~/infinitude
              ./infinitude daemon -m production
              And I get the results seen in the attached image and I think this looks okay. Weather underground barked a bit I don't think that s an issue at this point. The concern I have is what IP address and port do I use the proxy setting in the thermostat. I assume it must be the Ip of the raspberry but what port do I use? Also then what do I point the browser to 127.0.0.1 or ??? to see the data.

              Kind in the deep end without much adult supervision...
              Attached Files
              -Rick

              Comment


                #8
                This is the results from the console log during the installation on the raspberry.
                Attached Files
                Last edited by rmorton27; May 11, 2018, 07:23 PM.
                -Rick

                Comment


                  #9
                  Discovered some more issues that might explain my failure, however, I have no idea what to make of the errors or more importantly what steps are needed for solving. I'm going to try another reset again and do it over to see if I can notice an error (I haven't seen one) and see if I achieve a different result.
                  Attached Files
                  -Rick

                  Comment


                    #10
                    In case anyone else stumbles through this. Eventually, I found my problem (sort of) and it was the Carrier thermostat WAS NOT conforming to the proxy IP and port. In my flailing around, I think the magic sauce needed was to power cycle the thermostat as enabling and disabling wi-fi, etc had no effect. Once the proxy was right, the rest was a piece of a cake... At least as far as I have taken it which is just to capture the data in Homeseer. Still, have to hook up the RS 485 stuff and attempt to control (yes I know I don't need the RS485 for control) the HVAC. Many thanks to waynehead99 for doing this and more importantly posting his work.

                    Also, I did have some trouble getting the scraping script to run. I was able to make it run by adding public to the sub like this: Public Sub Main(parms as object) I don't enough to know why but this solution worked for me.
                    Attached Files
                    Last edited by rmorton27; May 17, 2018, 09:39 AM.
                    -Rick

                    Comment


                      #11
                      I'm getting close to jumping on this for my 6 zone system. Just wondering what RS485 interface those already doing this are using?
                      HomeSeer Version: HS3 Standard Edition 3.0.0.548
                      Linux version: Linux auto 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
                      Number of Devices: 484 | Number of Events: 776

                      Enabled Plug-Ins: 3.0.0.13: AirplaySpeak | 2.0.61.0: BLBackup
                      3.0.0.70: EasyTrigger | 1.3.7006.42100: LiftMaster MyQ
                      4.2.3.0: mcsMQTT | 3.0.0.53: PHLocation2 | 0.0.0.47: Pushover 3P
                      3.0.0.16: RaspberryIO | 3.0.1.262: Z-Wave

                      Z-Net version: 1.0.23 for Inclusion Nodes
                      SmartStick+: 6.04 (ZDK 6.81.3) on Server

                      Comment


                        #12
                        -Rick

                        Comment


                          #13
                          Has there been progress on this for a plugin? Paying customers await anyone who creates this.

                          Comment


                            #14
                            I have the Infinitude part working, and I have the vb in my scripts folder, but it doesn't seem to do anything. Can anyone tell me how to get from here to control and feed back? I haven't started creating virtual devices, need a little direction there as well. Any help is appreciated, and any pointers to a plugin would be great, I'd gladly pay!

                            Comment


                              #15
                              Old furnace took a nosedive and having a Carrier infinity installed next week. Is this pi / infinitude option the best thing going since no plugins?

                              Comment

                              Working...
                              X