Features for electric/hybrid cars
Hi @robbz23 I saw your comment on https://github.com/home-assistant/home-assistant/pull/12277#issuecomment-370777963.
We currently have this ongoing PR.
Next step is to add extra features including some for electric and hybrid cars. You can check the issue overview for these plans. We have received data from an i3 and a 225xe hybrid which we can use to add some extra features like charging status, electric range.
If you have any more good ideas which features to add for an electric/hybrid car, you can drop them here and we can see how to add these.
@robbz23 After switching to the new b2vapi, we need again people who contribute the data for their vehicles :car: so that we can try to parse these as well. This would help in finding bugs :beetle: in dealing with different vehicles.
If you're interested:
- please download the b2vapi branch: https://github.com/ChristianKuehnel/bimmer_connected/tree/b2vapi
- run
generate_vehicle_fingerprint.py - send me the files somehow (after removing your VIN and gps position).
I got the data for the i3 from @robz23 and added it to the repo. I also added interfaces to process the attributes that are specific to electric vehicles.
Hi Guys, I have an i3 (BEV) - Is there any way I can help contribute?
@kernelkraut It might be interesting to see if there are any differences between BEV and REX. follow m1n3rva's instructions and run the generate_vehicle_fingerprint.py. You will need to install requests from pip.
herewith some info from my i3. (sorry about the delay)
Status.json
{ "vehicleStatus" : { "doorPassengerFront" : "CLOSED", "cbsData" : [ { "cbsDueDate" : "2018-11", "cbsState" : "OK", "cbsDescription" : "Next change due at the latest by the stated date.", "cbsType" : "BRAKE_FLUID" }, { "cbsDueDate" : "2018-11", "cbsState" : "OK", "cbsDescription" : "Next visual inspection due when the stated distance has been covered or by the stated date.", "cbsType" : "VEHICLE_CHECK" } ], "windowDriverFront" : "CLOSED", "DCS_CCH_Ongoing" : false, "updateReason" : "VEHICLE_SHUTDOWN_SECURED", "rearWindow" : "INVALID", "DCS_CCH_Activation" : "NA", "chargingInductivePositioning" : "NOT_POSITIONED", "remainingRangeElectric" : 53, "singleImmediateCharging" : false, "maxRangeElectric" : 103, "chargingConnectionType" : "CONDUCTIVE", "positionLight" : "OFF", "lastChargingEndReason" : "END_REQUESTED_BY_DRIVER", "chargingStatus" : "INVALID", "vin" : "HIDDEN", "doorDriverFront" : "CLOSED", "mileage" : 16059, "checkControlMessages" : [ ], "parkingLight" : "OFF", "windowDriverRear" : "CLOSED", "remainingRangeElectricMls" : 32, "lastChargingEndResult" : "SUCCESS", "steering" : "RH", "updateTime" : "2018-03-15T15:44:30+0100", "remainingFuel" : 0, "windowPassengerRear" : "CLOSED", "trunk" : "CLOSED", "hood" : "CLOSED", "internalDataTimeUTC" : "2018-03-15T14:44:30", "maxRangeElectricMls" : 64, "windowPassengerFront" : "CLOSED", "doorLockState" : "SECURED", "doorPassengerRear" : "CLOSED", "doorDriverRear" : "CLOSED", "sunroof" : "CLOSED", "connectionStatus" : "DISCONNECTED", "chargingLevelHv" : 58, "position" : { "heading" : HIDDEN, "lon" : HIDDEN, "lat" : HIDDEN, "status" : "OK" } } }
Vehicles.json
{ "vehicles" : [ { "vehicleFinderRestriction" : "NONE", "doorUnlock" : "ACTIVATED", "color" : "SOLARORANGE MET. M. AKZENT FROZEN G", "onlineSearchMode" : "MAP", "breakdownNumber" : "+4989358957103", "smartSolution" : "NOT_SUPPORTED", "yearOfConstruction" : 2014, "driveTrain" : "BEV", "rangeMap" : "RANGE_CIRCLE", "vehicleFinder" : "ACTIVATED", "a4a" : "USB_ONLY", "hornBlow" : "ACTIVATED", "chargeNow" : "NOT_SUPPORTED", "licensePlate" : "HIDDEN", "countryCode" : "B3-ZA", "bodytype" : "I01", "lightFlash" : "ACTIVATED", "vin" : "HIDDEN", "model" : "i3", "ipa" : "NOT_SUPPORTED", "brand" : "BMW_I", "climateControl" : "NOT_SUPPORTED", "sendPoi" : "ACTIVATED", "lastDestinations" : "SUPPORTED", "doorLock" : "ACTIVATED", "chargingControl" : "WEEKLY_PLANNER", "onlineSearchProvider" : "GOOGLE", "steering" : "RH", "intermodalRouting" : "NOT_AVAILABLE", "supportedChargingModes" : [ "AC_LOW", "AC_HIGH" ], "lscType" : "I_LSC_IMM", "hasAlarmSystem" : true, "statisticsCommunityEnabled" : true, "climateNow" : "ACTIVATED", "hub" : "HUB_ECE", "remote360" : "NOT_SUPPORTED", "hmiVersion" : "ID4", "dealer" : { "country" : "ZA", "city" : "Midrand", "phone" : "+27 12 522 3000", "street" : "1 Bavaria Avenue", "postalCode" : "1685", "name" : "BMW (South Africa) (Pty) Ltd. ZA" }, "climateFunction" : "AIRCONDITIONING", "colorCode" : "B78", "carCloud" : "NOT_SUPPORTED", "statisticsAvailable" : true } ] }
@kernelkraut thx for your data :scroll: :smile: . Just to be sure it's not a copy-and-past :clipboard: error:
Your status.json does not contain the field chargingTimeRemaining . Correct?
Reason I'm asking is: the data we have from an i3 with REX does contain this attribue...
Yeah thats correct - probably because its not plugged in right now. I'll go plug it in and re-run the script...
Ok, so I have now got it connected and it's charging:
Status.json
{ "vehicleStatus" : { "doorPassengerFront" : "CLOSED", "cbsData" : [ { "cbsDueDate" : "2018-11", "cbsState" : "OK", "cbsDescription" : "Next change due at the latest by the stated date.", "cbsType" : "BRAKE_FLUID" }, { "cbsDueDate" : "2018-11", "cbsState" : "OK", "cbsDescription" : "Next visual inspection due when the stated distance has been covered or by the stated date.", "cbsType" : "VEHICLE_CHECK" } ], "windowDriverFront" : "CLOSED", "DCS_CCH_Ongoing" : false, "updateReason" : "CHARGING_STARTED", "rearWindow" : "INVALID", "DCS_CCH_Activation" : "NA", "chargingInductivePositioning" : "NOT_POSITIONED", "remainingRangeElectric" : 54, "singleImmediateCharging" : false, "maxRangeElectric" : 97, "chargingConnectionType" : "CONDUCTIVE", "positionLight" : "OFF", "lastChargingEndReason" : "UNKNOWN", "chargingStatus" : "CHARGING", "vin" : "HIDDEN", "doorDriverFront" : "CLOSED", "mileage" : 16059, "chargingTimeRemaining" : 169, "checkControlMessages" : [ ], "parkingLight" : "OFF", "windowDriverRear" : "CLOSED", "remainingRangeElectricMls" : 33, "lastChargingEndResult" : "UNKNOWN", "steering" : "RH", "updateTime" : "2018-03-17T08:20:35+0100", "remainingFuel" : 0, "windowPassengerRear" : "CLOSED", "trunk" : "CLOSED", "hood" : "CLOSED", "internalDataTimeUTC" : "2018-03-17T07:19:19", "maxRangeElectricMls" : 60, "windowPassengerFront" : "CLOSED", "doorLockState" : "SELECTIVE_LOCKED", "doorPassengerRear" : "CLOSED", "doorDriverRear" : "CLOSED", "sunroof" : "CLOSED", "connectionStatus" : "CONNECTED", "chargingLevelHv" : 58, "position" : { "heading" : HIDDEN, "lon" : HIDDEN, "lat" : HIDDEN, "status" : "OK" } } }
vehicles.json
{ "vehicles" : [ { "vehicleFinderRestriction" : "NONE", "doorUnlock" : "ACTIVATED", "color" : "SOLARORANGE MET. M. AKZENT FROZEN G", "onlineSearchMode" : "MAP", "breakdownNumber" : "+4989358957103", "smartSolution" : "NOT_SUPPORTED", "yearOfConstruction" : 2014, "driveTrain" : "BEV", "rangeMap" : "RANGE_CIRCLE", "vehicleFinder" : "ACTIVATED", "a4a" : "USB_ONLY", "hornBlow" : "ACTIVATED", "chargeNow" : "NOT_SUPPORTED", "licensePlate" : "HIDDEN", "countryCode" : "B3-ZA", "bodytype" : "I01", "lightFlash" : "ACTIVATED", "vin" : "HIDDEN", "model" : "i3", "ipa" : "NOT_SUPPORTED", "brand" : "BMW_I", "climateControl" : "NOT_SUPPORTED", "sendPoi" : "ACTIVATED", "lastDestinations" : "SUPPORTED", "doorLock" : "ACTIVATED", "chargingControl" : "WEEKLY_PLANNER", "onlineSearchProvider" : "GOOGLE", "steering" : "RH", "intermodalRouting" : "NOT_AVAILABLE", "supportedChargingModes" : [ "AC_LOW", "AC_HIGH" ], "lscType" : "I_LSC_IMM", "hasAlarmSystem" : true, "statisticsCommunityEnabled" : true, "climateNow" : "ACTIVATED", "hub" : "HUB_ECE", "remote360" : "NOT_SUPPORTED", "hmiVersion" : "ID4", "dealer" : { "country" : "ZA", "city" : "Midrand", "phone" : "+27 12 522 3000", "street" : "1 Bavaria Avenue", "postalCode" : "1685", "name" : "BMW (South Africa) (Pty) Ltd. ZA" }, "climateFunction" : "AIRCONDITIONING", "colorCode" : "B78", "carCloud" : "NOT_SUPPORTED", "statisticsAvailable" : true } ] }
Is anyone currently working on adding the electric/hybrid vehicle attributes to Home Assistant?
Itβs on my to do list, see #16 and #17.
OK, the I'll close this ticket and we track in in #16 and #17.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.