Nexia and Trane XL1050 / XL850 thermostat

I have a Nexia Trane XL824 thermostat and would be interested in this as well. As a workaround, I’m using Smartthings as a bridge via MQTT. While the Nexia thermostat isn’t supported natively by ST, someone created a smartapp and device handler that work fairly well by scraping the Nexia website. As a caveat, I haven’t been able to actually control the thermostat through HA, but I do have access to all the data (temp, humidity, etc.). I should be able to control it, though, so it’s probably an error in my setup. Which goes back to the first sentence: I’d really like an official HA component so I can get completely off of ST.

EDIT 1-Feb-2019: I decided to tinker with it this weekend, and I can now control my Trane XL824 thermostats via HA. Just took 11 months, but it seems to be pretty solid so far. If the Nexia-XL824<->Smartthings<->MQTT<->HA continues to work over the next month or so, I may move all the scheduling from the Nexia to HA. The presence detection I have with HA is far superior to that of the Nexia.

1 Like

just FYI

Got this added to OpenZwave but NoJoy. This unit does not exist in open zwave so while it is recognized sensors and control is not possible. I am thinking about adding general trane thermostat definition to this and see what happens.

This person added it to HA and noticed this. When I saw this I decided to take a look

On a side note, the XL824 can probably just be added into the “manufacturer_specific.xml” file and will just work.

I wish it were that simple. The ST forum on this topic goes into great detail about how the Trane XL824 is a Zwave controller only. As such, it can’t be added as a Zwave thermostat. That’s why they had to go the web scraper route with their smart app and device handler.

If only ssh where possible?

I may just ignore this unit(manual only) if sensor and control are not exposed by Zwave in some manner. I am not willing to keep this connected with nexia long term

I would replace both of mine altogether if I could. However, Trane has locked themselves in with Nexia, and I wouldn’t be able to control the humidifier with any other thermostat. If I were making the decision again today on what HVAC brands to consider for replacement, “open thermostat” capability would figure more prominently in the equation.

It just occurred to me, Nexia is open source.
Most code may be online for these products it may be able to compel by request.

If given some source code it may be possible to find some work around.

Another option is reverse engineering. Not impossible but I don’t have time to learn this. I tried mapping port with little success on 1050…older models have know vulnerability

I only need temp sensor data really and I now use fibaro door/window sensors for that. Will pretty much have these in all rooms.

If I ever get traction on this I will let you know

Has anyone made any progess with Trane/Nexia thermostats?

Not me!!!

Here’s a Nexia/Trane thermostat python script that hits the Nexia API. Maybe someone with some interest and know-how could integrate this.

2 Likes

Working on it. :smiley: I’ll hopefully have something pushed to GitHub for others to try out sometime this weekend. Still working out some kinks and limitations, but after running it overnight, it seems to keep run time and temperature status alive, and hasn’t thrown any errors in the log.

Unfortunately it is using what JDare started, which uses the Nexia API, as well as does POSTing to set actions, and because Nexia is a closed ecosystem (asked them for help, and they said no), it could change on a whim and it would break the component.

I want to load up the binary_sensor and sensor components with stuff.

2 Likes

Awesome! I’ll be glad to test it out… Thanks

Not to get you sidetracked or anything… But I found these old threads related to local SSH connections. I haven’t been able to find any confirmation of successful login after the firmware update, but seems like since it’s BusyBox linux you could boot to single user mode and reset the password or create a new user, etc.
http://forum.micasaverde.com/index.php/topic,7017.60.html?PHPSESSID=vjnkv3c2sicp0tjpa9sd0hp7l4
http://forum.micasaverde.com/index.php?topic=38080.0

I looked into the SSH a bit, but it only supports older firmware it seems.

Anyway, give this a shot if you want: https://github.com/ryannazaretian/home-assistant/tree/dev/homeassistant/components/nexia

You should be able to download the entire nexia folder, drop that into your custom_components directory, then configure it using this:

nexia:
  username: <your email address>
  password: <your password>
  id: <house id>
 # The house id can be found from the mynexia url:
 # https://www.mynexia.com/houses/<your id>/climate

climate:
  - platform: nexia

binary_sensor:
  - platform: nexia

sensor:
  - platform: nexia
1 Like

Excellent!

The lovelace thermostat card appears to be fully functional.

Edit: It isn’t updating properly. The status has shown idle from the start even though the fan and cooling have been going. It seems to take temp changes, though.
image

