-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems get_charge_history() API URI is no longer working? Returns 400 #155
Comments
Can you checkout commit e9d4612 to see if this new method works for you? |
The URL works (https://ownership.tesla.com/mobile-app/charging/history) and it provides great detail. It only provides data for public charger sessions however. No data is provided for home charging sessions with my Tesla Wall Charger. Here's an example of the returned data: "data": [
{
"sessionId": [redacted],
"vin": "[redacted]",
"postId": "0",
"cabinetId": "SC000000000008927",
"din": "",
"chargeSessionId": "[redacted]",
"siteLocationName": "Buellton, CA",
"siteAmenities": [
"AMENITIES_WIFI",
"AMENITIES_RESTROOMS",
"AMENITIES_CAFE",
"AMENITIES_LODGING",
"AMENITIES_RESTAURANT",
"AMENITIES_TWENTY_FOUR_HOUR"
],
"siteEntryLocation": {
"latitude": 34.614548,
"longitude": -120.188179
},
"siteAddress": {
"street": "McMurray Rd",
"streetNumber": "555",
"city": "Buellton",
"district": null,
"state": "CA",
"countryCode": "US",
"country": "United States",
"postalCode": "93427"
},
"siteLocalizedName": "NA-US-CA-Buelton",
"chargeStartDateTime": "2023-11-13T16:34:22-08:00",
"chargeStopDateTime": "2023-11-13T16:43:21-08:00",
"unlatchDateTime": "2023-11-13T16:43:23-08:00",
"countryCode": "US",
"isDcEnforced": false,
"isMsp": false,
"trtId": 2161,
"terminalSerialNumber": null,
"sessionSource": null,
"isV4Session": false,
"credit": null,
"chargingPackage": null,
"chargingVoucher": null,
"disputeDetails": null,
"fees": [
{
"sessionFeeId": [redacted],
"feeType": "CHARGING",
"currencyCode": "USD",
"pricingType": "PAYMENT",
"rateBase": 0.39,
"rateTier1": 0,
"rateTier2": 0,
"rateTier3": null,
"rateTier4": null,
"usageBase": 7,
"usageTier1": 8,
"usageTier2": 0,
"usageTier3": null,
"usageTier4": null,
"totalBase": 2.73,
"totalTier1": 0,
"totalTier2": 0,
"totalTier3": 0,
"totalTier4": 0,
"totalDue": 2.73,
"voucherValue": null,
"netDue": 2.73,
"uom": "kwh",
"isPaid": true,
"status": "PAID",
"processFlagId": 1
},
{
"sessionFeeId": [redacted],
"feeType": "PARKING",
"currencyCode": "USD",
"pricingType": "NO_CHARGE",
"rateBase": 0,
"rateTier1": 0,
"rateTier2": 0,
"rateTier3": null,
"rateTier4": null,
"usageBase": 0,
"usageTier1": 0,
"usageTier2": 0,
"usageTier3": null,
"usageTier4": null,
"totalBase": 0,
"totalTier1": 0,
"totalTier2": 0,
"totalTier3": 0,
"totalTier4": 0,
"totalDue": 0,
"voucherValue": null,
"netDue": 0,
"uom": "min",
"isPaid": true,
"status": "PAID",
"processFlagId": 1
}
],
"billingType": "IMMEDIATE",
"invoices": [
{
"fileName": "[redacted].pdf",
"contentId": "[redacted]",
"invoiceType": "IMMEDIATE",
"beInvoiceId": "[redacted]"
}
],
"fapiaoDetails": null,
"programType": "PTSCH",
"vehicleMakeType": "TSLA",
"surveyCompleted": false,
"surveyType": "CSAT",
"chargingSiteType": "",
"operator": null,
"suboperator": null,
"owner": null
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
teslapy==2.8.0
Trying:
print(vehicles[0].get_charge_history())
throws:
A colleage uses this in his script for fetching charging history now:
What do you mean?
The text was updated successfully, but these errors were encountered: