Bryant Evolution Connex Control (Thermostat)

Posted on
Tue Aug 20, 2013 6:46 pm
DirkRoper offline
Posts: 4
Joined: Aug 20, 2013

Bryant Evolution Connex Control (Thermostat)

Is anyone familiar with this device? I have a prospective customer who seems to me to be a pretty sophisticated Indigo user who has his current thermostat interfaced. He is considering a modulating Bryant furnace that requires the matched control/thermostat. Does anyone know if it can be interfaced, or even better, if someone has developed a way to do so?

Dirk Roper
Fallon Heating & Air Conditioning, LLC
(775) 882-7466

Posted on
Tue Aug 20, 2013 7:35 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Bryant Evolution Connex Control (Thermostat)

Dirk:

The docs on the Bryant site make reference to being able to interface with home automation systems, but don't provide any details... it makes reference to seeing "Evolution Connex Control Installation Instructions" for more details on interfacing with home automation.

What someone would need would be the protocol and method that is used for control (e.g. a serial connection, ethernet capabilities, etc. as well as the API, or commands and instructions, that are supported). Since they are advertising this interface as an option, I imagine that the documents exist but, most likely, can only be obtained by the dealer as a cursory search of their site did not provide it.

Adam

Posted on
Thu Aug 22, 2013 7:20 am
DirkRoper offline
Posts: 4
Joined: Aug 20, 2013

Re: Bryant Evolution Connex Control (Thermostat)

I have a manual with the Connex SAM Remote Access ASCII Protocol Information. I'm not (at least at this time) an Indigo user, so I'm not currently in a position to develop anything. I was kind of hoping someone is already on this path...

Dirk

Posted on
Fri Aug 23, 2013 3:11 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Bryant Evolution Connex Control (Thermostat)

I'm the prospective customer, and hoping that there is some way that Indigo can manage the Connex thermostat.
As I understand it, the Connex thermostat has wifi capability for communicating with the Bryant website where one can manage the thermostat, and ASCII capability for local management by a home automation system. I do not believe I own a computer with a serial interface, but am hoping that the open source ASCII codes combined with the wifi capability might provide a path for management by Indigo.
Bob

Posted on
Fri Aug 23, 2013 3:37 pm
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Bryant Evolution Connex Control (Thermostat)

Just need to find a developer who will take a look at it and see if it's possible. You might be able to get someone interested if you sweeten the pot... :D

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Aug 23, 2013 6:43 pm
dgarozzo offline
Posts: 132
Joined: Jan 08, 2009

Re: Bryant Evolution Connex Control (Thermostat)

Not sure what you have, but I have the Bryant Evolution WiFi thermostat, and there is an iPhone app that exists to control it. Once connected, your iPhone looks exactly like the WiFi stat. It's pretty nice.

Posted on
Mon Sep 02, 2013 11:29 am
DirkRoper offline
Posts: 4
Joined: Aug 20, 2013

Re: Bryant Evolution Connex Control (Thermostat)

jay (support) wrote:
Just need to find a developer who will take a look at it and see if it's possible. You might be able to get someone interested if you sweeten the pot... :D


I would be happy to entertain offers. I would be willing to help defray the cost. Depending on what percentage of the cost I defrayed, I would be willing to either relinquish or share rights.

Dirk

Posted on
Mon Sep 02, 2013 11:40 am
DirkRoper offline
Posts: 4
Joined: Aug 20, 2013

Re: Bryant Evolution Connex Control (Thermostat)

dgarozzo wrote:
Not sure what you have, but I have the Bryant Evolution WiFi thermostat, and there is an iPhone app that exists to control it. Once connected, your iPhone looks exactly like the WiFi stat. It's pretty nice.


You are correct - the online app is very nice. It gives a very consistent presentation and feature set whether you access it online, via IOS, or via Android devices. It doesn't interface with Indigo, though.