But nothing seems to work on the pop-up with all of the attributes.

They show the correct values, but changing settings gives errors. Here are a couple:

SETTING HUMIDITY HERE:

2019-06-01 13:31:59 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1802424304] 'NexiaThermostat' object has no attribute 'get_device_id'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
    connection.context(msg))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1141, in async_call
    self._execute_service(handler, service_call))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1163, in _execute_service
    await handler.func(service_call)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 194, in handle_service
    required_features
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 316, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 337, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/nexia/climate.py", line 91, in set_humidity
    self._device.set_target_humidity(humidty / 100.0)
  File "/config/custom_components/nexia/nexia_thermostat.py", line 384, in set_target_humidity
    url = self._get_thermostat_put_url("humidity_setpoints")
  File "/config/custom_components/nexia/nexia_thermostat.py", line 342, in _get_thermostat_put_url
    return "/houses/" + str(self.house_id) + "/xxl_thermostats/" + str(self.get_device_id()) + ("/" + text if text else "")
AttributeError: 'NexiaThermostat' object has no attribute 'get_device_id'


SETTING TEMP HERE:

2019-06-01 13:40:49 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1802424304] unsupported operand type(s) for +: 'NoneType' and 'int'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
    connection.context(msg))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1141, in async_call
    self._execute_service(handler, service_call))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1163, in _execute_service
    await handler.func(service_call)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 194, in handle_service
    required_features
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 316, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 339, in _handle_service_platform_call
    await func(entity, data)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/climate/__init__.py", line 559, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/nexia/climate.py", line 152, in set_temperature
    if new_heat_temp + deadband > max_temp:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

Thanks for getting this going!!!

This is great, been waiting a long time to start looking at getting our Tranes moved over the HA.

I dropped in the files and added the config which got one of our thermostats to show up. Haven’t tried it more than that, but wanted to ask if the current iteration supports more than one thermostat as our upstairs one didn’t show up?

Thanks!

//TB

Maybe try moving it to separate house (house_id) in Nexia?

I’m anticipating No answer.

I fixed the bug that was found this morning… I probably should stop pushing code when I’m tired. Oh well… I did it again. :slight_smile:

I found several bugs today and did a ton of code cleanup.

If you have multiple zones in your home, it should provide you with all of them. Do you have like a whole separate unit upstairs? I know there’s a concept of thermostat ID, but since I just have one unit, I’m not sure how your JSON would look.

Thanks for checking this out though!

If you have Python3 installed, you should be able to import the nexia_thermostat.NexiaThermostat() class after installing the requirements, and provide it your username, password, and house_id. What I would need is the JSON, which you can get by calling the print_all_json_data() and sending that to me. I don’t think any of the info in there is personal enough to worry about, but feel free to scrub it.

There are no more errors when changing settings. I’ve changed the set temps, fan mode and humidity. Thanks!

It doesn’t look like the current running status is ever updated–it always shows Idle whether it’s cooling on not. It does change the set temp and start cooling.

Do you know if hold_modes should show the schedule names? If it is, it’s not showing mine.

I have the polling rate set to 300 seconds right now. That may be a bit low for an HVAC system. Inside of nexia_thermostat.py, you should see “UPDATE_RATE = 300 # 5 minutes” on line 17. You can try decreasing that value and restarting Home Assistant. I don’t know yet if Nexia will rate limit. I do know they’ll lock your account after 5 password failures. :slight_smile:

As far as the state (Off, Idle, Cool, Heat), that comes from the get_zone_current_mode(). Mine seems to return “Damper Open”, “Relieving Air”, or “”, which seems to indicate for me that the damper is closed.

I’m guessing you have a single-zone system, i.e. no actuated dampers? I’m guessing your “zone_status” is “” all the time. I may need to get a dump of your JSON to compare with mine. If you want, for now, comment out lines 116 and 117 in climate.py.

If you don’t want to mess with Python, you can get your JSON data from the website directly:
https://www.mynexia.com/houses/<house_id>/xxl_thermostats

For the hold mode, I’ve been having intermittent issues where the modes only returns back “away”, instead of “away”, “home”, and “sleep” in my case. I don’t know of a way around this right now… perhaps we can manually set the hold modes in the configuration? Right now it’s hard coded to “away”, “home”, and “sleep”.

The actual hold mode works on mine if I call climate.set_hold_mode(). It does seem to take a minute or two to update.