Ok so just to close the loop @randomguy and I went through his setup. We got him working - but we had to do some strange stuff. So here’s the solution just in case we need to make some changes.
@trentfoley He could not get through the initialization of the Smartapp with the code currently in your GitHub linked from the top of this thread. we had to use the version posted by @edk208 here:
Tl;dr @edk208’s code was updated to adapt to adjustments by Nexia’s login page. Do we know if those adjustments made it into the trentfoley version?
Once he was in, he initialized properly (the child device was created) but that child device didn’t show properly in his app (ST Classic BTW, in case anyone is watching those threads)
So, it looks like he used a combination of the @edk208 app and the @synfinatic DTH both based off the @trentfoley code. (please correct me if I’m wrong @randomguy)
Is it possible to compare / contrast all the versions and push/pull all the good stuff into one working GitHub and call it working as of today’s date? (No my git is busted and I’m not very good with it, cant use mine, you would not like the result )
After multiple installs and reinstalls of the Device Handler and SmartApp noted in the above post, I finialy got the Nexia-SmartThings bridge working. Here is a step-by-step of what I did:
— Set up the bridge to your Nexia account
10. On the My SmartApps page, click ‘Simulator’ on the upper-right.
11. Select your location (mine was Home). Click ‘Save’ or ‘Update’.
12. Enter your Nexia user name, password and select an Update Frequency from the drop down list.
13. Click ‘Save’ or ‘Update’.
— Update the Device —
14. Go to the My Devices page.
15. You should see Nexia Thermostat. Select it.
16. Update the Hub and Location if they are not already set.
I hope these detailed instructions save you hours I spent trying to get it set up. I was hung up entering the Nexia account preferences and stumbled on to it when I clicked My SmartApps>Simulator. Once I did that, everything worked. There is no way to access the preferences from the My Devices page or the Settings button on the SmartThings app. Use the Simulator>Preferences page to make changes to them.
What would now be great is to publish the thermostat settings on every poll via an MQTT bridge if there is one also set up in SmartThings.
[name:error, descriptionText:Caught exception requesting thermostats: groovy.lang.GroovyRuntimeException: Cannot compare groovy.util.slurpersupport.NodeChildren with value ‘’ and java.lang.Integer with value ‘1’, displayed:true]
I had to add a call to refreshAuthToken() in requestThermostats() just before the call to httpGet(). Without it, it looks like they are returning a 200 to the http get, but the contents of the response is the login page and not the thermostat data as the app is expecting.
Sorry, that paste didn’t turn out very well. I just added the 2 lines - the call to refreshAuthToken() and the debugEvent that dumps the response to the Live Log.
@nathancu Any ideas on this one? I haven’t been able to set temp via the ST app since the 26th. If I try to set a temp the temp reverts to what is set at the thermostat. If I look at ST live logging I see the error shown here.
af142a47-1d1b-4da6-b1ad-1f7f595773ff 12:00:57 AM: error [name:error, descriptionText:Caught exception requesting thermostats: java.lang.SecurityException: Creating new class java.lang.Exception is not allowed, displayed:true]
I also see in the Nexia logs that no request has been received from ‘user portal’ since the 26th at 12:48 PM. I have made no changes in ST for months and it was working fine until the 26th, then it just stopped. I tried the solution given by @larrywho but that did not resolve the issue. Any help would be greatly appreciated.
I’m looking at it, but it’s slow going (my daughter graduates this weekend and getting the house ready for the inlaws is higher priority)
Here’s what I know.
Nexia changed something on thier website PAST the login and therefore the smartapp doesn’t enumerate thermostats correctly anymore. This will take reengineering the part of the smartapp that creates the virtual device and reads/writes status. Once we figure out how Nexia modified the web interface it can be done - but it will take time.
@trentfoley - you have time to take a crack at it… It’s going to be at least a week before I can take a shot.
@nathancu, I did some digging in this over the weekend and I don’t see where there was previously thermostat data on the Nexia side, and I’m wondering if that’s why we are getting an exception.
So, based on what I can tell tonight, theyve changed something downstream of the path variable. I dont recall having /houses/ in the url previously either.
You know something interesting I just noticed? My actiontiles/Smartthings app is still getting thermostat data, but trying to chance setpoints doesn’t work.
Hey Guys, I have a solution that works. I use IFTTT applets. IFTTT works with Smartthings and Nexia. First you create two automatons on the Nexia website, One to adjust the thermostat when you leave and the other when you arrive. Next on Smartthings create a virtual switch. Then create a Smartthings routine to turn the switch on when you arrive (using your presence sensor) and off when you leave. Now go to IFTTT and create two appllets 1) when Smatthings virtual switch is On run Nexia arrive routine. The other is when Smarttings virtual switch is off, run the Nexia leave automation.