How do you control a Nexia thermostat with a SmartThings hub

After looking into things over the weekend, it appears that the multiAttributeTile is not yet supported in Android (only IOS).
http://docs.smartthings.com/en/latest/device-type-developers-guide/tiles-metadata.html#multiattributetile

Thank you so much for you work. I was able to add my XL824 to ST. Is there a way to set the heat and cool set points separately if running in auto mode. When i try to change it just changes the cool set point.

In an attempt to make use of the multiAttributeTile, I coded the up/down controls to change the setpoint of the last operating mode reported back from the thermostat. It would be easy enough to add addition tiles that hooked up directly to the setHeatingSetpoint and the setCoolingSetpoint methods, rather than the setTemperature method.

Great addition to the ST capabilities. Thanks so much for the work. I seem to have a problem initially adding the device though.
"Caught exception determining thermostats path"
I’ve a single XL824 registered with Nexia and that works fine through their channels. I suspect I may be missing a step in authenticating, but for sure the account details are correct. Any thoughts?

I am getting this same message:
“Caught exception determining thermostats path”

Added device handler, added smart app, gave my nexia credentials- pressed done but nothing appears under things- Should we grant access on nexia account maybe or some other steps that I maybe missing out

Looked under notification i am getting exactly the same error "Caught exception requesting thermostats: " also i see error stating “Caught exception requesting auth token” along with “Caught exception determining thermostats path” did any one figure out a solution?

In the smart app code, look for line “authenticityToken”. Change it to match this:

def authenticityToken = loginResp.data[0].children[1].children[1].children[0].children[0].children[0].children[0].children[2].children[0].children[1].attributes()[“value”]

It seems HTML on the nexia page changed, so broke the previous logic.

4 Likes

Thanks this worked and my AC Thermostat is showing up. But my Thermostat has 2 zones and even thought the AC device shows up in the APP I can’t control the two zones.
I get this error in the logs: [name:error, descriptionText:Caught exception requesting thermostats: groovy.lang.MissingPropertyException: No such property: id for class: groovy.util.slurpersupport.Node, displayed:true]

Thankyou- worked like a charm, just made the edit last night and all items show up. Great work!

I actually successfully adding the Nexia Thermostat app and logged in, but afterwards it isn’t ‘automatically create a SmartThings device for each’ as stated above.

Is there something else needed in order to kick that part off?

Thanks in advance and for author’s work on this!

Disregard my post above. I got it working in the app, minus the ability to control multiple zones. Has anyone else had success with using multiple zones in this smart app (i.e. Only 1 thermostat, but with 2+ zones controlled by the single thermostat)

EDIT:

Looks like the zonesPath doesnt exist anymore, and therefore the zones would have to be created from the thermostatsPath JSON object. I’m going to play with it this weekend and see if I can get the zones working.

1 Like

Are there home and away controls? I don’t see them

Thank you for the Handler and App. I could not access the SmartApp from the device config - but as soon as I ran the simulator on the code the devices appeared and appear to be functioning. Did I miss something as far as accessing the SmartApp from the Android App device config?

I changed the line for authenticating token but continue to have issues logging in

def authenticityToken = loginResp.data[0].children[1].children[1].children[0].children[0].children[0].children[0].children[2].children[0].children[1].attributes()[“value”]
is the new line and editted into the smartthings script, but will not log in, i get the error

