Nexia and Trane XL1050 / XL850 thermostat

Florida man… always hot and humid…

One odd thing I notice with Nexia is that the portal does not have the correct information. For example this AM it showed the compressor running. I went outside and both units were off. So with the air handlers and compressors off and the thermostat showing the compressors not running nexia.com showed them on.

See attached example…

what about the climate entity missing?

and the latest log…

errypi:/home/homeassistant/.homeassistant# ./view-ha-logs.sh
2019-08-07 13:42:54 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for nexia which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-08-07 13:43:04 ERROR (MainThread) [homeassistant.setup] Error during setup of component nexia
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 156, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/nexia/__init__.py", line 66, in setup
    from .nexia_thermostat import NexiaThermostat
  File "/home/homeassistant/.homeassistant/custom_components/nexia/nexia_thermostat.py", line 698
    if outdoor_temp.isnumeric():
    ^
IndentationError: unexpected indent
2019-08-07 13:43:07 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform nexia.binary_sensor: Unable to set up component.
2019-08-07 13:43:12 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform nexia.climate: Unable to set up component.
2019-08-07 13:43:13 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform nexia.sensor: Unable to set up component.

I’ll have to look tonight. It appears correct on GitHub, but I don’t have the repo checked out on my current PC.

paul, I got the same error, and erasing the trailing slash from line 696 fixed it for me

line 696: if self.has_outdoor_temperature(thermostat_id):\

lamandrive, that was it!

Has anyone notice the compressor speed never changing? Both of my compressors show as if they are on all the time…

|fan_speed|0.75|
|min_fan_speed|0.35|
|max_fan_speed|1|
|fan_circulation_time|30|
|compressor_speed|0.69|
|requested_compressor_speed|0.56|
|fan_type|"VSPD"|
|has_variable_speed_compressor|true|

Nevermind, I turned the breaker on both the compressor and air handler and now it seems to be working. I guess Nexia looses visibility to the compressor from the portal at times. Just in case someone else also has the issue…

Paul

I just installed this component yesterday and everything appears to work great.
Trane XV20, TZONE1050 (aka Trane ComfortLink™ II XL1050), 3 x Zones and Air Scrubber/Cleaner
I have not figured out how to add the Air Cleaner service to a Lovelace card, but not really worried.
Thanks to all the folks who worked on this project.

I just tried updating (first time since the climate rewrite) and can’t pass the config checker.

Configuration invalid
Platform error climate.nexia - cannot import name 'ATTR_AIRCLEANER_MODE' from 'custom_components.nexia' (/config/custom_components/nexia/__init__.py)

Were any changes needed in configuration.yaml?

Thanks

I never figured out what the problem was, but I went back through and cleared out all nexia-related entries in configuration.yaml and re-entered them and it’s looking good. Thanks @ryannazaretian!

1 Like

@ryannazaretian Have you considered making this it’s own repo so we can use it in hacs (https://github.com/hacs/integration)?

Thanks for your work on this regardless!

To be honest, even after using Home Assistant for 2+ years now, I haven’t ever really heard of HACs. :slight_smile:

I’m can make it into it’s own repo and get it into HACs. I’ll look into doing this today or tomorrow if I get some time.

This is great! Thanks for all the hard work. I have 3 separate nexia systems but at every reboot, they switch between the names “nativezone” “nativezone_2” and “nativezone_3”. One day the Main house system will be Nativezone_2, the next day it will be Nativezone_3. Is there any way to lock this down? Thanks!

@ryannazaretian, after trying to figure why I wasn’t always getting outdoor temps, I found the issue with get_outdoor_temperature not reliably working with Celsius values. It uses isnumeric on the string which will return False if the there’s a decimal value, such as “6.5” today. I patched locally with the following in nexia_thermostat.py:

    def is_number(self, string):
        try:
            float(string)
            return True
        except ValueError:
            return False

    def get_outdoor_temperature(self, thermostat_id=None):
        """
        Returns the outdoor temperature.
        :param thermostat_id: int - the ID of the thermostat to use
        :return: float - the temperature, returns nan if invalid
        """
        if self.has_outdoor_temperature(thermostat_id):
            outdoor_temp = self._get_thermostat_key('outdoor_temperature', thermostat_id)
            if self.is_number(outdoor_temp):
                return float(outdoor_temp)
            return float("Nan")
        raise Exception(
            "This system does not have an outdoor temperature sensor")

//TB

Hi all. New here and I have a XL1050. I’m trying to set up an automation “If outdoor temp is (n) degrees, set thermostat humidity to (n) %”. It looks as though this is not possible using Nexia. Is something like this possible using Home Assistant?

I’m guessing you just need to set the system name to something different on each thermostat.

There is some functionality to set the target humidity using the climate.set_humidity. It only controls the dehumidifying target. I wasn’t sure how to actually implement the humidify target since I don’t have a humidifier. You can set the humidity anywhere between 35% (0.35) and 65% (0.65).

I fixed it and tried to get this into a HACS compatible repo:

1 Like

I’ve given all 3 a unique name, but they still bounce back and forth between “nativezone, nativezone_2, and nativezone_3”

I have an idea as to what’s the issue. Do you know if your thermostats support zoning?

There’s a key in the JSON file provided by Nexia:

    "zoning_enabled": true,

I’m wondering if that is false, if it gives all of your non-zoned zones a generic name.

When you log into nexiahome.com, it should bring you to a URL like this:

https://www.mynexia.com/houses/<your house id>/climate

Replace “climate” with “xxl_thermostats” and you should see a huge page of text, which is the source of data I use for this integration.

In that, search for “zoning_enabled”. It should be followed by a true or a false. Please let me know what it says. I’m guessing if it says “false”, I’ll need to replace zone names with system names in the code. It should be an easy fix, but with the handful of people using this integration, your the first with this particular issue. :slight_smile: