kia_uvo
kia_uvo copied to clipboard
Setup service to fetch trip reports
Resolving due to inactivity
Can this be reopened? I would like to develop this if anybody is interested.
The API to develop this is following:
HTTP POST : https://owners.kia.com/apps/services/owners/mytrips/get/trip.html Raw Data : {"guest":"0","alertType":9,"dateRange":{"startDate":"20220617","endDate":"20220623"}}
Sample response:
{
"status": {
"statusCode": 0,
"errorType": 0,
"errorCode": 0,
"errorMessage": "Success with response body"
},
"payload": {
"tripInfo": [
{
"journeyId": 0,
"milesDriven": 0.621371,
"secondsDriven": 51,
"minutesDriven": 0,
"hoursDriven": 0,
"aveSpeed": 0,
"tripCategory": 0,
"month": 6,
"day": 22,
"year": 2022,
"startLocation": {
"lat": 40.90336388,
"lon": -74.1134777778,
"altdo": 0
},
"endLocation": {
"lat": 40.90327777,
"lon": -74.1134305556,
"altdo": 0
},
"tripId": "954429930",
"startOdometer": 0,
"endOdometer": 0,
"idleTime": 45,
"mph": 0,
"effScore": 99,
"inEffScore": 1,
"startDtTime": "20220622152921",
"startDateUtcOffset": -4,
"endDateUtcOffset": -4,
"avgMileage": -1000,
"endDtTime": "20220622153012",
"evPowerConsumption": {
"mileage": 0.023898884615384617,
"totalPower": 26,
"driveTrain": 2,
"climateSystem": 4,
"accessories": 20,
"batteryManagement": 0,
"regenerated": 0
}
}
]
}
}
I intend to persiste
- Last trip latitude
- Longiture
- avgSpeed
- milesDriven
- secondsDriven
- hoursDriven
- month
- Day
- year
- mph
- startDtTime
- endDtTime
- evPowerConsumption and its sub-fields
Are you able to create a PR when you are ready? Appreciate the support on this!
Yes, I can try to create the PR. I've never worked on a HACS integration, so this will be new. I can definitely look at what the code is doing. But need confirmation from the community if this is something which will be useful (or if its already being worked upon) before I start working on it
@cdnninja @fuatakgun I am setting up my dev env today. Did the remote container thingy on VS Code, and the container is working.
However, I dont see any requirements.txt or setup file, and my IDE is complaining about missing dependencies. I am unsure how do I get these set up.
Also, I dont see any tests which can help me guide/develop locally. What setup do you folks have locally that you use to develop? Is there a main/run method you use to debug through the code?
Apologies if these are all noob questions, I have never developed a HACS integration before
ok. I looked up your parent repo and I think I moved forward. Now stuck at github.com being unreachable from my devcontainer.
container# git clone -q git://github.com/home-assistant/home-assistant.git
fatal: unable to look up github.com (port 9418) (Try again)
It seems github changes some security settings since the ludeeus/container:integration
was created (which was 2 years ago)
Mind sharing your devcontainer.json file?
it has been awhile! Lots has changed. I am getting back into this. Are you interested in working on this? I currently don't use devcontainers - I should though.
We are now using this for API layer: https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api
Are you interested in working on this?
I certainly can. I just got stuck at setting up my env. If you can share your dev setup, i can try to copy it and see if I can develop and debug
Since it is just a python library now I would start with visual studio code and just write against the library directly to start.