[Depecrated] My Next Manager for your Nest® Tstats (firmware below 2.3), Protects and Sensors: all Nest attributes available (home/away, motion detection, setTargetHumidity, setHotWaterBoost) for automation-and no throttling!

Hi, thanks for the feedback.

Yes, it's a great app and devices. There are many attributes (motion, presence, etc) and commands available for your Home Automation scenarios....The possibilities are endless, and no throttling from Nest...

For the list of capabilities and custom commands, refer to the ST community wiki:

https://thingsthataresmart.wiki/index.php?title=My_Next_Tstat#Information

https://thingsthataresmart.wiki/index.php?title=My_Next_Alarm#Information

Regards.

Hi @yracine66,
I downloaded (and paid for) for the Nest tStat since that is all I have (I have a camera but that is not supported so no need for any other devices).

I am fairly technical and able to add code for the custom apps/devices

I followed the instructions in device-type-myNext/HUBITAT_README.md at master · yracine/device-type-myNext · GitHub, (although step 13 seems confusing and the similar to 12.)
I did find that some parts were clear, others confusing and harder to follow.
There are references in this to ST IDE not HE IDE, I don't have a smart things device and have not used one, so that added confusion.

I originally started out with a Nest TSTAT and nest account, and then migrated to Google account when that was pushed by Google over a year ago.
So I used the google account approach.

I was able to copy the cookie and request URL values.
I added the code for the MyNext TStat device.
I created the application (and did the oAuth) and it reports successful login and found the structures, however it does not fine my Nest Tstat.
I have 2 devices on Nest. - 1 Camera, 1 Tstat.

I have set the app to provide debug info, Logs do not show any obvious errors.

Any ideas how to get this to find my thermostat?

Hi, please refer to the previous post to reset your tstat:

It your tstat doesn't appear, then there is probably a problem with the cookie. Refer to
the screenshot to extract the right cookie:

https://thingsthataresmart.wiki/index.php?title=My_NextServiceMgr#Google_Cookie_screenshot

Regards.

Hi @yracine66,

Thank you - I managed to get it to show up. (its a gen 3 purchased from retailer).
Followed the link to reset the WWN settings, removed the Tstat from the Nest account, re-add to Nest account. Then I removed the MyNextManager app, and started the URL/Cookie process all over again. Now the Tstat shows up.
Much appreciation for the assist - looking forward to working with this more.
Cheers
RK

1 Like

I have the Nest Tstat showing up and since I work from Home it will go into Eco mode when I am in the office downstairs. I setup a motion detector and a Rule 4.1 to set it back to Heat mode when it is a work day and it is not in heat mode. however I see this in the logs (note the Tstat device is set to trace logging)

Dev 199 is my motion sensor. app281 is the Rules engine and dev232 is the nest Tstat.
I see many of the same entries of Error on line 1707 for other tests and even when I am in the device and click any of the settings.
Any suggestions on what to do about this?
Line 1707 in the Tstat driver code does not have a getAt() method but line 2432 does.
is this expected?

Hi, please download MyNextTstat (v3.4.3 and up) -using the same sellfy download link- to correct this NPE which happens after the command has been sent correctly to the tstat (no impact on the operation per se). You just need to copy and save the new code over the existing driver in the IDE.

Regards.

Hi @yracin66. Thanks for your work and especially the fact that I will be able to keep my existing Nest account and not migrate to Google. I have a few devices and apps like IFTTT, an Ooma phone system and a cool geofencing app that work with the old Nest account. If I had migrated to a Google account I would have lost the functionality of those items. So I've been living is a state of freeze with Nest using any new connectivity with the Nest.

So just to understand if I am using 2 factor authorization with Nest today (for example if I use my browser on my Mac to access the Nest), that will not be a obstacle with your interface?

@jcanavera, you can keep the 2FA settings as long as you don't change them (to keep your Auth tokens valid). The same for your password. If you change them, you have to extract the cookie and url again.

Regards

Thanks!

Is there a way to check for the app connection and use this in RM Or a trigger when the connection has been lost with Google?
@yracine66

Hi @ronmix, refer to the list of attributes at the community wiki:

https://thingsthataresmart.wiki/index.php?title=My_Next_Tstat#Information

There are several attributes that you can use:

  • last_api_check - date/time of last Nest connection attempt
  • last_connection - date/time of last valid Nest connection
  • verboseTrace - trace of all exceptions

You can check for 403 (unauthorized) exception in verboseTrace for instance.

Regards

Can't use the dates as hubitat can't compare dates. I use the dates to compare the string last connection with the last checked but they often are few.minutes apart.
As for the log (trace403) .I can't use the logs in the rules.

I can use node-red to catch the trace just wondering if there is a direct 'hubitat way'.

Hi, verboseTrace is not some logs, it's an attribute within MyNextTstat. You can subscribe to it and parse the attribute like any other String.

P.S. The google connection should stay valid unless you change your Google password or 2FA settings (or you log off from your Nest session).
Regards.

Hi,

Just want to inform my contributors and all Nest users that new versions of MyNextManager (v3.4.1), MyNextTstat(v3.5), MyNextSensor(V3,0) can be downloaded at my e-commerce solution provider (sellfy) using the original download link.

You can download the Next devices at my store:

https://www.maisonsecomatiq.com/hubitatstore

  • The new versions allow faster processing (and faster caching checks) in MyNextManager and add some capabilities to make MyNextSensor active or inactive using the Switch capability built-in.

  • All you need to do is to copy &paste the new code over the existing one for the device drivers and MyNextManager

  • Prior to the code upload, you'd just need to save the tokens info and restore it after the copy & paste.

  • Since V3 of MyNextDevices, the UI presentation adds the following commands for controlling your HVAC:

    • setTargetHumidity: to control your humidity inside your home via your dehumidifier/humidifier connected to Nest
    • setHotWaterBoost: to set a boiler's hotWaterBoost timer in minutes (Europe)
    • Nest Home or Away: to set your Nest structure to Home or Away.
    • setThermostatFanSchedule: to create fan schedules at your tstat
    • setThermostatFanTimer: to set the fan timer in minutes
    • setDualFuelBreakpointTemp: if you have dualFuel/alt/emergency heating, you can set the breakpoint temperature for switching to dualFuel/alt/emergency heating
    • setDualFuelBreakpointMode: You can set the following mode for alt/emergency/dual heating: "DUALFUEL_BREAKPOINT_ALWAYS_ALT" or "DUALFUEL_BREAKPOINT_ALWAYS_PRIMARY". This command allows finer control of your dualFuel/alt/emergency heating.

MyNextTstat (p1)

MyNextTstat (p2)

MyNextAlarm For Protects

MyNextSensor with new capabilities (switch on/off to make it active/inactive)

On top of it, there are many complimentary smartapps designed for My NextTstat DTH and are located at my github.

You can also refer to the 1st post of this thread for all the use cases supported.

MyNextManagerV3.4.1, MyNextTstatV3.5, MyNextAlarmV3 (For Protects), MyNextSensor V3 are available at my store:

https://www.maisonsecomatiq.com/hubitatstore

P.S. As a reminder, MyNext devices are fully compatible with dashboards (ex. SharpTools) and rule engines (RM, WebCore, Sharptools).
Regards

2 Likes

Ah yes found it. There are so many attributes. Didnt catch that one.

PS) I know it should, but it sometimes looses connection for whatever reason and I don't mind it (it happens seldomly) but when it does I want to be notified in all ways possible, especially in times like these when i need the Nest to be online (winter here). :slight_smile:

It looks like Nest/Google may have shifted some APIs or REST endpoints @yracine66....

I can still do a setStructure[Home,Away], but any attempts to do a heating or cooling setpoint result in a 403 error....

setHeatingSetpoint>65 was not set, exception doRequest>exception groovyx.net.http.HttpResponseException: Forbidden,error response=403 for [uri:https://czfe44-front01-iad01.transport.home.nest.com/v5/put

Auth key removed for obvious reasons...

Update: recopied my auth key again using the setup procedure - same issue. Clearly, Google changed a REST endpoint somewhere.

Hi @guywmartin ,

The google connection should stay valid unless you change your Google password or 2FA settings (or you log off from your Nest session).

If you have the 403 http error (unauthorized), this means that you've lost your auth tokens (and your end points are no longer valid).

To get new auth tokens (and valid end points), please follow the steps at the community wiki (with screenshots).

You don't need to re-start from scratch, just extract and save the required login info.

Refer to:

https://thingsthataresmart.wiki/index.php?title=My_NextServiceMgr#14b.29_LOGIN_INFO_REQUIRED_FOR_GOOGLE_ACCOUNT_USERS_.28MIGRATED_NEST_USERS.29

Regards.

@yracine66,

Please see my 'Update' section. I did get auth tokens again, and went through the whole setup within myNextManager to find the Nest Thermostat and Protects, which (re)created the devices for me. So, that auth works fine. I copied both the new endpoint and the auth token, as shown in your docs.

Additionally, setStructureHome and setStructureAway work and are authorized. I suspect that the setHeatingSetpoint URL or endpoint may have changed.

@guywmartin, I will not post the whole http put, but it works fine for me. So, I suggest that you restart from scratch your installation. There is no exception on my end.

Each end point is dependent on your auth tokens. Some commands may work, but not all of them if your auth tokens are not valid.

dev:2452021-03-24 19:44:55.482 debug setHold>done
dev:2452021-03-24 19:44:55.274 info doRequest>about to put with params= [uri:https://xxx.home.nest.com/put, headers:[Authorization:Basic xxxx, query:[format:json], charset:UTF-8, Content-Type:application/json,
dev:2452021-03-24 19:44:55.270 info doRequest>argsInJson= {"objects":[{"object_key":"xxxxx","op":"MERGE","value":{"target_temperature":22.77777777777778}}]}
dev:2452021-03-24 19:44:55.248 info doRequest>objects= [objects:[[object_key:xxxxxxxxxxxxxx, op:MERGE, value:[target_temperature:22.77777777777778]]]]
dev:2452021-03-24 19:44:55.243 info doRequest>about to put with uri https://xxx.home.nest.com/put, args= [object_key:xxxxx, op:MERGE, value:[target_temperature:22.77777777777778]]
dev:2452021-03-24 19:44:55.239 debug api> about to call doRequest with (unencoded) args = [object_key:xxxxx, op:MERGE, value:[target_temperature:22.77777777777778]]

Regards

Thanks.. I'll take another look, but this was previously working, and even after recopying the google_issue_token_url and google_cookiep1 values again, I get the same error.

I may just try the other option I've seen here in the community, as this method, while inventive, seems too hard to manage long term.

Thanks.