chrisjshull / homebridge-nest

Nest plugin for HomeBridge
692 stars 110 forks source link

Add support for changing the active temperature sensor #470

Open kdknigga opened 2 years ago

kdknigga commented 2 years ago

The Nest supports using a remote temperature sensor as "the" sensor to use when making heating/cooling decisions. Changes to the active sensor can be made manually by selecting the one you want when you want, or it can be made on a schedule.

However, Nest's native scheduling system provides only very coarse control over when different sensors should be used.

image

It would be super neat if homebridge-nest could be used to select the active sensor so an external tool could be used to manage the schedule.

I'm thinking of something along the lines of a "node-red <-> mqtt <-> homebridge-mqttthing <-> homebridge <-> homebridge-nest" toolchain, but the rest of the toolchain doesn't really matter as long as something is able to ask homebridge-nest to change the sensor.

Awesome work, and thanks a lot!

mhenry commented 2 years ago

I would really like this feature, but I do not think it's not possible via either the old or new Nest APIs. Google doesn't really have a way to get in touch directly with someone that would actually respond to feature requests like this, but there are two asks on Stack Overflow about this:

  1. https://stackoverflow.com/questions/64038531/any-plan-for-adding-api-to-select-different-temperature-sensors-in-a-nest-thermo
  2. https://stackoverflow.com/questions/69605791/feature-request-add-support-for-nest-temperature-sensor
kdknigga commented 2 years ago

@mhenry , oddly, there's nothing in either the new or old APIs about temperature sensors at all that I can find, yet homebridge-nest does see my temperature sensors. I think the devs have a few tricks up their sleeves.

mhenry commented 2 years ago

Ah, you are right. They are definitely using the protobuf API endpoints used by home.nest.com:

https://github.com/chrisjshull/homebridge-nest/blob/master/lib/nest-endpoints.js#L37-L41

I just quickly inspected the network traffic after changing my active sensor and can confirm this is the endpoint:

https://grpc-web.production.nest.com/nestlabs.gateway.v1.TraitBatchApi/BatchUpdateState

About a year ago someone reverse engineered the home/away protobuf API and wrote about it here:

https://blog.emilburzo.com/2020/12/reverse-engineering-nest-home-away-status-api/

I'd assume someone would just have to reverse engineer the sensor API. Sounds like a fun weekend project.

justinmm2 commented 2 years ago

Chiming in to add that I'm a person who would find this useful, indeed. I have a few sensors spread throughout my studio apartment because I'm a nerd, but also because I want to handle things like part of the dwelling near the exterior wall - with my desk! - getting noticeably colder than the rest of the dwelling. I'd love to have an automation that says "When the desk falls below 70 degrees, use the Desk Sensor for sensing [ for X hours / until Y condition ]", or something like it. I can already get the temperature there, and trigger an automation to set the thermostat temperature, but it's not super useful at the moment because there's no fixed delta between the two - the desk might be 67 and the rest of the room 71.. or 75. So saying "If the desk hits 69, set the heat to 72" might not do anything if the temperature there is already 73. Just FYI.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 2 years ago

This is not stale.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 2 years ago

This is still not stale.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 2 years ago

@adriancable, I take it this isn't interesting to you?

adriancable commented 2 years ago

@kdknigga - it is interesting to me (which is why I haven't just closed this) but I haven't had time to address it to date, and I don't have an estimate of when that will be. Sorry.

kdknigga commented 2 years ago

No problem. Just was wondering if no answer was a "no" answer.

I'll keep posting a comment periodically, then, so that the github-actions bot doesn't remove it as stale. I didn't want to continue doing that if you weren't interested.

Thanks!

adriancable commented 2 years ago

Hi Kris - yes, feel free to keep this open/non-stale.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mhenry commented 2 years ago

Not stale!

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 2 years ago

Not stale.

guillochon commented 2 years ago

Doing God's work @kdknigga 😆

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 2 years ago

Not stale.

ps2sunvalley commented 1 year ago

Definitely not stale. Getting a working implementation of this would allow for HomeKit automations for granular control of active use sensor that Google/Nest still refuses to implement themselves.

finder39 commented 1 year ago

Just wanna +1 this. I use Homebridge for Nest integration in Home Assistant as the native HA integration doesn't support temperature sensors. Being able to switch the active temperature sensor would enable a lot of great automation capabilities

WorldOfMaze commented 1 year ago

Another +1. The Homebridge-Nest integration is much more complete than the office Nest integration which does not even support legacy Nest thermostats. The only thing missing is the ability to select or deselect the sensor to control the thermostat. I would very much like to see this implemented.

@kdknigga keep up the good work ;-}

