Lucid API

Hi,
I used the Unofficial Lucid API to grab the data from my vehicle. Link: https://testmycode.cc/
<snippet>

Field 1, battery: <br> &lt;class 'vehicle_state_service_pb2.BatteryState'&gt;:<br> Field 1, remaining_range: 230.0<br> Field 2, charge_percent: 35.50000052899122<br> Field 3, kwhr: 28.73999935761094<br> Field 4, capacity_kwhr: 80.9499981906265<br> Field 5, battery_health: WARNING_OFF (1)<br> Field 6, low_charge_level: WARNING_OFF (1)<br> Field 7, critical_charge_level: WARNING_OFF (1)<br> Field 9, preconditioning_status: BATTERY_PRECON_OFF (1)<br> Field 10, preconditioning_time_remaining: 255<br> Field 11, battery_health_level: 95.20000141859055<br> Field 13, bmu_software_version_major: 4<br> Field 14, bmu_software_version_minor: 12<br> Field 15, bmu_software_version_micro: 22<br> Field 16, battery_cell_type: BATTERY_CELL_TYPE_PANA_2170M (3)<br> Field 17, battery_pack_type: BATTERY_PACK_TYPE_AIR_16 (3)<br> Field 18, max_cell_temp: 32.300001971423626<br> Field 19, min_cell_temp: 29.500001929700375
<snippet>

Some questions if you don't mind... Is this data obtained in real time once you logged in?

Field 1, remaining_range: 230.0 ; But, currently this doesn't match what's shown in my Lucid App. App shows 142 miles remaining.

Field 4, capacity_kwhr: 80.9499981906265<br>

Field 11, battery_health_level: 95.20000141859055<br>

It seems to me, if I can read this Field 4 data correctly, my capacity is 80kWh (down from 88kWh original spec) so I have lost 9% ?
My vehicle build date is 9/2023 and I took delivery Sept 20th.

Field 11 is indicating current batt health/capacity? i.e. 95% ; but the above Field 4 suggests a loss of 9% already.

Seems confusing... and thus, any insights is most appreciated. Thanks.
142 miles = 228.5 km, so that field is probably in km
 
  • Like
Reactions: mxp
Yep, the range is in km, and you must convert it to miles. The temperature is in degrees Celsius, not Fahrenheit.

The battery capacity and health data are a mystery to me as well. My Air manufactured in April 2024 shows 95.5%. I took a procession of it in mid-July. OGs in this group posted that this data is not precisely accurate, according to Lucid. I don't know how to explain these numbers. One theory I have is, this excludes 3-4 KW buffer Lucid keeps. Also, another discrepancy is range. I see this in my output too. Your remaining KW is 28.74 rounded. At EPA rated miles per kwh, you should be getting 28.74 x 4.76 = 136.8 miles. If Lucid is using EPA, 142 miles indicate 29.8kw remaining.
 
Some questions if you don't mind... Is this data obtained in real time once you logged in?
Yes, although you’d have to log out and back in to refresh it.

Field 4, capacity_kwhr: 80.9499981906265<br>

Field 11, battery_health_level: 95.20000141859055<br>

It seems to me, if I can read this Field 4 data correctly, my capacity is 80kWh (down from 88kWh original spec) so I have lost 9% ?
My vehicle build date is 9/2023 and I took delivery Sept 20th.

Field 11 is indicating current batt health/capacity? i.e. 95% ; but the above Field 4 suggests a loss of 9% already.

Seems confusing... and thus, any insights is most appreciated. Thanks.
We do not know what the battery capacity means. We don’t know if there’s a reserve, of if it’s accurate at all. The battery health is a Lucid-provided metric, but we don’t know how it works or what it measures.

The majority of your degradation will happen in your first year of ownership; that is true of any battery-powered device, but especially EVs. After the first year, degradation slows down significantly.

The warranty is 70% capacity at 8 years. How you get there is up to you. :)

That said, after 2.75 years or so, my battery health is at 93.4%, and it was in the 95-96% range not too long ago in the first year, so your degradation seems reasonable, if the battery health percentage is to be trusted.

Meanwhile, my capacity says 105.71 kWh, which would be a 10.42% degradation, so I would trust the battery health number more. We simply don’t know what the capacity represents, and whether it includes everything or not. We don’t actually know that for battery health either, but the intent of that metric is at least more clear, even if we can’t guarantee accuracy.
 
  • Like
