bvarner / gofinity

A library for interacting with the Carrier Infinity / Bryant Evolution communicating residential HVAC systems
MIT License
22 stars 3 forks source link

Boot up Sequence #2

Open Craigzyc opened 4 years ago

Craigzyc commented 4 years ago

Seems like there were some big plans for this.

The last line of the README says bootup sequence. Like you, I want to take control of my equipment and I want to remove the dependency on the infinity thermostat. I need to control the air handler and variable heat pump. Do you have any further documentation on the bootup sequence? I've been able to trick the air handler into thinking my script was a thermostat a few times but just by relaying the identical sequence the thermostat sends, doesn't actually get me anywhere.

Stuckya commented 4 years ago

I too have recently stumbled on this project, and would love to be able to build a react app that could replace my ugly infinity thermostat.

Craigzyc commented 4 years ago

I too have recently stumbled on this project, and would love to be able to build a react app that could replace my ugly infinity thermostat.

I'd be happy to work on this with you. Any other interest?

My personal interest is adding to the current control. IE zoning, pool heat reclaim, utilizing free cooling.

There seems to be some documentation about the table structures and how to read and write with the infinity connected but nothing about replacing and communicating. The boot up sequence is a big starting point.

I have captured the bootup sequence using micropython and sent the same sequence and successfully had the motor start up on the air handler but haven't dug in enough to understand the boot sequence and replicating whats needed and what isn't.

I would like to use low.js but I would be open to a raspberry pi with rs485. Either should work nicely with a tablet displaying a react app.

I was actually considering just using an ecobee and creating an interface which would control the modulation.

I think the best thing would be to make a module that will talk to the units as if its an infinity thermostat, then it can be used in either way.

mikerolica commented 4 years ago

I am interested in this as well. i have a complete variable speed modulating gas furnace, with a variable speed heat pump, infinity (ion control ) thermostat, and 2 zone control boards with 8 zones total. I also have a couple Rpi's, one with a waveshare rs485 can hat.

Stuckya commented 4 years ago

I am interested in this as well. i have a complete variable speed modulating gas furnace, with a variable speed heat pump, infinity (ion control ) thermostat, and 2 zone control boards with 8 zones total. I also have a couple Rpi's, one with a waveshare rs485 can hat.

Sounds like we have some interest! I’d be happy to collaborate on this project. I’m waiting for my RS485 hat to arrive from hwhardsoft.de.

mikerolica commented 4 years ago

I am also following a HRV project ( https://github.com/blbrock/Smart_HRV ) as i would like to be able to get the Infinity/ion thermostat to control my hrv through the ygrb terminals on the zone control board ( also used if you use a SAM.) seems this is just ttl serial logic. My HRV is a Lifebreath. but has the same type of communications.

Craigzyc commented 4 years ago

Just an idea. I think this will work. I'm going to use 2 usb to RS485 adapters. One will hook to the infinity thermostat, the other will hook to the equipment.

I'm hoping this way I can run a simple script that will bridge the 2 buses for normal operation with the thermostat. That way I can develop and work on my system without having to constantly connect and disconnect the thermostat.

bvarner commented 4 years ago

I've been offline for a bit. Yes, I had (have?) big plans for this. I've slowly been working over the last few months on reviving this work, and the things we could do.

As for documentation, I have taken serial dumps of my own system (Bryant 2 stage heatpump & variable speed and throttle gas furnace, single zone) that I've been slowly picking through. I have some differing views about the wire protocol (mostly regarding endianess) compared to many of the folks I see online, and I'm not convinced their 'it's modbus derived' assertion is anywhere near accurate. I started off ignoring their assumptions, or assuming those assumptions are wrong, and I came up with some different results.

Anyhow - Yes - I'd love to keep working on this, but my hardware at home is not setup to do that right now.

My goal was to be able to control the entire system, as if it were a SAM, and to be able to implement ambient outdoor air intake as an optimization (like an HRV) on my own. I live in a temperate zone, where there's about two months in the spring and fall where it would be far more efficient to just suck in outdoor air to achieve air temperature goals / setback temps.

Any help you guys could offer, would be great.

nebulous commented 4 years ago

The protocol is either a subset or complete implementation of the Carrier Comfort Network protocol. @jameshilliard can provide more information.

jameshilliard commented 4 years ago

@bvarner Well in #1 I fixed the command defines from a CCN reference that should be accurate, if want to message me privately I can send you more information.

Craigzyc commented 4 years ago

Incase its useful to anyone else this super simple nodejs script works perfectly as a man in the middle between the thermostat and the rest of the equipment. This is tested working with 2 cheap ch340 rs485 adapters available at 2 for $10 on amazon or a couple bucks on aliexpress. Works well to control when the thermostat connects to capture and understand the initialization of the equipment and allows you to use only the equipment port when needed to test control.

const SerialPort = require('serialport')
const thermostatPort = new SerialPort("/dev/ttyUSB1", { baudRate: 38400})
const equipmentPort = new SerialPort("/dev/ttyUSB0", { baudRate: 38400})

thermostatPort.on('data', function (data) {
    equipmentPort.write(data)
    console.log('Thermostat Data:', data)
})

equipmentPort.on('data', function (data) {
    thermostatPort.write(data)
    console.log('Equipment Data:', data)
})
Craigzyc commented 4 years ago

So I have captured endless packets and tried to replay them onto the serial bus and always thought I was missing something. As far as my air handler atleast it doesn't seem to require a bootup sequence at all.

This really simple code will run my air handler at 1750CFM with no other initialization.

const SerialPort = require('serialport')
const equipmentPort = new SerialPort("/dev/ttyUSB1", { baudRate: 38400})

cmd1750 = new Buffer.from('420120010f00000c0003050000000006d60000000000000dc4','hex')

function send1750(){
    equipmentPort.write(cmd1750)
    console.log('Sent')
}

setInterval(send1750,5000)

//This is just to see the response, not necessary
equipmentPort.on('data', function (data) {
    console.log('Equipment Data:', data)
})

060d is the big endian representation of 1750. Changing this to any other value and recalculating the checksum will run any other speed.

I know the code is hacky and thats its intent. I was basically just trying to understand whats in the capture and trying to see responses to single packets.

Craigzyc commented 4 years ago

Also using the raspberry pi with a relay script so I can disconnect the thermostat when needed has been hugely beneficial to my work. I set the nodejs program to run automatically through supervisor so it recovers after power failure and can easily be started and stopped. This way I can do what I need from the couch without having to string a cable across the room like I had before(upsetting my wife, lol)

Kyle-Falconer commented 4 years ago

I also just found this repo and am interested in controlling our Carrier system. Props to everyone interested in working on this. I'm anxious to ditch our terrible thermostats for something homegrown like one of the many open source home automation/hvac systems out there.

I found some other info that might help: I'm not sure if the "Comfort Zone II" packets would be any different from the "Infinity" system (I'd guess they're the same because it wouldn't really make sense to make yet another protocol), but I found this forum thread of people talking about decoding the packet data: https://hvac-talk.com/vbb/showthread.php?204152-Carrier-Comfort-Zone-II-packet-data/

That thread led me to this link which breaks down the serial protocol. https://github.com/nebulous/infinitude/wiki/Infinity-serial-protocol

I don't know Go, but I do plan on connecting my own thermostats up to RS485 and will attempt to sniff/send commands as well.

GMan6262 commented 3 years ago

I stumbled upon this by accident, I'm currently zoning my Carrier Infinity system with Carrier components. I'm not interested in controlling anything - but I would be very interested in being able to log energy consumption and cost - the functionality in the Infinity Touch Control Thermostat is very limited.

HansSchulze commented 1 year ago

Also interested, started installing Nest Leaning by backing the 4-wire down to legacy wiring, then found this. Would love to bridge Nest with 485.