Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
273 lines (135 sloc) 12.1 KB

device-type-MyNext integration

My Next devices

Author: Yves Racine

linkedIn profile:

Date: 2018-01-06

You can now download the code at

P.S. Technical support packages are also available.

Setup time: about 10-20 minutes depending on your ST skills.


  • a) Your Nest products fully operational and connected to Nest Home via the internet

    Please note that all Nest devices are supported except the Nest thermostat E in the UK (with the heat link) and the Nest Secure Alarm. The Nest Hello only appears as a Nest Cam (not other special features).

  • b) Nest setup completed for your Nest devices under your Nest Primary account (don't use any Nest secondary accounts for the integation with SmartThings!!).

  • (c) Location set for your ST account under the ST classic mobile app

Under the ST classic mobile app, click on the 3-horizontal lines- "hamburger"- menu in the upper left corner, and then the "gear'" icon to review your location and save it. You can refer to the SmartThings' documentation for more details.

  • (d) Determine your shard, please consult this thread:

Or the SmartThings documentation here for more details:

If you are on a different shard, you need to change the links below for your right shard. As an example, in North America,

replace by

Or use to point to the right shard.

  • (e) For the Nest Cam, if you want to get live streaming under ST, you'd need to share publicly and turn off the 2-step authentication for your cam (as the Nest-ST integration cannot support it) to make it work.

For more details, refer to


1) Depending on your contribution, create one or multiple Device Handler Type(s) - DTH for My Next Tstat or Next alarm or Next Cam

For each device (My Next Tstat, My Next Alarm, My Next Cam),

a) Go to (or whatever your shard is and click on My Device Handlers in the IDE's top menu)

b) Hit the "+New Device Handler" at the top right corner

c) Hit the "From Code" tab on the left corner

d) Copy and paste the code from the corresponding txt file in the zip

The code has been sent to you via your paypal verified email address.

e) Hit the create button at the bottom

f) Hit the "publish/for me" button at the top right corner (in the code window)

2) Create a new smartapp (MyNextManager)

a) Go to (or whatever your shard is, and click on My Smartapps in the IDE's top menu)

b) Hit the "+New SmartApp" at the top right corner

c) Hit the "From Code" tab on the left corner

d) Copy and paste the code from the corresponding txt file in the zip

The code has been sent to you via your paypal verified email address.

e) Hit the create button at the bottom

f) Make sure that "enable OAuth" in Smartapp is active

  • Goto app settings (top right corner, click on it)
  • Click on Oauth (middle of the page), and enable OAuth in Smart app
  • Hit "Update" at the bottom

g) Go back to the code window, and hit the "publish/for me" button at the top right corner

If the instructions above are not clear enough, you can refer to the troubleshooting section below with some pictures:

3) Under the ST classic mobile app, execute MyNextManager (MarketSpace>Smartapps>MyApps)

Click on the Smartapps link in the upper section of the following Marketspace screen (last icon in the bottom menu), and then Smartapps/MyApps (last item in the list).

To execute MyNextManager, find the MyNextManager smartapp under MarketSpace>Smartapps>MyApps, My Next Manager should be in the middle of the list. To start the Authentication with Nest, press on the "Nest Connect> Required" button in the middle of the screen.

When prompted for the login, you'd need to use your Nest primary account -the one that you originally used to link your Nest devices) ; not any secondary accounts as it will not work otherwise.

After signing-in, you need to accept all the permissions needed to connect your Nest devices to SmartThings by scrolling down and pressing the accept button at the bottom of the page.

After being connected, click 'Next' and select your Nest devices that you want to control from Smartthings and, then press till 'Other Settings &Notification' page, and then 'Done' or 'Save' when finished.

N.B. If you have any errors:

If you get a blank screen after pressing 'Next or you get the following error: "Error - bad state' or 'Java.lang.NullPointerException: Cannot get property 'accessToken' on null object" in the IDE', you'd need to enable oAuth as specified in step 2f) above.

At the end of the authorization flow, if you have the following error message: "Unexpected error" even if you press several times, this probably means that you have not "saved & published" one of the Device Handler Types (MyNextTstat,MyNextAlarm,MyNextCam) under the right shard. Refer to the prerequisites & step 1 for more details.

Also, depending on the ST platform status, you may have to press "Save" several times if you have the following error message: "Error processing your request - please try again". This is due to some ST platform timeouts due to rate limiting.

4) Your device(s) should now be ready to process your commands

After about 1 minute, You should see your newly Next devices instantiated under:

a) (or whatever your shard is and click on My Devices in the IDE's top menu)

And also

b) Under the ST classic mobile app, under MyHome/Things (main menu at the bottom of the screen).

5) To populate the UI fields for your newly created device(s), press the "refresh" tile

If the fields are blank, you may have to hit the 'refresh' button on your newly created Next devices as the smartThings UI is not always responsive.

If you have to create many Nest devices under SmartThings, due to Nest's rate limiting issues, you may have to wait before seeing some values coming from Nest.

Refer to

6) (Optional) Set device's preferences

a) Go to (or whatever your shard is and click on My Devices in the IDE's top menu)

b) Click on the Next Devices that you just created

c) Click on Preferences (edit)

N.B. You can also edit the preferences under Things/Your Device/Edit Device using the app.

You only need to edit the following parameters

(a) <trace> when needed, set to true to get more tracing (no spaces)
(b) <logFilter:1..5> Values=[Level 1=ERROR only,2=<Level 1+WARNING>,3=<2+INFO>,4=<3+DEBUG>,5=<4+TRACE>]

P.S. Don't enter any values for the internal ID or the structure ID as those values are provided by the Service Manager during the authentification flow

7) Use some of my smartapps (optional)

Some complimentary smartapps at my github, refer to:


a) NestChangeMode


Change your Nest Away/Home settings according to your ST (location) hello home mode.


b) NestGetTips and EcobeeGenerateXXXstats/b>


The smartapp allows the user to get comfort & energy tips based on his/her indoor/outdoor conditions at home.


c) TstatStateTriggerHA


The above smartapp allows a ST user to trigger some switch(es) (turn on/off or flash) and/or trigger a hello phrase routine when the thermostat is cooling/heating/running the fan/or idle.


d) Zoning smartapps


The following zoned Heating/cooling smartapps have many features to leverage your Nest Thermostat.

  • User friendly Dashboard and workflow pages for easier setup (i.e. Dashboard->GeneralSetup->RoomsSetup->ZonesSetup->SchedulesSetup-> NotificationSettings).
  • Flexible schedule definition: you can define up to 12 schedules for your zones (mornings, weekdays, evenings, nights, weekends, etc.)
  • Remote Sensors: choice of temp calculation method (Average, Median, Minimum, Maximum, Heat/Min-Cool/Max) based on all room temp sensors inside the zone so that your heat/cool settings are adjusted at the main thermostat even if your rooms are far away. The average calculation is similar to the ecobee3's follow me feature with its remote sensors.
  • For each schedule, ST users can define the start & end times, the thermostat's heating/cooling setpoints (or climates for ecobee), the max temp adjustment based on the chosen calculation method (avg, median, min, max, etc.)
  • You can set your schedules to run only for some routines/ST hello modes (ex. 'Away', 'Home', 'Night', or your own customized ones )
  • For each schedule, you can assign the included zone(s) according to your own requirements (ex. Upstairs bedrooms, 1st level, basement, etc)
  • You can define up to 8 zones for your home which can include up to 16 rooms
  • Ability to set your smart thermostat to 'Away' or 'Present' based on all rooms' motion sensors
  • Ability to set the thermostat's fanMode ('on', 'auto', 'circulate') during a specific schedule
  • Ability to trigger the thermostat's fan based on some indoor temp differential. The temp differential can be customized for each schedule.
  • Ability to adjust your main thermostat's settings (every 5 minutes) based on an outdoor temp sensor (optional)
  • and many more features...




For more details:

The smartapp that enables Multi Zoned Heating/Cooling Solutions based on any ST connected thermostats/sensors- - coupled with smart vents (optional, can be any Flair, Keen Home, EcoVent, EcoNet smart vents) for better temp settings control throughout your home".

The smartapp will use the thermostat's setpoints as baselines for targeted heating/cooling based on the concept of virtual/physical zones.

The smartapp can also control multiple Minisplit/Windows unit and portable heaters/coolers inside your scheduled zones (based on the Flair HVACUnit device, see




For more details:

The smartapp allows you to define some rooms' thresholds for better control of hotter/colder rooms in your premises. Smart vents are required for creating the physical zones.

You can’t perform that action at this time.