Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebridge Nest often shows wrong temperature indoors in HomeKit #448

Closed
AlexPygin opened this issue Oct 12, 2021 · 21 comments
Closed

Homebridge Nest often shows wrong temperature indoors in HomeKit #448

AlexPygin opened this issue Oct 12, 2021 · 21 comments

Comments

@AlexPygin
Copy link

Describe the bug

https://youtube.com/shorts/-Kd4PRMol5c?feature=share

To Reproduce
Steps to reproduce the behavior:

  1. This has been happening constantly for a long time. I just usually open the nest app, but I’d like to move away from that. Not sure when/if it should be accurate in home, or if this plugin is just for setting temperature. Usually happens if I don’t reboot Homebridge for a while

Expected behavior
The thermostat in HomeKit shows the correct temperature

Include with your bug report this version info:

node --version
homebridge --version

V14.17.0
1.3.5

Make sure you have the latest LTS from https://nodejs.org
and the latest packages: npm upgrade -g homebridge homebridge-nest

Also include debug log output from startup through seeing the issue:
DEBUG=* homebridge -D
restarting Homebridge makes it show correct temp

@adriancable
Copy link
Collaborator

@AlexPygin - your video shows the Nest app saying it's cooling to 81 deg F. Then your video shows the Apple Home app showing it's cooling to 81 deg F. Then your video shows the Homebridge log, showing the cooling threshold is set to 81 deg F.

That's 81, 81, 81. What am I missing?

@AlexPygin
Copy link
Author

The nest app shows the current temperature indoors is 69°. When I open control center, it shows 72° inside. I open Homebridge logs to show you that the Nest was controlled recently, and controlled correctly, so the set temperature of 81 is correct. I then open the home app where it shows 72° inside, same as control center.

The correct temperature inside is 69° but Homebridge is showing 72°. As time goes on, this can get wildly inaccurate. On hot days where it can get up to 80° inside, the Nest app will show that correctly, but Homebridge would show some other older cached temperature like 73 or something.

@adriancable
Copy link
Collaborator

Can you please record a longer log (like in your video, but running for several hours) including the time period where the reported temperature is wrong. Then email me the log at [email protected], and tell me at the point in time you stopped recording what the temperature as registered in the Home app is, and also what the temperature as registered in the Nest app is. Thanks!

Since no-one else has reported anything like this, I am suspecting some network issue (possibly mDNS related) whereby your iPhone is losing connection to the Homebridge machine, so it doesn't receive updates.

@AlexPygin
Copy link
Author

For example right now the temperature is 72° indoors but Homebridge says it’s 68° in here

It hasn’t been 68° indoors since probably 9am today, and was 75° inside a few hours ago, so it’s been wrong since this morning. I can perform whatever troubleshooting steps you want because this always happens

@AlexPygin
Copy link
Author

This is not an iPhone losing connection. The incorrect temperature is repeated out loud by the HomePods I have, and is incorrect in the Homebridge webUI. Let me record another video

@adriancable
Copy link
Collaborator

@AlexPygin - we don't need additional videos. Please just record a long Homebridge log (e.g. one complete day) as we requested, covering the period where the temperature goes wrong, and then email me the 'correct' and 'incorrect' temperatures as of the end of the log.

@AlexPygin
Copy link
Author

https://youtu.be/5ZqEeuHyBaM

You can clearly see that Homebridge is updating the set temperature for the nest, but it doesn’t show the correct indoor temperature. I’ll record one more video showing that a reboot fixes it

@AlexPygin
Copy link
Author

Sure, will do that

@AlexPygin
Copy link
Author

Do you want any debug flags set?

@adriancable
Copy link
Collaborator

That's probably helpful. In config.json, underneath:

"platform": "Nest",

please add:

"options": [ "Debug.Verbose" ],

Then, run homebridge with the -D command line parameter. Thanks!

@AlexPygin
Copy link
Author

Is hasn’t manifested yet, but I feel like it does after I restart my router, so I’ll try that today and see if it happens

@AlexPygin
Copy link
Author

Just noticed it’s incorrect. Sent an email with full log and current temps, with screenshots