I see a couple of potential approaches:
* a script or an app that mimics an online user. Commands are sent to the web interface. Seems potentially easy to difficult, but more error prone.
* understanding the interface offered by the SAM (System Access Module), and sending commands and receiving results via a serial port on the SAM. I don't know if the right parts can be put together to do this wirelessly. My prospect doesn't think his computer has serial capability, but I've used USB to serial cables (and perhaps drivers, it's been a while) before. If serial i-o can be created on a Mac, routed via USB to a wireless transmitter that receives the signal near the thermostat, and connect to the SAM via a DB-9 connector (old style serial), I think we might have a usable (if complicated) way of handling this. The communication protocol manual seems pretty straightforward, I don't think the communication scripts would be difficult.

Dirk

Posted on
Sat Apr 04, 2015 1:20 pm
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Re: Bryant Evolution Connex Control (Thermostat)

I recognize this thread is old, but if anyone else is interested in integrating a Bryant Evolution Connex / Carrier Infinity series HVAC systems, this can be done easily, if expensively, with the following parts:

- Carrier Infinity Series Broadband Remote Access Module -- SYSTXCCRCT01
- Global Cache iTach Flex Ethernet
- Global Cache Flex Link Cable Serial
- Cynical Network

The interface is a very simple ASCII system, where you send commands like this:
Code: Select all
s1z1name?
s1z1name:Living Room
s1cfgtype?
s1cfgtype:HEATCOOL
s1z1unocc?
ds1z1unocc:OFF


It appears the system requires polling, so there's some sort of looping that will need to be done.

Someone more stilled than I could no doubt turn this into a plugin.

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Fri Jun 19, 2015 10:32 am
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Re: Bryant Evolution Connex Control (Thermostat)

If anyone else is considering a Bryant Evolution Connex / Carrier Infinity system, here is a python external script I wrote to read data out of and back into the system. I have toyed with making it a plugin, but I fear the learning curve is too steep to try with this eight thermostat system.

I wound up finding the Global Cache iTach Flex wasn't reliable enough for the application. It wound up being extremely susceptible to RFI, so I have replaced it with a StarTech NETRS2321P Serial to IP Ethernet Converter. That version follows in a separate message. I won't be updating this version regularly anymore.

Code: Select all
#! /usr/bin/python

# Bryant Evolution Connex / Carrier Infinity script for Indigo
#
#
#
# Requirements:
#
#    Bryant Evolution Connex or Carrier Infinity Communicating HVAC System
#   System Access Module (SAM) SYSTXCCRCT01
#   Global Cache iTach Flex IP to serial module
#
# Remote Access Protocol Documentation:  http://dms.hvacpartners.com/docs/1009/Public/02/APSAM01-01.pdf

import socket
import re
import time
import datetime
import indigo
import sys

arrSys = ("S1",) # Connex / Infinity can support two systems change to ("S1", "S2") if this applies
arrGloNum = ("Z1RH", "OAT", "Z1RHTG", "ZONE", "FILTRLVL", "VACDAYS", "VACMINT", "VACMAXT",
   "VACMINH", "VACMAXH", "UVLVL", "HUMLVL", "CFGDEAD", "CFGCPH")                              # Global system numeric variables
arrGloTxt = ("ZONE", "MODE", "HUMID", "BLIGHT", "FILTRRMD", "VACAT", "VACFAN", "CFGEM",
   "CFGAUTO", "CFGTYPE", "CFGPGM", "DEALER", "DEALERPH", "DAY", "TIME", "CFGFAN", "UVRMD", "HUMRMD")   # Global system text variables
arrZoneNumPriority = ("RT",)
arrZoneNum = ("HTSP", "CLSP")                                                         # Zone numeric variables
arrZoneTxtPriority = ("HOLD", "UNOCC", "OVR", "FAN")
arrZoneTxt = ("NAME", "OTMR")                                                         # Zone text variables
arrSetupVars = ("hvacStop", "hvacBusyBackground", "hvacBusyForeground", "hvacForegroundTask",
   "hvacForegroundState", "hvacForegroundZone", "hvacDefaultOverrideTime", "hvacLastError",
   "hvacLastCommand", "hvacLastCommandTime", "hvacLastCommandSent", "hvacCleanExit",
   "hvacZoneUpdatePriority", "hvacForegroundSystem")
