Hacksore / bluelinky

An unofficial nodejs API wrapper for Hyundai bluelink and Kia UVO
https://bluelinky.readme.io
MIT License
345 stars 76 forks source link

EU vehicle should have a default start config #79

Closed MarkusKress closed 4 years ago

MarkusKress commented 4 years ago
client.on('ready', async () => {
const vehicle = client.getVehicle('Txxxxxxxxx3');
const response = await vehicle.start({ parsed: false });
console.log(response);
});
(node:21502) UnhandledPromiseRejectionWarning: Error: temperature out of bounds! min: 14.0* max: 30*, max step: 0.5
    at R (/root/node_modules/bluelinky/dist/index.js:2:14755)
    at n.<anonymous> (/root/node_modules/bluelinky/dist/index.js:2:16676)
    at /root/node_modules/bluelinky/dist/index.js:2:1955
    at Object.next (/root/node_modules/bluelinky/dist/index.js:2:2060)
    at s (/root/node_modules/bluelinky/dist/index.js:2:799)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:21502) 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(). (rejection id: 1)
(node:21502) [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.
Hacksore commented 4 years ago

You need to pass in a valid start config. Seems like this could be a bug for EU though as the default options are not good enough.

MarkusKress commented 4 years ago

Might be this is only for EV (eletric) cars nessesary.

PierreLevres commented 4 years ago

Should the program do better error handling (in general)? Clearly a faulty parameter is given to the procedure ({parsed: false} instead of VehicleClimateOptions of VehicleStartOptions, and it is therefore rejected.

MarkusKress commented 4 years ago

For me it's not nessesary, because I can't fix this.

PierreLevres commented 4 years ago

I don't understand what you mean Markus. You opened issue #79 because of an error you got by issuing "await vehicle.start({ parsed: false });". Where is / who created that statement? Where is it in the bluelinky code?

You got the error because an invalid parameter was to the procedure in BlueLinky. What do you expect from the developers? Better error handling? Better documentation?

MarkusKress commented 4 years ago

I thought 'parsed: false' helps also like in status(), because start() did not work for my EV Car in Region EU. For start () I've got: (node:10516) UnhandledPromiseRejectionWarning: TypeError: Cannot read property

PierreLevres commented 4 years ago

Please read the code to see what parameters needs to be passed to the functions. The debug.js might clarify lots of questions and parameters to be used. The start command does not really start your EV. It does however set the temperature in your EV.

MarkusKress commented 4 years ago

Thank you. I'll have a look in the Code and I know start() does not start the engine. I try to create a Alexa skill or User the Alexa Button to Heat the Car. In Germany the alxa Bluelink Skill ist not available.