@gtg465x
Copy link

gtg465x commented Oct 21, 2021

This has been happening to me for a really long time too… like years maybe. I used to think it was my Google cookie expiring, but now I’m realizing that everything starts working fine if I just restart Homebridge… no need to get a new cookie. Not only that, but I switched over to the new Google refresh token within the past week and this has already happened again where it was displaying the wrong temps and I needed to restart Homebridge to fix.

My setup:

-Raspberry Pi 4B
-Official Homebridge Raspberry Pi Image
-2 Nest Thermostat E
-1 additional temperature sensor
-Nest config has the following options set: ["Thermostat.Fan.Disable", "Thermostat.SeparateBuiltInTemperatureSensor.Enable"]

@AlexPygin Notice any similarities between your setup and mine?

I turned on verbose logging on mine too. Will send logs next time it happens.

@adriancable
Copy link
Collaborator

@gtg465x - has the problem actually been happening for years, or only for ~ 12 months? The problem @AlexPygin is seeing is specific to the protobuf thermostat API, which has only become commonplace for thermostats in the last 12 months. If you have been seeing this problem for (much) longer than that, you may have a different issue.

@AlexPygin is currently testing a 'fix' (which shouldn't be necessary - I am still a little confused by it) and if he reports back to say things are OK now, then I will commit/push an update.

@gtg465x
Copy link

gtg465x commented Oct 23, 2021

@gtg465x - has the problem actually been happening for years, or only for ~ 12 months? The problem @AlexPygin is seeing is specific to the protobuf thermostat API, which has only become commonplace for thermostats in the last 12 months. If you have been seeing this problem for (much) longer than that, you may have a different issue.

@AlexPygin is currently testing a 'fix' (which shouldn't be necessary - I am still a little confused by it) and if he reports back to say things are OK now, then I will commit/push an update.

Hard to say. I think I’ve been conflating this issue with the expiring Google cookie, so this issue might have only been happening for 12 months.

@gtg465x
Copy link

gtg465x commented Oct 25, 2021

Update: still monitoring, but hasn't happened yet since I turned on debug logging and restarted 4 days ago.

@adriancable
Copy link
Collaborator

Fixed in 4.6.3.

@gtg465x
Copy link

gtg465x commented Nov 7, 2021

Update: This bug is happening to me again (still on 4.6.2). Took a couple weeks after a reboot before it started happening. I have verbose logging turned on, but there are no errors when it happens. Changing temperate from the Apple Home app works, but after a few seconds, the Home app goes back to displaying the incorrect temperature even though the temperature is set properly on the thermostat itself. I did download my log file and found a couple types of Nest errors that seem to happen every couple days, but not sure if they're related to the issue.

[03/11/2021, 09:02:13] [Nest] API observe: error Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read'
}
[03/11/2021, 09:02:13] [Nest] Retrying in 10 seconds.
[03/11/2021, 13:33:54] [Nest] API observe: error Error [ERR_HTTP2_STREAM_ERROR]: Stream closed with error code NGHTTP2_INTERNAL_ERROR
    at ClientHttp2Stream._destroy (internal/http2/core.js:2193:13)
    at ClientHttp2Stream.destroy (internal/streams/destroy.js:39:8)
    at Http2Stream.onStreamClose (internal/http2/core.js:512:12) {
  code: 'ERR_HTTP2_STREAM_ERROR'
}
[03/11/2021, 13:33:54] [Nest] Retrying in 10 seconds.

I'm updating to 4.6.3 now. Fingers crossed.

@adriancable
Copy link
Collaborator

@gtg465x - those warnings are not related to your issue, and are completely normal. They are a duplicate of the pinned issue #424.

@blabus
Copy link

blabus commented May 12, 2022

I'm still experiencing this exact issue. Should I open a new issue?

@adriancable
Copy link
Collaborator

adriancable commented May 12, 2022

@blabus - can you please email me at [email protected] with a complete description of your problem, and I'll get back to you with the info I need to debug. You say you are experiencing "this exact issue" but the thread above talks about several unrelated things, so I need to know which one you're seeing. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants