SteffeyDev / homebridge-hyundai-bluelink

Homebridge plugin for Hyundai BlueLink
Apache License 2.0
26 stars 13 forks source link

Error messages loading module #4

Closed scottdlowe closed 3 years ago

scottdlowe commented 3 years ago

Describe The Bug: First, thank you for your efforts on this plugin!

Vehicles are not appearing on the Home screen. Restart of Homebridge process shows that there is an unhandled exception somewhere.

To Reproduce: This is on initial configuration.

Expected behavior: Expected to see vehicles show on Home screen.

Logs:

(node:2716) UnhandledPromiseRejectionWarning: RequestError: write EPROTO 3069983184:error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small:../deps/openssl/openssl/ssl/statem/statem_clnt.c:2158:

at ClientRequest.<anonymous> (/usr/lib/node_modules/homebridge-hyundai-bluelink/node_modules/got/source/request-as-event-emitter.js:178:14)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:327:22)
at ClientRequest.origin.emit (/usr/lib/node_modules/homebridge-hyundai-bluelink/node_modules/@szmarczak/http-timer/source/index.js:37:11)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

(Use node --trace-warnings ... to show where the warning was created) (node:2716) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:2716) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Plugin Config:

{ "bridge": { "name": "Homebridge 0E45", "username": "REDACTED", "port": 51390, "pin": "REDACTED" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "auth": "form", "theme": "auto", "tempUnits": "f", "lang": "auto", "platform": "config" }, { "refreshToken": "REDACTED", "platform": "Ring" }, { "platform": "Garageio", "name": "Garageio", "username": "REDACTED", "password": "REDACTED" }, { "credentials": { "username": "REDACTED", "password": "REDACTED", "region": "US", "pin": "XXXX" }, "vehicles": [ { "vin": "REDACTED", "maxRange": 5 }, { "vin": "REDACTED", "maxRange": 5 } ], "remoteStart": { "cool": false, "heat": true, "defrost": true, "igniOnDuration": 10 }, "refreshInterval": 20, "platform": "Hyundai" } ] }

Screenshots:

Environment:

athal7 commented 3 years ago

Thanks for the kind words @scottdlowe!

I think this might be the same as https://github.com/athal7/homebridge-hyundai-bluelink/issues/1, I should probably put something about it in the Readme though

scottdlowe commented 3 years ago

Thanks for the kind words @scottdlowe!

I think this might be the same as #1, I should probably put something about it in the Readme though

I made the change suggested in the link - setting SSL SECLEVEL to 1 and it worked. Not ideal, but I understand that it's on the Hyundai side. Thank you for the response and, again, your work on this. It's great!

scottdlowe commented 3 years ago

By the way, if you need anyone to help test in real time, feel free to let me know. Happy to help where I can.

athal7 commented 3 years ago

Thanks for the offer! The Hyundai API has been a bit more finicky than expected (especially over this weekend), so I think adding some good tests are my next best move to keep on top of the increase in complexity.

Collaboration on or review of those certainly would be welcome.

scottdlowe commented 3 years ago

Question - does using the HomeKit plugin do anything to the Hyundai account in general? We're not able to remote start either of our cars anymore and not sure if Hyundai sees requests via the API and turns it off or if it's something else.

athal7 commented 3 years ago

I don’t see a reason why it would affect that, but I was seeing what looked like rate limiting issues before the most recent release which contributed to similar behavior to what you are describing.

On Wed, Feb 10, 2021 at 1:29 PM scottdlowe notifications@github.com wrote:

Question - does using the HomeKit plugin do anything to the Hyundai account in general? We're not able to remote start either of our cars anymore and not sure if Hyundai sees requests via the API and turns it off or if it's something else.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/athal7/homebridge-hyundai-bluelink/issues/4#issuecomment-776918835, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADSHIEM2N3DKFOR5MVZCTDS6LGCNANCNFSM4XG6BYYA .

-- Andrew Thal athal7.com

scottdlowe commented 3 years ago

If there is a limit of 200 calls per day, the 20 second refresh interval would blow through that in 63 minutes. One of the forums says it resets at midnight. I changed my refresh interval to something much higher and will see what tomorrow brings.

athal7 commented 3 years ago

Oh! Can you link me to where you found 200 calls per day? Agree something should be done about refresh if that’s the case. Curious how your experiment goes!

On Wed, Feb 10, 2021 at 11:30 PM scottdlowe notifications@github.com wrote:

If there is a limit of 200 calls per day, the 20 second refresh interval would blow through that in 63 minutes. One of the forums says it resets at midnight. I changed my refresh interval to something much higher and will see what tomorrow brings.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/athal7/homebridge-hyundai-bluelink/issues/4#issuecomment-777196279, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADSHIH4RA22J553EJB5J7DS6NMPPANCNFSM4XG6BYYA .

-- Andrew Thal athal7.com

scottdlowe commented 3 years ago

Ok, so it wasn't a documented rate limit on the API, but a comment here: https://forum.abetterrouteplanner.com/topic/1682-access-hyundai-bluelink-data-via-webapi/.

athal7 commented 3 years ago

Thanks @scottdlowe, I like the refresh interval strategy in that thread, maybe will try to implement here.

Were you able to start the car first thing in the morning? If not, I'm thinking it may be worth filing an issue with bluelinky since the start interface is being used as documented.