hvacManufacturer = "Bryant"                                                            # Change to Carrier if you have OCD. 
                                                                              # Script works the same.
try:
   indigo.variables.folder.create(hvacManufacturer+" HVAC")                                 # Create Indigo variable folder if necessary
except ValueError:
   pass

try:
   indigo.variables.folder.create(hvacManufacturer+" HVAC Control")                           # Create Indigo control variable folder if necessary
except ValueError:
   pass

#
# Create Indigo Variables if necessary.
#
for i in arrSetupVars:

   try:
      indigo.variable.create(i, value="", folder=str(hvacManufacturer+" HVAC Control"))            # Create control variables if necessary
   except ValueError:
      indigo.variable.updateValue(i, value="")

indigo.variable.updateValue("hvacStop", str(False))
indigo.variable.updateValue("hvacBusyForeground", str(False))
indigo.variable.updateValue("hvacBusyBackground", str(False))
indigo.variable.updateValue("hvacDefaultOverrideTime", value="01:00")
indigo.variable.updateValue("hvacForegroundSystem", value="S1")

HOST2 = 'hvac.bollar.com'
PORT2 = 4999
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST2, PORT2))


def getHVACValue(system, zone, command, commandText):
   if string.capitalize(indigo.variables["hvacStop"].value) == str(True):
      return()

   if string.capitalize(indigo.variables["hvacBusyForeground"].value) == str(False):
      indigo.variable.updateValue("hvacBusyBackground", str(True))
      #
      # Zone Specific Commands
      #
      if zone > 0:
         try:
            s.sendall(system+"Z"+str(zone)+command+"?\r\n")
            response = unicode(s.recv(32), errors="ignore")                                  # This is the echo back from iTach
            indigo.variable.updateValue("hvacLastCommand", value=response)
            indigo.variable.updateValue("hvacLastCommandTime", value=str(datetime.datetime.now()))
            if commandText == False:
               p = re.compile("^"+system+"Z"+str(zone)+command+":(\d+)", re.IGNORECASE)
            else:
               p = re.compile("^"+system+"Z"+str(zone)+command+":(.*)", re.IGNORECASE)
            m = p.match(response)
            indigo.variable.updateValue("hvac"+system+"Z"+str(zone)+command, value=str(m.group(1)))
         except ValueError:
            indigo.variable.create("hvac"+system+"Z"+str(zone)+command, value=str(m.group(1)), folder=str(hvacManufacturer+" HVAC"))
         except AttributeError:
            indigo.variable.updateValue("hvacLastError", value=str(response))
      #
      # Global Commands
      #
      else:
         try:
            s.sendall(system+command+"?\r\n")
            response = unicode(s.recv(32), errors="ignore")                                  # This is the echo back from iTach
            indigo.variable.updateValue("hvacLastCommand", value=response)
            indigo.variable.updateValue("hvacLastCommandTime", value=str(datetime.datetime.now()))
            if commandText == False:
               p = re.compile("^"+system+command+":(\d+)", re.IGNORECASE)
            else:
               p = re.compile("^"+system+command+":(.*)", re.IGNORECASE)
            m = p.match(response)
            indigo.variable.updateValue("hvac"+system+command, value=str(m.group(1)))
         except ValueError:
            indigo.variable.create("hvac"+system+command, value=str(m.group(1)), folder=str(hvacManufacturer+" HVAC"))
         except AttributeError:
            indigo.variable.updateValue("hvacLastError", value=str(response))

      indigo.variable.updateValue("hvacBusyBackground", str(False))

   else:
      setHVACValue()
   return()

def setHVACValue():
   if string.capitalize(indigo.variables["hvacBusyForeground"].value) == str(True):
      task = (indigo.variables["hvacForegroundTask"].value)
      zone = (indigo.variables["hvacForegroundZone"].value)
      system = (indigo.variables["hvacForegroundSystem"].value)
      state = (indigo.variables["hvacForegroundState"].value)
      indigo.variable.updateValue("hvacForegroundTask", value="")
      indigo.variable.updateValue("hvacForegroundZone", value="")
      indigo.variable.updateValue("hvacForegroundState", value="")
      if zone != "0":
         s.sendall(system + "Z"+ zone + task + "!" + state + "\r\n")
      else:
         s.sendall("S1" + task + "!" + state + "\r\n")
      response = unicode(s.recv(32), errors="ignore") 
      indigo.variable.updateValue("hvacLastCommandSent", value=response)
      indigo.variable.updateValue("hvacLastCommandTime", value=str(datetime.datetime.now()))
      indigo.server.log(response)
      indigo.variable.updateValue("hvacBusyForeground", str(False))
      indigo.variable.updateValue("hvacZoneUpdatePriority", str(True))
   return()


while string.capitalize(indigo.variables["hvacStop"].value) == str(False):

      indigo.variable.updateValue("hvacZoneUpdatePriority", str(False))

   for g in arrSys:

      for i in arrZoneNumPriority:
         for x in range (1, 9):
            getHVACValue(g, x, i, False)

      for i in arrZoneNum:
         for x in range (1, 9):
            if string.capitalize(indigo.variables["hvacZoneUpdatePriority"].value) == str(False):
               getHVACValue(g, x, i, False)
            else:
               pass

      for i in arrZoneTxtPriority:
         for x in range (1, 9):
            getHVACValue(g, x, i, True)

      for i in arrZoneTxt:
         for x in range (1, 9):
            if string.capitalize(indigo.variables["hvacZoneUpdatePriority"].value) == str(False):            
               getHVACValue(g, x, i, True)
            else:
               pass

      for i in arrGloNum:
         for x in range (1, 2):
            if string.capitalize(indigo.variables["hvacZoneUpdatePriority"].value) == str(False):
               getHVACValue(g, 0, i, False)
            else:
               pass

      for i in arrGloTxt:
            if string.capitalize(indigo.variables["hvacZoneUpdatePriority"].value) == str(False):
               getHVACValue(g, 0, i, True)
            else:
               pass

s.close()
indigo.variable.updateValue("hvacStop", str(False))
indigo.variable.updateValue("hvacBusyBackground", str(False))
indigo.variable.updateValue("hvacBusyForeground", str(False))
indigo.variable.updateValue("hvacCleanExit", str(True))
indigo.server.log(hvacManufacturer + " HVAC Stopped")
Last edited by Bollar on Mon Dec 28, 2015 6:25 pm, edited 1 time in total.

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Fri Jun 19, 2015 10:37 am
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Re: Bryant Evolution Connex Control (Thermostat)

Image

I also made this control page that lets you set each zone, or the entire system home / away..


Sent from my iPhone using Tapatalk

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Mon Dec 28, 2015 6:36 pm
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Re: Bryant Evolution Connex Control (Thermostat)

Here's an updated version of the script that supports the StarTech NETRS2321P Serial to IP Ethernet Converter. It's a more robust box more suited to extreme environments (like in an attic) and I have found it more reliable than the Global Cache iTach Flex. The one significant disadvantage that it has is that the serial data returned from the HVAC comes in multiple packets. The most significant code changes relate to reassembling the stings as they come from StarTech.

I'd love to make this into a Plugin, but it surpasses my ability -- I've read the plugin and developer documentation and have been unable to apply it to this application. Perhaps it's because this system supports two HVAC systems and 16 thermostats, or perhaps I'm just missing something, but if someone has time/inclination to point me the right way, I'd appreciate it! It wold be cool to add Indigo to the supported systems list (which is basically Crestron, Home Logic and AMX).

