Hacksore/bluelinky

Total energy consumption reported by driveHistory seems underestimated

Opened this issue · 0 comments

Describe the bug
Total energy consumption reported by driveHistory seems underestimated.

I suggest we redefine the total energy consumed as total + regen.

Useful info(please complete the following information):

  • macOS
  • Bluelinky Version 8.2.1
  • Region: EU
  • Brand: Hyundai (Ioniq 6)

Additional context
A few days ago I have made a trip of 458 km on a single charge, with lots of highway, going from 100% battery to 6%.
A call to vehicle.driveHistory() leads to the following entry in the history[] array:

		{
			"period": 0,
			"rawDate": "20240511",
			"date": "2024-05-10T22:00:00.000Z",
			"consumption": {
				"total": 64222,
				"engine": 60423,
				"climate": 2029,
				"devices": 1770,
				"battery": 0
			},
			"regen": 7284,
			"distance": 458
		},

The numbers seem odd. The total battery capacity is 77kWh, I have consumed 94% of it according to the infotainment (~72.4kWh) and according to the API it seems that only 64.222kWh would have been extracted from the battery.

The kWh/100 consumption calculated by (total / 1000) / (distance / 100) leads to 14 kWh for 100 km, which is quite low.

I wonder how we should treat the regen value. What if the actual total consumption was total + regen ? It would match the total energy consumed, as 64.2 + 7.3 = 71.5 is pretty close to the 72.4 estimated above. Consumption per km would become 15.6 which seems much closer to the reality too.

Another day, I did the same travel in the opposite direction, but there were lots of traffic jams and I have done a small charge in the middle of the trip. Drive history gives this

		{
			"period": 0,
			"rawDate": "20240508",
			"date": "2024-05-07T22:00:00.000Z",
			"consumption": {
				"total": 51299,
				"engine": 47909,
				"climate": 1080,
				"devices": 2310,
				"battery": 0
			},
			"regen": 20429,
			"distance": 474
		},

Notice the regen is quite high, which is consistent with circulation in traffic jams. total is really low at 51.3 kWh, but total + regen is close to the value of the other trip at 71.7 kWh. total / distance gives 10.8 kWh / 100 km (too low) but (total + regen) / distance gives 15.1 kWh / 100 km (quite realistic).