c00f8489-72fe-4789-b2b0-3b3969a3fd6c 5:58:38 PM: debug [name:debug, descriptionText:Thermostat Params: [uri:https://www.mynexia.com, path:null, headers:[Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8, Accept-Encoding:gzip, deflate, Accept-Language:en-US,en,q=0.8, Cache-Control:max-age=0, Connection:keep-alive, User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36, Cookie:locale=BAhJIgplbl9VUwY6BkVU–0edc07296637979ba240be07fd3ca03ebc5988b2; _SchlagePortal_session=dkNTRVpLOTZLcnZWSlZVMEdiRytDZzhYbzJhd2lVbWhQcVU3UjBac3pabWwvOHNySFRqMkhtL0kyMmJqWU16V2tZYlRIMUVoajI1Z1YrVkJLTFN3czNyRlk4LzBRQVdYOGZCTFAzb3NkTEhNNnBYeWZrQzhyRGJpN0hRQzkraTVVQVEvQW94U0V4YU9qdXZWZUtOM2wxbFRFRGlKTERhK2Q3UUlkRE9US0JpS2RtaFhpTCtSbnMxNjZTcW5lN2FTVytVSVVjWTgxMXhpSjNSRVd0THgrRk5Yais0TkpnTXc1eW9sWEgwSVFxamxUZDRsMHZtV1lCd3BJNVV2T3JIdjVIOWtEM3B5S0QzdGRVS1NSb0UwZE5ZUHBVNjdLSJVBQU1QZDRvMFJCemRvWDRnSE5SWXN5b0J5czYyV2kvd29vS2w5QkFCaUwzSnVPM3NDZUxNNlVqM2pTQU5XVUVFcXZpQndLL1lOOWNzWlQwdUNPa0N3S0VhMmdWbnVHRW1SeDFiOXhYeUpJaE1kM0h6TW1iNVFSTWZIMFIxaWIrRzJGcSs5T3paN3BnND0tLVRMUUlyaGlZMm00TWNEN0xnaG1VdWc9PQ%3D%3D–566dbe30e58d5422be7abacdaa7eaac17fe67673]], displayed:false]
c00f8489-72fe-4789-b2b0-303969a3fd6c 5:58:38 PM: error [name:error, descriptionText:Caught exception requesting thermostats: groovy.lang.MissingMethodException: No signature of method: script1477529665137853345437.getDeviceNetworkId() is applicable for argument types: (groovy.util.slurpersupport.NodeChildren) values: [], displayed:true]

Any ideas?

Thank you SO MUCH for this. I’ve been searching for this exact integration for ages.

To make this work, I had to do two modifications to the code:

  1. The modifications to change the authenticity token.

  2. Changing from Farenheight to Celcius. I tried changing all the references in the code for both the device and the smartapp and it works.

Everything now functions quite smoothly.

Hey just wanted to say thank you to trentfoley for writing the Nexia integration code. Just got this new thermostat today and after a couple of tries I got everything working. :slight_smile:

How do you apply this code? Where and how?

Thanks

I’m kind of new at this, but I’ve been able to get other device handlers and SmartApps added to my Smarthings.

I can’t seem to get this to work.

Added the device handler,
Added the smart App.

Made the AuthToken update.

Ran smartthings for Andriod.

I see the smartapp and can enter my nexia username and password.

But, No Things were created.

Below are the logs. What am I doing wrong.

Barry

5d433abc-a543-4076-b68a-d585404edf29 7:38:00 PM: debug [name:debug, descriptionText:Thermostat Params: [uri:https://www.mynexia.com, path:null, headers:[Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8, Accept-Encoding:gzip, deflate, Accept-Language:en-US,en,q=0.8, Cache-Control:max-age=0, Connection:keep-alive, User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36, Cookie:locale=BAhJIgplbl9VUwY6BkVU–0edc07296637979ba240be07fd3ca03ebc5988b2; _SchlagePortal_session=WW0wNys4YzdHZW5rOElhc3JwckZ6bzRzQVdxTnBSazVKRHVtR3lrdFFZRHJWcVAxNkplU2hwQjRYYVE3SVNHb3NYMnhRZEJUV2R2RlNUOUhGQXpoN3lPTFRiUkpzNjg0VW0yQTR2V2F3US9YRjJVNEtZYjhzZm1uT04rUUZkWXZPbW5XSTJWUUZaV21MSVJyS2VseVZmZEcrdXBOMm4rTTI0Uzh5MkdPTUFib2R6dWhTRXdzMUNQMUNhZ040UUZqQlpVMFV4cXNqcXRNdDlZOWUzNFhZZz09LS1lbm1DYjZreHptQW8wN3g0eHlDd013PT0%3D–a6c028800a460898774cedabcfec4ebf093499be]], displayed:false]
5d433abc-a543-4076-b68a-d585404edf29 7:38:00 PM: error [name:error, descriptionText:Caught exception requesting thermostats: groovy.lang.MissingMethodException: No signature of method: script14799478792931330073299.getDeviceNetworkId() is applicable for argument types: (groovy.util.slurpersupport.NodeChildren) values: [], displayed:true]
5d433abc-a543-4076-b68a-d585404edf29 7:38:00 PM: debug [name:debug, descriptionText:Found thermostat with ID: , displayed:false]
5d433abc-a543-4076-b68a-d585404edf29 7:37:59 PM: debug [name:debug, descriptionText:Nexia Home Request Parameters: [method:GET, uri:https://www.mynexia.com, headers:[Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8, Accept-Encoding:gzip, deflate, Accept-Language:en-US,en,q=0.8, Cache-Control:max-age=0, Connection:keep-alive, User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36, Cookie:locale=BAhJIgplbl9VUwY6BkVU–0edc07296637979ba240be07fd3ca03ebc5988b2; _SchlagePortal_session=WW0wNys4YzdHZW5rOElhc3JwckZ6bzRzQVdxTnBSazVKRHVtR3lrdFFZRHJWcVAxNkplU2hwQjRYYVE3SVNHb3NYMnhRZEJUV2R2RlNUOUhGQXpoN3lPTFRiUkpzNjg0VW0yQTR2V2F3US9YRjJVNEtZYjhzZm1uT04rUUZkWXZPbW5XSTJWUUZaV21MSVJyS2VseVZmZEcrdXBOMm4rTTI0Uzh5MkdPTUFib2R6dWhTRXdzMUNQMUNhZ040UUZqQlpVMFV4cXNqcXRNdDlZOWUzNFhZZz09LS1lbm1DYjZreHptQW8wN3g0eHlDd013PT0%3D–a6c028800a460898774cedabcfec4ebf093499be]], displayed:false]
5d433abc-a543-4076-b68a-d585404edf29 7:38:00 PM: debug [name:debug, descriptionText:requestThermostats(null), displayed:false]
5d433abc-a543-4076-b68a-d585404edf29 7:38:00 PM: error [name:error, descriptionText:Caught exception determining thermostats path: java.lang.NullPointerException: Cannot get property ‘children’ on null object, displayed:true]
5d433abc-a543-4076-b68a-d585404edf29 7:37:59 PM: debug [name:debug, descriptionText:Updating cookie: _SchlagePortal_session=WW0wNys4YzdHZW5rOElhc3JwckZ6bzRzQVdxTnBSazVKRHVtR3lrdFFZRHJWcVAxNkplU2hwQjRYYVE3SVNHb3NYMnhRZEJUV2R2RlNUOUhGQXpoN3lPTFRiUkpzNjg0VW0yQTR2V2F3US9YRjJVNEtZYjhzZm1uT04rUUZkWXZPbW5XSTJWUUZaV21MSVJyS2VseVZmZEcrdXBOMm4rTTI0Uzh5MkdPTUFib2R6dWhTRXdzMUNQMUNhZ040UUZqQlpVMFV4cXNqcXRNdDlZOWUzNFhZZz09LS1lbm1DYjZreHptQW8wN3g0eHlDd013PT0%3D–a6c028800a460898774cedabcfec4ebf093499be, displayed:false]
5d433abc-a543-4076-b68a-d585404edf29 7:37:59 PM: error [name:error, descriptionText:Caught exception refreshing auth token: java.lang.NullPointerException: Cannot get property ‘children’ on null object, displayed:true]
5d433abc-a543-4076-b68a-d585404edf29 7:37:59 PM: debug [name:debug, descriptionText:Login Params: [method:GET, uri:https://www.mynexia.com, path:/login, headers:[Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8, Accept-Encoding:gzip, deflate, Accept-Language:en-US,en,q=0.8, Cache-Control:max-age=0, Connection:keep-alive, User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36]], displayed:false]
5d433abc-a543-4076-b68a-d585404edf29 7:37:59 PM: debug [name:debug, descriptionText:Updating cookie: locale=BAhJIgplbl9VUwY6BkVU–0edc07296637979ba240be07fd3ca03ebc5988b2, displayed:false]
5d433abc-a543-4076-b68a-d585404edf29 7:37:59 PM: debug [name:debug, descriptionText:refreshAuthToken(), displayed:false]

Just wanted to give a big “Thank You” for making these and sharing with the community! :grinning: