Announcement

Collapse
No announcement yet.

Carrier Infinity / Bryant Evolution / Ion Thermostat Integration

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

    Carrier Infinity / Bryant Evolution / Ion Thermostat Integration

    I have been progressing on the integration of Carrier-family of equipment into HS and coming close to completion. This is effectively a continuation of the thread at https://forums.homeseer.com/forum/ho...rt-thermostats.

    I tried to become an official integrator with application to Carrier, but was ignored. My dealer told me that Carrier dropped the program when COVID arrived.

    The approach I am taking is to use the GitHub Python implementation of the API and putting a wrapper around it so it delivers and accepts MQTT communications that can then be integrated in to HS via mcsMQTT plugin. Same concept as being used by HS for ZigbeePlus plugin where the Zigbee implementation is nodejs and MQTT used to share data is a higher-level format.

    The Python code being used is the same code used for the equivalent integration in Home Assistant. The primary difference is that HA integration uses another Python wrapper while the HS integration uses MQTT.

    At this point I have the communications working to get status and some of the control functions have been tested. I am away from my house this week so I am cautious about control actions when I am not near the equipment. The devices and setup pages are shown below.

    I will be updating mcsMQTT.pdf for this integration and if early adopters are interested then let me know. This is very similar to the Hubspace (Home Depot) integration that had some user environment issues that had to be considered. Hopefully there will be none or fewer for those using this integration.

    Click image for larger version

Name:	image.png
Views:	180
Size:	165.1 KB
ID:	1649179
    Click image for larger version

