homebridge-govee
homebridge-govee copied to clipboard
HTTP client not connecting
After attempting a restart to scan for a new device, I noticed that it wasn't connecting. The new device would use the AWS client, but as you can see from the logs, that isn't starting because the HTTP client can't start. It's obviously failing somewhere in the login()
function in http.js
. I have not yet had a chance to look at the response from the api, but I did notice the message about needing to wait for the reset on the attempt timer, so I suspected either the PW was incorrect or something. After waiting for the timer and re-attempting (restarting everything in Homebridge), the message just came back, but the timer was reset to 5 minutes. So my suspicions were:
- ~~PW is wrong~~ - Nope. Confirmed multiple times by copy/pasting from the config and PW works to log in to Govee site. Also confirmed that it matches PW exactly for other plugins (for other controllers I use). No extra whitespace or anything. Looked for hidden
CR/LF
chars as well. - ~~Plugin version, node version etc...~~ - Don't think so. Tried as many different configurations as I could think of
- ~~String manip happening in
http.js line 51-54
~~ - Nope, see comment from me below - Govee gonna Govee - Need to debug, but would love to play with creds to see if maybe Govee is just messing w/ stuff on their end and making this a moving target
Details of your setup.
-
Do you use (1) Homebridge UI-X (2) Homebridge CLI or (3) HOOBS?
- Homebridge UI-X
-
Which version of Homebridge/HOOBS do you have?
- 1.7.0
-
Which platform do you run Homebridge/HOOBS on (e.g. Raspberry Pi/Windows/HOOBS Box)? Please also mention your version of Node.js/NPM if known.
- Mac OS Sonoma
- node 20.10.0 (I use
n
to manage node versions, so I can try others if you like. I've tried 18.x already)
-
Which version of this plugin (homebridge-govee) do you have? Has the issue started since upgrading from a previous version?
- 10.5.0 (I've already tried the 10.4 beta as well)
- I don't know if the issue was happening before. I just got a new humidifier device, so that was what caused me to start digging in. My other device still works fine)
-
Which Govee devices do you have that are causing issues? Please include product models if applicable.
- H7142 is the device I was trying to get connected
Please paste any relevant logs below.
[3/30/2024, 10:27:02 AM] [Govee] Initializing Govee platform...
[3/30/2024, 10:27:02 AM] [Govee] Initialising plugin v10.5.0 | System darwin | Node v20.10.0 | HB v1.7.0 | HAPNodeJS v0.11.1...
[3/30/2024, 10:27:02 AM] [Govee] Plugin initialised. Setting up accessories...
[3/30/2024, 10:27:04 AM] [Govee] [LAN] client enabled and found 1 device(s).
[3/30/2024, 10:27:04 AM] [Govee] [HTTP] could not use existing access token as does not exist, this is normally not an issue.
[3/30/2024, 10:27:05 AM] [Govee] [HTTP] disabling client as The number of consecutive failed logins for this account has reached the maximum. Please try again in 3 minutes. at default.login (file:///usr/local/lib/node_modules/homebridge-govee/lib/connection/http.js:58:15).
[3/30/2024, 10:27:05 AM] [Govee] [AWS] disabling client as requires HTTP client.
[3/30/2024, 10:27:05 AM] [Govee] [BLE] disabling client as not supported on mac devices.
[3/30/2024, 10:27:05 AM] [Govee] [4C:25:CD:33:33:35:12:65] initialising with options {"adaptiveLightingShift":0,"aws":"unsupported","ble":"unsupported","brightnessStep":1,"colourSafeMode":false,"lan":"enabled"}.
[3/30/2024, 10:27:05 AM] [Govee] [4C:25:CD:33:33:35:12:65] initialised with id [4C:25:CD:33:33:35:12:65] [H6066].
[3/30/2024, 10:27:05 AM] [Govee] ✓ Setup complete. This plugin has been made with ♥ by bwp91, please consider a ☆ on GitHub if you are finding it useful!
[3/30/2024, 10:27:35 AM] [Govee] [4C:25:CD:33:33:35:12:65] current colour [4590K / 218M].
User Note:
I did go ahead and grab the code to peek at what was failing. I also looked through docs and issues and have a thread to pull -
I am 90% sure this is some weird issue with login like you have noted in the docs somewhere (I'll find the link). I can log in to my account on the Govee site using the name/password from the config just fine. Rather than just default to the solution there, I figured I'd log this to give a chance to look for a solve. Also, I don't want to change my PW very much just because I have a bunch of other controls around that I'd have to update after realizing they are no longer working 😂
If I have the time in the next few days, I'll also plug away at this. Just need to read up on how to debug these plugins...