@incmve
i added a way for supporting Hyundai ‘bluelink’ cars.
If you want you can test it by selecting hyundai in the plugin settings.
You need credentials for the Hyunday App/Cloud. These credentials are used in the plugin.
After installation, you will need to select the HyundaiDevice and add it to the gui.
If you are interested, i did publish the required new version of the plugin.
-
New plugin pimatic-bluelink
-
@bertreb Nice one.
I updated the plugin and changed my settings to Hyundai etc. but I still get the token error.
Running node v8.0.0.
Tried to update my node but my docker said noWil ltry again later.
Follow my domotica project on http://maredana.nl
-
Hey Bert,
I found one interesting value in the status JSON of my Kia. Look here:"drvDistance": [ { "rangeByFuel": { "evModeRange": { "value": 239, "unit": 1 }, "totalAvailableRange": { "value": 239, "unit": 1 } }, "type": 2 } ],
Could you add the drvDistance “totalAvailableRange” value to the Hyundai/Kia device?
This here could be also interesting:
"targetSOClist": [ { "targetSOClevel": 100, "dte": { "rangeByFuel": { "evModeRange": { "value": 338, "unit": 1 }, "totalAvailableRange": { "value": 338, "unit": 1 } }, "type": 2 }, "plugType": 0 }, { "targetSOClevel": 100, "dte": { "rangeByFuel": { "evModeRange": { "value": 338, "unit": 1 }, "totalAvailableRange": { "value": 338, "unit": 1 } }, "type": 2 }, "plugType": 1 } ]
targetSOClist “totalAvailableRange” shows the max range when the car is charged to 100%. This would be nice for statistics, because the value depends extremely on the external conditions. I don’t know what is the difference of “plugType” 0 and 1. Since the values are identical, it should not matter.
-
First here the full response:
debug [pimatic-bluelink]: Status: { "airCtrlOn": false, "engine": false, "doorLock": false, "doorOpen": { "frontLeft": 0, "frontRight": 0, "backLeft": 0, "backRight": 0 }, "trunkOpen": false, "airTemp": { "value": "00H", "unit": 0, "hvacTempType": 1 }, "defrost": false, "acc": false, "evStatus": { "batteryCharge": false, "batteryStatus": 74, "batteryPlugin": 0, "remainTime2": { "etc1": { "value": 112, "unit": 1 }, "etc2": { "value": 540, "unit": 1 }, "etc3": { "value": 180, "unit": 1 }, "atc": { "value": 0, "unit": 1 } }, "drvDistance": [ { "rangeByFuel": { "evModeRange": { "value": 239, "unit": 1 }, "totalAvailableRange": { "value": 239, "unit": 1 } }, "type": 2 } ], "reservChargeInfos": { "reservChargeInfo": { "reservChargeInfoDetail": { "reservInfo": { "day": [ 1, 2, 3, 4, 5 ], "time": { "time": "0700", "timeSection": 0 } }, "reservChargeSet": false, "reservFatcSet": { "defrost": false, "airTemp": { "value": "10H", "unit": 0 }, "airCtrl": 1, "heating1": 0 } } }, "offpeakPowerInfo": { "offPeakPowerTime1": { "starttime": { "time": "1200", "timeSection": 0 }, "endtime": { "time": "1200", "timeSection": 0 } }, "offPeakPowerFlag": 1 }, "reserveChargeInfo2": { "reservChargeInfoDetail": { "reservInfo": { "day": [ 1, 2, 3, 4, 5 ], "time": { "time": "1200", "timeSection": 1 } }, "reservChargeSet": false, "reservFatcSet": { "defrost": false, "airTemp": { "value": "10H", "unit": 0 }, "airCtrl": 1, "heating1": 0 } } }, "reservFlag": 0, "ect": { "start": { "day": 9, "time": { "time": "1200", "timeSection": 0 } }, "end": { "day": 9, "time": { "time": "1200", "timeSection": 0 } } }, "targetSOClist": [ { "targetSOClevel": 100, "dte": { "rangeByFuel": { "evModeRange": { "value": 338, "unit": 1 }, "totalAvailableRange": { "value": 338, "unit": 1 } }, "type": 2 }, "plugType": 0 }, { "targetSOClevel": 100, "dte": { "rangeByFuel": { "evModeRange": { "value": 338, "unit": 1 }, "totalAvailableRange": { "value": 338, "unit": 1 } }, "type": 2 }, "plugType": 1 } ] } }, "ign3": true, "hoodOpen": false, "transCond": true, "steerWheelHeat": 0, "sideBackWindowHeat": 0, "tirePressureLamp": { "tirePressureLampAll": 0, "tirePressureLampFL": 0, "tirePressureLampFR": 0, "tirePressureLampRL": 0, "tirePressureLampRR": 0 }, "battery": { "batSoc": 255, "batState": 0 }, "time": "20210205211352" }
My idea would be (for e cars):
JSON value / short name / descriptions
drvDistance “totalAvailableRange” / remaining-range / Remaining range basing on the SoC (state of charge)
targetSOClist “totalAvailableRange” / maximum-range / Maximum range with fully charged batteryIf you like to satisfy as well hybrids and fosils:
drvDistance “totalAvailableRange” / remaining-range / Remaining range basing on current battery resp. fuel level
targetSOClist “totalAvailableRange” / maximum-range / Maximum range with fully charged battery resp. filled tank (sounds somehow crappy, but something like this) -
Hi, the new version seems to have a problem. ODO and both remaining range parameter are “0”. Even the other gets not updated, beside “battery”.
This is the state on my test system:
Here you see the state of my productive system running on the previous version:
If you need access to my uvo account for debugging give a PM.
-
@incmve: Are you active using this plugin? For me it stopps working. Seems Kia changed the backend.
debug [pimatic-bluelink]: getStatus error: { "name": "HTTPError", "host": "prd.eu-ccapi.kia.com:8080", "hostname": "prd.eu-ccapi.kia.com", "method": "GET", "path": "/api/v2/spa/vehicles/12345678-1234-1234-1234-123456789abc/status/latest", "protocol": "https:", "url": "https://prd.eu-ccapi.kia.com:8080/api/v2/spa/vehicles/12345678-1234-1234-1234-123456789abc/status/latest", "gotOptions": { "path": "/api/v2/spa/vehicles/12345678-1234-1234-1234-123456789abc/status/latest", "protocol": "https:", "slashes": true, "auth": null, "host": "prd.eu-ccapi.kia.com:8080", "port": "8080", "hostname": "prd.eu-ccapi.kia.com", "hash": null, "search": null, "query": null, "pathname": "/api/v2/spa/vehicles/12345678-1234-1234-1234-123456789abc/status/latest", "href": "https://prd.eu-ccapi.kia.com:8080/api/v2/spa/vehicles/12345678-1234-1234-1234-123456789abc/status/latest", "retry": { "methods": {}, "statusCodes": {}, "errorCodes": {} }, "headers": { "user-agent": "got/9.6.0 (https://github.com/sindresorhus/got)", "authorization": "Bearer abcdefg12345678", "ccsp-device-id": "abcdefgh-abcd-abcd-abcd-abcdefghijkl", "content-type": "application/json", "accept": "application/json", "accept-encoding": "gzip, deflate" }, "hooks": { "beforeRequest": [], "beforeRedirect": [], "beforeRetry": [], "afterResponse": [], "beforeError": [], "init": [] }, "decompress": true, "throwHttpErrors": true, "followRedirect": true, "stream": false, "form": false, "json": true, "cache": false, "useElectronNet": false, "method": "GET" }, "statusCode": 401, "statusMessage": "Unauthorized", "headers": { "content-type": "application/json; charset=utf-8", "date": "Fri, 26 Feb 2021 09:28:06 GMT", "etag": "W/\"1a-abcdefg/12345678\"", "x-ratelimit-limit": "100", "x-ratelimit-remaining": "99", "x-ratelimit-reset": "1614331746", "content-length": "138", "connection": "close", "set-cookie": [ "TS012b00dd=abcdefg12345678; Path=/; Domain=.prd.eu-ccapi.kia.com" ] }, "body": { "retCode": "F", "resCode": "4017", "resMsg": "Invalid request value - Invalid Application Id.", "msgId": "12345678-abcd-abcd-abcd-123456789bca" } }
-
It looks like they changed recently the backend / authorization mechanism and third-party apps stopped working (like pimatic-bluelink).
The developers of the bluelinky library are looking for a solution. When a solution is available the plugin will be updated. -
D’oh! Just wanted to start to integrate this plugin for my new Kona EV. First test resulted in an authentifcation failure.
-
Updated to 0.2.7. Discovery works. But trying to save the Hyndai device leads to error
Client error: Uncaught TypeError: Cannot read property ‘type’ of nullinfo [pimatic-bluelink]: CarConfig: { "nickname": "KONA EV", "name": "KONA EV", "regDate": "2021-02-22 18:24:02.322", "brandIndicator": "H", "id": "5718f427-*****-*****-*****-********4c", "vin": "TMAK******", "generation": "2020" }
Then I added the car manually as a Hyundai device using the VIN/FIN. That looks good, the device displays a lot of information in Pimatic - very nice.
Is it possible to send commands via the Pimatic GUI or needs this to be done via rules?
-
THe gui show only the car data. Commands can be sent via rules (which can be linked to buttons!)
The rule commands arebluelink <KiaDevice/Hyundai device Id> [start $startOptionsVariable | startDefault | stop | lock | unlock | chargeStart | chargeStop | refresh ]
-
Update works for me on the Kia front as well
-
I also haven’t faced any error. Browser cache!?
-
info [pimatic-bluelink]: CarConfig: { "nickname": "KONA EV", "name": "KONA EV", "regDate": "2021-02-22 18:24:02.322", "brandIndicator": "H", "id": "5718f427-*****-*****-*****-********4c", "vin": "TMAK******", "generation": "2020" }
Is this the info after your manual config? if not, can you post this info, in the discovery scenario?