Name:	image.png
Views:	117
Size:	32.4 KB
ID:	1649180

    #2
    Thanks, I'm happy to test. I have 2 ion units. I run HS on Linux. Let me know what you need.

    Comment


      #3
      Looking to test as well.

      Comment


        #4
        Thank you for continuing with this effort .... its much appreciated !

        Comment


          #5
          Originally posted by STCook View Post
          Thank you for continuing with this effort .... its much appreciated !
          +1

          Comment


            #6
            Section 12.12.3 of mcsMQTT.pdf contains the instructions for use of the Carrier integration. This file can be obtained from http://mcsSprinklers.com/mcsMQTT.pdf. IT is also available in the full install package for 6.12.8.0 at the bottom of https://forums.homeseer.com/forum/hs...ge-log-hs4-hs3.

            The installation can use either this Updater Override package or it can be done by using the delta file zip for 6.12.8.0 that is linked at the same location. The delta install requires that version 6.12.0.0 or later is already installed. The .py file goes into the python \Scripts folder per the instructions in mcsMQTT.pdf. The HSPI* files go into the HS root folder. The others go into \bin\mcsMQTT subfolder of HS.

            I have tested on Windows. I expect it to work on Linux, but I have not yet tried it.

            I have tested all controls and received the expected response as shown by the Carrier Android App.

            I have only one thermostat so the design is essentially for a single thermostat, but setup for multiple if the JSON response from carrier-api library is made available for somebody that has more than one on the same account.

            The Hold Until function provides ability to specify a specific hour or Indefinite. I do not know the format for specifying a time beyond the current day. I suspect it should show up in the data when put into Vacation mode, but not able to confirm this until next week.

            Any comments, suggestions, issues are welcome.

            Comment


              #7
              I noticed that the cloud server provides a set of Status data and a set of Config data. I had been using the Status data when it was available, but it seems the Config data would be more appropriate for things like setpoints so I updated to use this source. The HS Feature will now report the configured value rather than the status value. I do not know the criteria used by Carrier to set status vs. config, but today they were different and yesterday they were the same values.

              I also cleaned up CarrierRequest.py to report the function that failed when some type of failure occurs. Since failures are not occurring it may make no difference, but if they do then it will be easier to understand with the correct function name included in the MQTT /Response report.

              Updated 6.12.9.0 files are linked at the bottom of https://forums.homeseer.com/forum/hs...ge-log-hs4-hs3.

              Comment


                #8
                I am running linux (ubuntu 22.04).

                I've followed the instructions in the pdf. When I try to connected, I get this in the homeseer logs:

                Code:
                 [LEFT][FONT=B612 Mono][COLOR=#000000][FONT=Roboto][SIZE=16px]PostBack ICloud111103813i3=0 at System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) [0x00102] in :0 at System.Diagnostics.Process.Start () [0x00032] in :0 at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x0001b] in :0 at MCSMQTTHS4_2020.Carrier.SendCommand (System.String sFunctionIndex, System.String[] parms) [0x0027a] in :0 at MCSMQTTHS4_2020.Carrier.ExitAllCarrierPython () [0x00001] in :0 at MCSMQTTHS4_2020.Carrier..ctor (System.String sPid) [0x0004f] in :0 at MCSMQTTHS4_2020.CloudASP.AcceptCarrierEntry (System.String sValue, System.Int32 iColumn) [0x001b2] in :0 at MCSMQTTHS4_2020.CloudASP.postBackProcThread (System.String data) [0x00427] in :0 Line 0 Cannot find the specified file[/SIZE][/FONT][/COLOR][/FONT][/LEFT]



                Comment


                  #9
                  The message "Cannot find the specified file" is likely because the path entered for CarrierRequest.py is not correct or this file was not copied to the Python Scripts subfolder.

                  Comment


                    #10
                    Originally posted by Michael McSharry View Post
                    The message "Cannot find the specified file" is likely because the path entered for CarrierRequest.py is not correct or this file was not copied to the Python Scripts subfolder.
                    In linux, there isn't such a thing, but there is the pyshared folder. I have tried to both reference the full explicit path to the location it was in the HomeSeer folder as well as moving it to the pyshared folder. I still get the same error:

                    Click image for larger version

Name:	image.png
Views:	72
Size:	71.5 KB
ID:	1649534

                    Comment


                      #11
                      Note that your python path does not contain the filename of the python executable. I suspect it is python.exe. Look in the folder that you are showing for the path and see what the filename actually is for python. It needs to be specified as shown in post 1 and in mcsMQTT.pdf.

                      Comment


                        #12
                        Originally posted by Michael McSharry View Post
                        Note that your python path does not contain the filename of the python executable. I suspect it is python.exe. Look in the folder that you are showing for the path and see what the filename actually is for python. It needs to be specified as shown in post 1 and in mcsMQTT.pdf.
                        Yes it does. Linux binaries don't end in a suffix like exe. That is the path of the actual python executable. "bin" = binaries, and that is the directory. "python3" is the actual binary itself. (technically a symlink, but indistinguishable as the binary it points to, so that nuance aside this is the full path you are asking for in the instruction).

                        You are referring to windows file syntax which isn't the same as Linux.
                        Code:
                        whereis python3
                        
                        python3: /usr/bin/python3 /usr/lib/python3 /etc/python3 /usr/share/python3 /usr/share/man/man1/python3.1.gz
                        ​

                        Comment


                          #13
                          I'm installing Python 3.11.7 on my Hometroller using guide at https://realpython.com/installing-python. Previously, I tried pip install python, but that points to python 2. pip install python3 was not recognized. It has been working for a couple hours as it tries to build from source for a Debian-based system and is still going. Seems like there should be RPi binaries available for Python3.

                          One thing you can do at your end it confirm the CarrierRequest.py runs. Open a terminal. Enter the following shown below where un is Carrier username, pw is password and BrokerIP is the MQTT Broker address. If it runs it will send one MQTT message on topic Carrier/Telemetry. There could also be Carrier/Response message with issues. You will see these messages in the Association table on the MQTT page of the plugin. The HS Device and features will also be created. There could also be a file in usr/share/pyshared/CarrierDebug.txt if the file aborted before successful login. You should also see python3 as a running process if it did not abort. After the test you can kill that process.
                          Code:
                          /usr/bin/python3 usr/share/pyshared/CarrierRequest.py un pw BrokerIP

                          Comment


                            #14
                            First attempt to manually run it errored out indicating it needed aiohttp. A "pip install aiohttp" solved that problem... however, I still get the same "file not found" error within mcsMQTT/HS.

                            So I then went back and reran it directly from the cli as you request.

                            Then, looking at mosquitto output in another console window, it was sending the messages, but looked like it wouldn't authenticate:
                            Code:
                            1704512685: New connection from 192.168.1.20:56475 on port 1883.
                            
                            1704512685: Sending CONNACK to 192.168.1.20 (0, 5)
                            
                            1704512685: Client <unknown> disconnected, not authorised.
                            
                            1704512689: New connection from 192.168.1.20:54945 on port 1883.
                            
                            1704512689: Sending CONNACK to 192.168.1.20 (0, 5)
                            
                            1704512689: Client <unknown> disconnected, not authorised.
                            
                            1704512691: New connection from 192.168.1.20:50801 on port 1883.
                            
                            1704512691: Sending CONNACK to 192.168.1.20 (0, 5)
                            ​
                            So, I went to look for the CarrierDebug.txt file. It didn't exist, so I manually created it (touch CarrierDebug.txt) and added +w to the permissions. After that, I ran it from the cli again, and it was able to enter the output in the CarrierDebug.txt. It first appears as though it doesn't authenticate in the debug log. But then, it looks like it actually does authenticate because it pulls all my system details back, but I'm not sure why it's saying the authentication failed. Given there's a few details about my system I'd rather not publish publicly, I'll ping the debug log to you privately via DM.

                            Comment


                              #15
                              I will update mcsMQTT.pdf to include aiohttp in the library install list. I do not know what is going on with CarrierDebug.txt as the very first thing CarrierRequest.py does is create that file. If it exists it will delete the old one. I did observe that CarrierRequest.py on Hometroller never updated CarrierDebug.txt if it previously existed or not.

                              mcsMQTT encrypts the password when it launches CarrierRequest.py. CarrierRequest.py tries both encrypted and unencrypted formats. This is done so the user can evaluate the script via command/terminal line and then when in production the password is somewhat protected from snoopers.

                              carrier-api scripts only polled one thermostat so that is what I implemented. I have since implemented the multi-thermostat case. The new structure works for the case of a single thermostat and should work for others. When evaluating, pay specific attention to the correct thermostat in HS being updated following a command to change a parameter such as as setpoint.

                              I have been working with this on my Hometroller and found some things and there are others that could use some help for those that are more Linux-savy.

                              The file not found error is caused by mcsMQTT putting quote around the python path. This needed in Windows for the case of spaces in the path. I updated the current version so Linux installs do not include the quotes.

                              It seems in Linux there is no standard place to put python scripts. If this is the case then one should be able to just enter the path to the CarrierRequest.py that exists in /usr/local/HomeSeer/bin/mcsMQTT/CarrierRequest.py

                              It seems to me that carrier-api library needs a python3 version greater than 3.7. 3.7 was the version installed on the HomeTroller. Two attempts at installing 3.11.7 resulted in aborts after several hours of trying to build from source. The bottom line is that I do not know how to update Python to get a version 3.11 on the HomeTroller. I know from prior adventures that version 3.12 (current version) did not support some libraries that I was using in 3.11 so I do not want to install the latest version 3.12. This is where I can use some help in documenting the process from getting from a stock HomeTroller to a image that will support the Carrier integration.

                              Without the ability to install carrier-api for phython3, I am not able to evaluate the Linux integration locally. Instructions for installing 3.11 from those who are more Linux savy would be helpful for the integration and future users.

                              mcsMQTT version 6.12.9.x is targeted for Hayward Omnilogic integration which is similar to the integration that was done for Carrier. Update for Carrier will be in this or later versions of mcsMQTT.

                              What now exists in 6.12.9.1, with respect to Carrier, is the change of the python path to only add quotes if running under Windows. This will allow python to be launched and hopefully run CarrierRequest.py with its parameters. mcsMQTT Debug.txt has been enhanced to provide greater visibility in the launch sequence. The other change in this version is the expansion to include multiple thermostats. Since I have only one, I can only evaluate the case of the first thermostat, but since the structure was generalized, it should support multiple. This needs to be verified by others. The creation of multiple thermostat devices with features for each will confirm the generalized structure is working.

                              HS4 plugin is the only one I am updating with these integrations at this time. When HS4 plugin is working as desired then I will update the HS3 plugin.

                              6.12.9.1 is linked at the bottom of https://forums.homeseer.com/forum/hs...ge-log-hs4-hs3

                              Comment

                              Working...
                              X