1/3/16: Finally figured out how threads and queues work, so now this script is able to take commands from Indigo as fast as you can generate them and it'll process them all. I use this to ensure rooms are marked occupied when the motion sensors detect movement.

Code: Select all
#! /usr/bin/python

# Bryant Evolution Connex / Carrier Infinity script for Indigo
#
#
#
# Requirements:
#
#    Bryant Evolution Connex or Carrier Infinity Communicating HVAC System
#   System Access Module (SAM) SYSTXCCRCT01 or SYSTXCCSAM01 (PERHAPS OTHERS)
#   StarTech NETRS2321P IP to serial module
#
# Remote Access Protocol Documentation:  http://dms.hvacpartners.com/docs/1009/Public/02/APSAM01-01.pdf

import socket
import re
import time
import datetime
import indigo
import sys
import threading
import Queue

arrSys = ("S1",) # Connex / Infinity can support two systems.  Change to ("S1", "S2") if this applies
arrGloNum = ("Z1RH", "OAT", "Z1RHTG", "ZONE", "FILTRLVL", "VACDAYS", "VACMINT", "VACMAXT",
   "VACMINH", "VACMAXH", "CFGDEAD")                              # Global system numeric variables , "CFGCPH", "HUMLVL", "UVLVL"
arrGloTxt = ("ZONE", "MODE", "HUMID", "BLIGHT", "FILTRRMD", "VACAT", "VACFAN", "CFGEM",
   "CFGAUTO", "CFGTYPE", "CFGPGM", "DEALER", "DEALERPH", "DAY", "TIME", "CFGFAN", "UVRMD", "HUMRMD")   # Global system text variables
arrZoneNumPriority = ("RT",)
arrZoneNum = ("HTSP", "CLSP")                                                         # Zone numeric variables
arrZoneTxtPriority = ("HOLD", "UNOCC", "OVR", "FAN")
arrZoneTxt = ("NAME", "OTMR")                                                         # Zone text variables
arrSetupVars = ("hvacStop", "hvacBusyBackground", "hvacBusyForeground", "hvacForegroundTask",
   "hvacForegroundState", "hvacForegroundZone", "hvacDefaultOverrideTime", "hvacLastError",
   "hvacLastCommand", "hvacLastCommandTime", "hvacLastCommandSent", "hvacCleanExit",
   "hvacZoneUpdatePriority", "hvacForegroundSystem", "hvacLastErrorTime", "hvacLastErrorMessage")
hvacManufacturer = "Bryant"                                                            # Change to Carrier if you have OCD. 
                                                                              # Script works the same.
try:
   indigo.variables.folder.create(hvacManufacturer+" HVAC")                                 # Create Indigo variable folder if necessary
except ValueError:
   pass

try:
   indigo.variables.folder.create(hvacManufacturer+" HVAC Control")                           # Create Indigo control variable folder if necessary
except ValueError:
   pass

#
# Create Indigo Variables if necessary.
#
for i in arrSetupVars:

   try:
      indigo.variable.create(i, value="", folder=str(hvacManufacturer+" HVAC Control"))            # Create control variables if necessary
   except ValueError:
      indigo.variable.updateValue(i, value="")

indigo.variable.updateValue("hvacStop", str(False))
indigo.variable.updateValue("hvacBusyForeground", str(False))
indigo.variable.updateValue("hvacBusyBackground", str(False))
indigo.variable.updateValue("hvacDefaultOverrideTime", value="01:00")
indigo.variable.updateValue("hvacForegroundSystem", value="S1")

End = "\r\n"          # Each message from HVAC terminates in CRLF. Used to ensure data packet is completely received.

HOST2 = 'hvac.bollar.com'
PORT2 = 23
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(7.0)
s.connect((HOST2, PORT2))

#
# Define Queues
#
q = Queue.Queue(maxsize=0)

#
# Get Foreground Tasks raised by Indigo.  Note Queue is passed as (q).
#
def foregroundTasks(q):
   indigo.server.log("HVAC foregroundTasks : Starting...")
   global foreCommand
   global zone
   global system
   foreCommand = ""
   zone = ""
   system = ""
   state = ""
   while string.capitalize(indigo.variables["hvacStop"].value) == str(False):
      if string.capitalize(indigo.variables["hvacBusyForeground"].value) == str(True):
         task = (indigo.variables["hvacForegroundTask"].value)
         zone = (indigo.variables["hvacForegroundZone"].value)
         system = (indigo.variables["hvacForegroundSystem"].value)
         state = (indigo.variables["hvacForegroundState"].value)
         indigo.variable.updateValue("hvacForegroundTask", value="")
         indigo.variable.updateValue("hvacForegroundZone", value="")
         indigo.variable.updateValue("hvacForegroundState", value="")
         indigo.variable.updateValue("hvacBusyForeground", str(False))

         if int(zone) > 0:
            if indigo.variables["hvac"+system+"Z"+str(zone)+"OVR"].value == "OFF":
               foreCommand = system + "Z" + zone + task + "!" + state
               indigo.server.log("HVAC foregroundTasks ifTextCommand: " + foreCommand)
            else:
               indigo.server.log("Zone Override - Ignoring Command :" + foreCommand)
         else:
            foreCommand = system + task + "!" + state
            indigo.server.log("HVAC foregroundTasks elseTextCommand: " + foreCommand)

         indigo.server.log("HVAC foregroundTasks qTextCommand: " + foreCommand)
         q.put(foreCommand)

      else:
         time.sleep(0.1)
   indigo.server.log("HVAC foregroundTasks : Stopping...")


def getHVACValue(system, zone, command, commandText):
#   indigo.server.log("HVAC getHVACValueLocal foreCommand: " + foreCommand + " " + str(q.qsize()))
   response = ""
   if string.capitalize(indigo.variables["hvacStop"].value) == str(True):
      return()

   if  q.empty():
      indigo.variable.updateValue("hvacBusyBackground", str(True))
      #
      # Zone Specific Commands
      #
      if zone > 0:
         try:
            s.sendall(system+"Z"+str(zone)+command+"?\r\n")

            response = receiveHVACValue(s)

            indigo.variable.updateValue("hvacLastCommand", value=response)
            indigo.variable.updateValue("hvacLastCommandTime", value=str(datetime.datetime.now()))
            if commandText == False:
               p = re.compile("^"+system+"Z"+str(zone)+command+":(\d+)", re.IGNORECASE)
            else:
               p = re.compile("^"+system+"Z"+str(zone)+command+":(.*)", re.IGNORECASE)
            m = p.match(response)
            if m is None:
               pass
            else:
               indigo.variable.updateValue("hvac"+system+"Z"+str(zone)+command, value=str(m.group(1)))
         except ValueError:
            indigo.variable.create("hvac"+system+"Z"+str(zone)+command, value=str(m.group(1)), folder=str(hvacManufacturer+" HVAC"))
         except AttributeError as e:
            indigo.server.log("HVAC getHVACValueLocal AttributeError: " + str(e))
            indigo.variable.updateValue("hvacLastError", value=str(response))
            indigo.variable.updateValue("hvacLastErrorMessage", value=str(e))
            indigo.variable.updateValue("hvacLastErrorTime", value=str(datetime.datetime.now()))
         except StandardError as e:
            time.sleep(10.0)
            indigo.server.log("HVAC getHVACValueLocal StandardError: " + str(e))
            indigo.variable.updateValue("hvacLastError", value=str(response))
            indigo.variable.updateValue("hvacLastErrorMessage", value=str(e))
            indigo.variable.updateValue("hvacLastErrorTime", value=str(datetime.datetime.now()))
         return()

      #
      # Global Commands
      #
      else:
         try:
            s.sendall(system+command+"?\r\n")
            response = receiveHVACValue(s)

            indigo.variable.updateValue("hvacLastCommand", value=response)
            indigo.variable.updateValue("hvacLastCommandTime", value=str(datetime.datetime.now()))
            if commandText == False:
               p = re.compile("^"+system+command+":(\d+)", re.IGNORECASE)
            else:
               p = re.compile("^"+system+command+":(.*)", re.IGNORECASE)
            m = p.match(response)
            if m is None:
               return None
            else:
               indigo.variable.updateValue("hvac"+system+command, value=str(m.group(1)))
         except ValueError:
            indigo.variable.create("hvac"+system+command, value=str(m.group(1)), folder=str(hvacManufacturer+" HVAC"))
         except AttributeError as e:
            indigo.server.log("HVAC getHVACValueGlobal AttributeError: " + str(e))
            indigo.variable.updateValue("hvacLastError", value=str(response))
            indigo.variable.updateValue("hvacLastErrorMessage", value=str(e))
            indigo.variable.updateValue("hvacLastErrorTime", value=str(datetime.datetime.now()))
         except StandardError as e:
            time.sleep(10.0)
            indigo.server.log("HVAC getHVACValueGlobal StandardError: " + str(e))
            indigo.variable.updateValue("hvacLastError", value=str(response))
            indigo.variable.updateValue("hvacLastErrorMessage", value=str(e))
            indigo.variable.updateValue("hvacLastErrorTime", value=str(datetime.datetime.now()))
      try:
         indigo.variable.updateValue("hvacBusyBackground", str(False))
      except StandardError as e:
         time.sleep(10.0)
         indigo.server.log("HVAC getHVACValueGlobal StandardError: " + str(e))
         indigo.variable.updateValue("hvacLastError", value=str(response))
         indigo.variable.updateValue("hvacLastErrorMessage", value=str(e))
         indigo.variable.updateValue("hvacLastErrorTime", value=str(datetime.datetime.now()))
      return()

   else:
      setHVACValue()
   return()