@chrisjshull thanks for making this integration available. I'd be glad to pitch in but I am very new to development for HA.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 1 year ago

Not stale

kdknigga commented 1 year ago

Not stale.

On Wed, May 4, 2022, 10:11 github-actions[bot] @.***> wrote:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHub https://github.com/chrisjshull/homebridge-nest/issues/470#issuecomment-1117458494, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJX7QAIN77OC34UJDTHWFLVIKHS7ANCNFSM5IRRIADQ . You are receiving this because you were mentioned.Message ID: @.***>

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 1 year ago

Not stale.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 1 year ago

Not stale.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 1 year ago

Not stale.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ps2sunvalley commented 1 year ago

not stale

On Wed, Feb 8, 2023 at 6:48 PM github-actions[bot] @.***> wrote:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHub https://github.com/chrisjshull/homebridge-nest/issues/470#issuecomment-1423447856, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUVKYLSOKJL7FO57JGUPNTWWQ5GDANCNFSM5IRRIADQ . You are receiving this because you commented.Message ID: @.***>

-- GARY C. ROGERS, CAPT, USAF 704.668.9509 @.***

kdknigga commented 1 year ago

not stale … On Wed, Feb 8, 2023 at 6:48 PM github-actions[bot] @.> wrote: This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. — Reply to this email directly, view it on GitHub <#470 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUVKYLSOKJL7FO57JGUPNTWWQ5GDANCNFSM5IRRIADQ . You are receiving this because you commented.Message ID: @.> -- GARY C. ROGERS, CAPT, USAF 704.668.9509 @.***

Thanks! Don't know how I missed the most recent warning.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 1 year ago

Not stale.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 1 year ago

Not stale.

On Fri, Apr 21, 2023 at 3:08 PM github-actions[bot] < @.***> wrote:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHub https://github.com/chrisjshull/homebridge-nest/issues/470#issuecomment-1518286236, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJX7QFNX6DCAUUDAR6LZX3XCLSNHANCNFSM5IRRIADQ . You are receiving this because you were mentioned.Message ID: @.***>

ignacio82 commented 1 year ago

Any hope of getting this working anytime soon?

etiennedub commented 1 year ago

@ignacio82 If you want you can try this fork. It should work if your device use the REST API but won't work if you are using the protobuf API. The API selection is random. I'm using it for multiple months with HA automation and it work well, but cannot be merge unless we support both API.

WorldOfMaze commented 1 year ago

Is there a way to tell which API is being used?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 1 year ago

Not stale.

On Mon, Jun 19, 2023, 17:08 github-actions[bot] @.***> wrote:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHub https://github.com/chrisjshull/homebridge-nest/issues/470#issuecomment-1597822695, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJX7QHRS3PQH6DKJCT5FFDXMDEWPANCNFSM5IRRIADQ . You are receiving this because you were mentioned.Message ID: @.***>

github-actions[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 11 months ago

Not stale

On Wed, Jul 19, 2023, 19:50 github-actions[bot] @.***> wrote:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHub https://github.com/chrisjshull/homebridge-nest/issues/470#issuecomment-1642948708, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJX7QFW4QIBVBWOLJLCI2DXRB6GNANCNFSM5IRRIADQ . You are receiving this because you were mentioned.Message ID: @.***>

github-actions[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kdknigga commented 10 months ago

Not stale

On Fri, Aug 18, 2023, 21:09 github-actions[bot] @.***> wrote:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHub https://github.com/chrisjshull/homebridge-nest/issues/470#issuecomment-1684685685, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJX7QD27ZMFQMZYUAZQI2DXWAN7DANCNFSM5IRRIADQ . You are receiving this because you were mentioned.Message ID: @.***>

github-actions[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

guillochon commented 9 months ago

Not stale.