Reactions: mxp
Hi,
I used the Unofficial Lucid API to grab the data from my vehicle. Link: https://testmycode.cc/
<snippet>

Field 1, battery: <br> &lt;class 'vehicle_state_service_pb2.BatteryState'&gt;:<br> Field 1, remaining_range: 230.0<br> Field 2, charge_percent: 35.50000052899122<br> Field 3, kwhr: 28.73999935761094<br> Field 4, capacity_kwhr: 80.9499981906265<br> Field 5, battery_health: WARNING_OFF (1)<br> Field 6, low_charge_level: WARNING_OFF (1)<br> Field 7, critical_charge_level: WARNING_OFF (1)<br> Field 9, preconditioning_status: BATTERY_PRECON_OFF (1)<br> Field 10, preconditioning_time_remaining: 255<br> Field 11, battery_health_level: 95.20000141859055<br> Field 13, bmu_software_version_major: 4<br> Field 14, bmu_software_version_minor: 12<br> Field 15, bmu_software_version_micro: 22<br> Field 16, battery_cell_type: BATTERY_CELL_TYPE_PANA_2170M (3)<br> Field 17, battery_pack_type: BATTERY_PACK_TYPE_AIR_16 (3)<br> Field 18, max_cell_temp: 32.300001971423626<br> Field 19, min_cell_temp: 29.500001929700375
<snippet>

Some questions if you don't mind... Is this data obtained in real time once you logged in?

Field 1, remaining_range: 230.0 ; But, currently this doesn't match what's shown in my Lucid App. App shows 142 miles remaining.

Field 4, capacity_kwhr: 80.9499981906265<br>

Field 11, battery_health_level: 95.20000141859055<br>

It seems to me, if I can read this Field 4 data correctly, my capacity is 80kWh (down from 88kWh original spec) so I have lost 9% ?
My vehicle build date is 9/2023 and I took delivery Sept 20th.

Field 11 is indicating current batt health/capacity? i.e. 95% ; but the above Field 4 suggests a loss of 9% already.

Seems confusing... and thus, any insights is most appreciated. Thanks.
Field 1 is in kilometers. Most measurements coming from the API are in metric.
 
  • Like
Reactions: mxp
Ok. I just completed a charging session to 100% SOC on J1772 (6kwh max) for ~13 hours overnight.

Again, here's the stats I just pulled from Lucid API:
Field 1, battery: <br> &lt;class 'vehicle_state_service_pb2.BatteryState'&gt;:<br> Field 1, remaining_range: 648.0<br> Field 2, charge_percent: 100.00000149011612<br> Field 3, kwhr: 80.93999819085002<br> Field 4, capacity_kwhr: 80.93999819085002<br> Field 5, battery_health: WARNING_OFF (1)<br> Field 6, low_charge_level: WARNING_OFF (1)<br> Field 7, critical_charge_level: WARNING_OFF (1)<br> Field 9, preconditioning_status: BATTERY_PRECON_UNAVAILABLE (3)<br> Field 10, preconditioning_time_remaining: 255<br> Field 11, battery_health_level: 95.20000141859055<br> Field 13, bmu_software_version_major: 4<br> Field 14, bmu_software_version_minor: 12<br> Field 15, bmu_software_version_micro: 22<br> Field 16, battery_cell_type: BATTERY_CELL_TYPE_PANA_2170M (3)<br> Field 17, battery_pack_type: BATTERY_PACK_TYPE_AIR_16 (3)<br> Field 18, max_cell_temp: 28.900001920759678<br> Field 19, min_cell_temp: 27.700001902878284

Field 1, remaining_range: 648.0 ; Ok. This is 648km = 402 miles (matched the range on App)
Field 4, capacity_kwhr: 80.93999819085002 ; similar to before charging.
Field 11, battery_health_level: 95.20000141859055 ; similar to before charging.

NOTE: My SW is 2.3.10 ; and I noticed many people who went OTA 2.4.x claim better range or efficiency. Can we have some folks here on 2.4.x compare Field 13 to 15? Let's see if the software microcode changed at all. E.g. mine is bmu version 4.12.22

Field 13, bmu_software_version_major: 4<br>
Field 14, bmu_software_version_minor: 12<br>
Field 15, bmu_software_version_micro: 22<br>
 