def setHVACValue():
   response = ""
   foreCommand = q.get()
   indigo.server.log("HVAC foregroundTasks : Queue= " + foreCommand + " " + str(q.qsize()))
   try:
      s.sendall(foreCommand + "\r\n")
      foreCommand = ""
      response = receiveHVACValue(s)

   except ValueError:
      indigo.variable.create("hvac"+system+command, value=str(m.group(1)), folder=str(hvacManufacturer+" HVAC"))
   except AttributeError as e:
      indigo.server.log("HVAC setHVACValue AttributeError: " + str(e))
      indigo.variable.updateValue("hvacLastError", value=str(response))
      indigo.variable.updateValue("hvacLastErrorTime", value=str(datetime.datetime.now()))
   except StandardError as e:
      time.sleep(10.0)
      indigo.server.log("HVAC setHVACValue StandardError: " + str(e))
      indigo.variable.updateValue("hvacLastError", value=str(response))
      indigo.variable.updateValue("hvacLastErrorMessage", value=str(e))
      indigo.variable.updateValue("hvacLastErrorTime", value=str(datetime.datetime.now()))
   finally:
      indigo.variable.updateValue("hvacLastCommandSent", value=response)
      indigo.variable.updateValue("hvacLastCommandTime", value=str(datetime.datetime.now()))
      indigo.server.log("HVAC setHVACValue Response: " + response)
      indigo.variable.updateValue("hvacBusyForeground", str(False))
      indigo.variable.updateValue("hvacZoneUpdatePriority", str(True))
   return()

#
# Receives and parses data returned from HVAC
# http://code.activestate.com/recipes/408859-socketrecv-three-ways-to-turn-it-into-recvall/
#

def receiveHVACValue(s):
   total_data = []
   response = ""
   while True:
           data = unicode(s.recv(32), errors="ignore")
           if End in data:
               total_data.append(data[:data.find(End)])
               response = "".join(total_data)
               break
           total_data.append(data)
           if len(total_data)>1:
               #check if end_of_data was split
               last_pair=total_data[-2]+total_data[-1]
               if End in last_pair:
                   total_data[-2]=last_pair[:last_pair.find(End)]
                   total_data.pop()
                   break
       return(response)