Attachments

  • IMG_7264.webp
    IMG_7264.webp
    58 KB · Views: 54
Last edited:
Here is mine running 2.4.4.

Field 13, bmu_software_version_major: 4
Field 14, bmu_software_version_minor: 13
Field 15, bmu_software_version_micro: 7

Microcode seems to have changed
 
Here is mine running 2.4.4.

Field 13, bmu_software_version_major: 4
Field 14, bmu_software_version_minor: 13
Field 15, bmu_software_version_micro: 7

Microcode seems to have changed

Interesting.... Thank you for checking.
 
I just ran the API for the first time, and here is my data...

Field 11, battery_health_level: 97.80000145733356<br>
Field 13, bmu_software_version_major: 4<br>
Field 14, bmu_software_version_minor: 13<br>
Field 15, bmu_software_version_micro: 7

This is a 2023 Pure AWD which was both built and delivered in 11/23. I ran to a 100% charge on a slow charger about two months ago, and my range was 409 miles vs. the EPA 410 figure on the window sticker. The car has about 10.5k miles.

Please let me know if any other data would be useful to your analysis.
 
Hi,
I used the Unofficial Lucid API to grab the data from my vehicle. Link: https://testmycode.cc/
<snippet>

Field 1, battery: <br> &lt;class 'vehicle_state_service_pb2.BatteryState'&gt;:<br> Field 1, remaining_range: 230.0<br> Field 2, charge_percent: 35.50000052899122<br> Field 3, kwhr: 28.73999935761094<br> Field 4, capacity_kwhr: 80.9499981906265<br> Field 5, battery_health: WARNING_OFF (1)<br> Field 6, low_charge_level: WARNING_OFF (1)<br> Field 7, critical_charge_level: WARNING_OFF (1)<br> Field 9, preconditioning_status: BATTERY_PRECON_OFF (1)<br> Field 10, preconditioning_time_remaining: 255<br> Field 11, battery_health_level: 95.20000141859055<br> Field 13, bmu_software_version_major: 4<br> Field 14, bmu_software_version_minor: 12<br> Field 15, bmu_software_version_micro: 22<br> Field 16, battery_cell_type: BATTERY_CELL_TYPE_PANA_2170M (3)<br> Field 17, battery_pack_type: BATTERY_PACK_TYPE_AIR_16 (3)<br> Field 18, max_cell_temp: 32.300001971423626<br> Field 19, min_cell_temp: 29.500001929700375
<snippet>

Some questions if you don't mind... Is this data obtained in real time once you logged in?

Field 1, remaining_range: 230.0 ; But, currently this doesn't match what's shown in my Lucid App. App shows 142 miles remaining.

Field 4, capacity_kwhr: 80.9499981906265<br>

Field 11, battery_health_level: 95.20000141859055<br>

It seems to me, if I can read this Field 4 data correctly, my capacity is 80kWh (down from 88kWh original spec) so I have lost 9% ?
My vehicle build date is 9/2023 and I took delivery Sept 20th.

Field 11 is indicating current batt health/capacity? i.e. 95% ; but the above Field 4 suggests a loss of 9% already.

Seems confusing... and thus, any insights is most appreciated. Thanks.
Interesting. any new insights here?
 
Interesting. any new insights here?
I don't think there is much we could glean from here except hoping that others can occasionally post their data.
The graph plot of user data submissions are nice to determine if a trend line will emerge over time, but I'd be more interested to see what others are sharing in terms of absolute numbers for Field 4 & 11 specifically...

My build date is 9/2023 but I took delivery of the vehicle on 9/2024. I suspect my vehicle and its battery was slowly cooking/stewing under the Arizona sun for one year before I acquired it.
2024/10/18:
Field 4, capacity_kwhr: 80.84999819286168
Field 11, battery_health_level: 95.10000141710043

So far, I think @Buffalo Bob has got the nicest numbers for Field 11. He took delivery of a vehicle build which didn't get cooked under the Arizona sun...
 
So far, I think @Buffalo Bob has got the nicest numbers for Field 11. He took delivery of a vehicle build which didn't get cooked under the Arizona sun...

I have wondered about that. Beyond avoiding any outdoor summer storage, I also have the good fortune of being able to keep the car in temperate climates year-round. On the minus side of the equation, the car has been almost 100% DC fast-charged over its 10k+ miles, but at least generally within recommended SOC protocols.

Per @mxp's request, here is my API battery capacity data... Field 4, capacity_kwhr: 86.75999806076288

Forgive me if this has already been discussed, but have there been any reports about the relative performance of the Panasonic batteries going into newer Pure/Touring builds vs. the LG batteries in my car? For better or worse, or perhaps for no effect at all?
 
2023 Pure AWD built 2/23 delivered 9/23. 13,400 miles almost exclusively charged at DC fast chargers. Here are my stats:

"capacityKwHr": 86.00999807752669,
"batteryHealthLevel": 96.90000144392252
"bmuSoftwareVersionMajor": 4
"bmuSoftwareVersionMinor": 13
"bmuSoftwareVersionMicro": 7
"batteryCellType": "BATTERY_CELL_TYPE_LG_M48"
"batteryPackType": "BATTERY_PACK_TYPE_AIR_18",
 
Since I started monitoring (I use home assistant), my battery health has gone from 95.6 to 95.4. Mine is a 2024 Pure RWD made in April 2024, picked on July 2024. I have the Pana cells. It looks like the LG ones showing better health by these figures? I mostly charge at home with occasional DC fast charging for long trips. Garage kept in Texas. Interred in data from 2024 Pure RWD owners to compare our numbers.

Field 4, capacity_kwhr: 81.12999818660319
Field 11, battery_health_level: 95.40000142157078
Field 13, bmu_software_version_major: 4
Field 14, bmu_software_version_minor: 13
Field 15, bmu_software_version_micro: 7
Field 16, battery_cell_type: BATTERY_CELL_TYPE_PANA_2170M (3)
Field 17, battery_pack_type: BATTERY_PACK_TYPE_AIR_16 (3)
 
I have wondered about that. Beyond avoiding any outdoor summer storage, I also have the good fortune of being able to keep the car in temperate climates year-round. On the minus side of the equation, the car has been almost 100% DC fast-charged over its 10k+ miles, but at least generally within recommended SOC protocols.

Per @mxp's request, here is my API battery capacity data... Field 4, capacity_kwhr: 86.75999806076288

Forgive me if this has already been discussed, but have there been any reports about the relative performance of the Panasonic batteries going into newer Pure/Touring builds vs. the LG batteries in my car? For better or worse, or perhaps for no effect at all?
I don't know what was previously discussed in this forum about LG vs Pana cells.

Anecdotally, what I have casually learnt is that they differ only in battery chemistry. LG's are better at withstanding heat/ higher temp environments. Pana's are better suited for fast charging cycles.

I also noticed so far, folks who have posted their data, LG's appear to have slightly better battery health compared to those with Pana cells.. Again, all anecdotal at the moment.
 
Would love to contribute by at least testing and providing feedback. are there any steps to install the API?
 
Would love to contribute by at least testing and providing feedback. are there any steps to install the API?
 
Hi,

I just got around to installing HA and doing a manual install of the Lucid integration. When I try adding the integration, it says it's starting up, then gives me this error:

Error
Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

Any idea what I need to do to get it working?

Thanks,

Terry
 

Attachments

  • Screenshot 2024-12-05 at 2.36.06 PM.webp
    Screenshot 2024-12-05 at 2.36.06 PM.webp
    15.5 KB · Views: 24
  • Screenshot 2024-12-05 at 2.36.25 PM.webp
    Screenshot 2024-12-05 at 2.36.25 PM.webp
    11.1 KB · Views: 26
Hi,

I just got around to installing HA and doing a manual install of the Lucid integration. When I try adding the integration, it says it's starting up, then gives me this error:

Error
Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

Any idea what I need to do to get it working?

Thanks,

Terry
You picked the wrong day to start :)
HA just updated yesterday, we need to put out an update for the Lucid integration to fix a dependency issue with the new version. I plan to take a look at it tonight.
 
You picked the wrong day to start :)
HA just updated yesterday, we need to put out an update for the Lucid integration to fix a dependency issue with the new version. I plan to take a look at it tonight.
Of course that's what happened - always just my luck!
 
Of course that's what happened - always just my luck!
We will fix it - I am driving cross-country at the moment so I won't be able to get to it for a couple days, but hopefully @segbrk can.
 
Back
Top