#
# Set up thread to get foregrounds tasks from Indigo.  Note it calls the Queue (q) as an arg.
#
t1 = threading.Thread(name='t1', target=foregroundTasks, args=(q,))
t1.daemon = True
t1.start()

#
# Main loop.  Cycles through each zone and global command in sequence.  Each command takes about five seconds to execute.
#
while string.capitalize(indigo.variables["hvacStop"].value) == str(False):

   indigo.variable.updateValue("hvacZoneUpdatePriority", str(False))

   for g in arrSys:

      for i in arrZoneNumPriority:
         for x in range (1, 9):
            getHVACValue(g, x, i, False)

      for i in arrZoneNum:
         for x in range (1, 9):
            if string.capitalize(indigo.variables["hvacZoneUpdatePriority"].value) == str(False):
               getHVACValue(g, x, i, False)
            else:
               pass

      for i in arrZoneTxtPriority:
         for x in range (1, 9):
            getHVACValue(g, x, i, True)

      for i in arrZoneTxt:
         for x in range (1, 9):
            if string.capitalize(indigo.variables["hvacZoneUpdatePriority"].value) == str(False):            
               getHVACValue(g, x, i, True)
            else:
               pass

      for i in arrGloNum:
         for x in range (1, 2):
            if string.capitalize(indigo.variables["hvacZoneUpdatePriority"].value) == str(False):
               getHVACValue(g, 0, i, False)
            else:
               pass

      for i in arrGloTxt:
            if string.capitalize(indigo.variables["hvacZoneUpdatePriority"].value) == str(False):
               getHVACValue(g, 0, i, True)
            else:
               pass

s.close()
indigo.variable.updateValue("hvacStop", str(False))
indigo.variable.updateValue("hvacBusyBackground", str(False))
indigo.variable.updateValue("hvacBusyForeground", str(False))
indigo.variable.updateValue("hvacCleanExit", str(True))
indigo.server.log(hvacManufacturer + " HVAC Stopped")

Last edited by Bollar on Mon Jan 04, 2016 3:25 pm, edited 3 times in total.

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Thu Dec 31, 2015 6:02 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Bryant Evolution Connex Control (Thermostat)

Bollar wrote:
I'd love to make this into a Plugin, but it surpasses my ability -- I've read the plugin and developer documentation and have been unable to apply it to this application. Perhaps it's because this system supports two HVAC systems and 16 thermostats, or perhaps I'm just missing something, but if someone has time/inclination to point me the right way, I'd appreciate it!

Have you taken a look at the Indigo Plugin SDK? It includes an example thermostat plugin which has the python code/hooks and XML for defining a new thermostat device type. It is commented pretty well in the python source and XML files, so take a look at the source. If you have any questions about it, then let us know.

Image

Posted on
Thu Dec 31, 2015 6:05 pm
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Re: Bryant Evolution Connex Control (Thermostat)

matt (support) wrote:
Have you taken a look at the Indigo Plugin SDK? It includes an example thermostat plugin which has the python code/hooks and XML for defining a new thermostat device type. It is commented pretty well in the python source and XML files, so take a look at the source. If you have any questions about it, then let us know.

Thanks!

I have looked at it, but my actual coding ability is about one step above a million monkeys in front of a million typewriters. I have yet to make it make sense to me.

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Mon Jan 04, 2016 3:23 pm
Different Computers offline
User avatar
Posts: 2541
Joined: Jan 02, 2016
Location: East Coast

Re: Bryant Evolution Connex Control (Thermostat)

It's awesome and amazing someone is making this happen for Indigo. I'm not aware of any other HA system that can talk to Carrier Infinity. Pro ones, sure, but not end user systems.

This may well be the ultimate persuasion necessary for me to jump to Indigo. Even though my Carrier system is just one zone!

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Who is online

Users browsing this forum: No registered users and 8 guests

cron