MyBMW Binding

You have the same error like I had. Just check my posts above. It is the duplicate channel error.
This happened to me with updating openhabian.
You have to force removal by clicking on delete button again. Then you can add the car thing again and it is working again.

1 Like

….binding functions pretty well including retrieving data from and sending commands to the vehicle. Frequency of API requests seems to be limitted. Does anybody know the exact limitation?
Thanks, Arno

Atleast that worked and the Thing went online for a few minutes.
But now i´m back to OFFLINE (COMMUNICATION_ERROR): Vehicle State Update failed

I guess you received a quote limit reached error. In my opinion this is a mostly random.
What I did was to set the refresh to 0 and check in a rule every minute if the last successful refresh was more than 3 minutes in the past. Then I am triggering an status update. It also fails from time to time. But I just try it again and again. In the first half half an hour it mostly works without the error. In the 2nd half an hour the error appears more often. But there is no pattern…

My refresh interval is configured to 5 minutes.
Now i get updates of the car :slight_smile:
Seems like the API has some hickups.

Hi,

I tried to connect to my vehicule using myBMW binding. I got communication error and authorization failed. May I ask how to fix it?

Thanks for your help

kind regards
Claude

I’ve been using OH 4.1.0 using the separate myBMW binding from Martin Grassl since the bundled one didn’t work. For at least the last 2 weeks I noticed that the car pictures that used to be shown are no longer shown.
So I upgraded to OH 4.1.2 (docker) and also upgraded the myBMW binding using the https://github.com/martingrassl/openhab-mybmw/ addon in the addons-folder. After the binding connected to BMW I still don’t get the pictures and openhab.log shows this (VIN replaced):

2024-03-30 15:10:25.376 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Request URL - BEGIN ######
2024-03-30 15:10:25.376 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - https://cocoapi.bmwgroup.com/eadrax-vcs/v4/vehicles/state
2024-03-30 15:10:25.377 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Request Body - BEGIN ######
2024-03-30 15:10:25.377 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - 
2024-03-30 15:10:25.377 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Response Data - BEGIN ######
2024-03-30 15:10:25.378 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - {"state":{"isLeftSteering":true,"lastFetched":"2024-03-30T14:10:24.935Z","lastUpdatedAt":"2024-03-30T10:31:35Z","isLscSupported":true,"range":243,"doorsState":{"combinedSecurityState":"SECURED","leftFront":"CLOSED","leftRear":"CLOSED","rightFront":"CLOSED","rightRear":"CLOSED","combinedState":"CLOSED","hood":"CLOSED","trunk":"CLOSED"},"windowsState":{"leftFront":"CLOSED","leftRear":"CLOSED","rightFront":"CLOSED","rightRear":"CLOSED","combinedState":"CLOSED"},"tireState":{"frontLeft":{"details":{"identificationInProgress":false},"status":{"currentPressure":230,"targetPressure":250}},"frontRight":{"details":{"identificationInProgress":false},"status":{"currentPressure":230,"targetPressure":250}},"rearLeft":{"details":{"identificationInProgress":false},"status":{"currentPressure":260,"targetPressure":270}},"rearRight":{"details":{"identificationInProgress":false},"status":{"currentPressure":260,"targetPressure":270}}},"location":{"coordinates":{"latitude":1.1,"longitude":2.2},"address":{"formatted":"anonymousAddress"},"heading":-1},"currentMileage":27412,"climateControlState":{"activity":"INACTIVE"},"requiredServices":[{"dateTime":"2024-06-01T00:00:00.000Z","type":"BRAKE_FLUID","status":"OK","description":"Next service due by the specified date."},{"dateTime":"2024-06-01T00:00:00.000Z","type":"VEHICLE_CHECK","status":"OK","description":"Next visual inspection due by specified date or, if shown, when stated distance has been reached."},{"dateTime":"2025-06-01T00:00:00.000Z","type":"VEHICLE_TUV","status":"OK","description":"Next state inspection due by the specified date."}],"checkControlMessages":[{"type":"TIRE_PRESSURE","severity":"LOW"}],"chargingProfile":{"chargingControlType":"WEEKLY_PLANNER","reductionOfChargeCurrent":{"start":{"hour":22,"minute":0},"end":{"hour":8,"minute":0}},"chargingMode":"IMMEDIATE_CHARGING","chargingPreference":"NO_PRESELECTION","departureTimes":[{"id":1,"timeStamp":{"hour":21,"minute":10},"action":"DEACTIVATE","timerWeekDays":["TUESDAY"]},{"id":2,"timeStamp":{"hour":0,"minute":0},"action":"DEACTIVATE","timerWeekDays":[]},{"id":3,"timeStamp":{"hour":0,"minute":0},"action":"DEACTIVATE","timerWeekDays":[]},{"id":4,"timeStamp":{"hour":7,"minute":30},"action":"DEACTIVATE","timerWeekDays":[]}],"climatisationOn":false,"chargingSettings":{"targetSoc":80,"acCurrentLimit":32,"idcc":"UNLIMITED_LOUD","hospitality":"HOSP_INACTIVE","isAcCurrentLimitActive":false}},"electricChargingState":{"chargingLevelPercent":67,"range":243,"isChargerConnected":false,"chargingStatus":"INVALID","chargingTarget":80},"combustionFuelLevel":{"range":243},"driverPreferences":{"lscPrivacyMode":"OFF"},"climateTimers":[{"isWeeklyTimer":false,"timerAction":"DEACTIVATE","timerWeekDays":[],"departureTime":{"hour":7,"minute":0}},{"isWeeklyTimer":true,"timerAction":"DEACTIVATE","timerWeekDays":["MONDAY"],"departureTime":{"hour":7,"minute":0}},{"isWeeklyTimer":true,"timerAction":"DEACTIVATE","timerWeekDays":["MONDAY"],"departureTime":{"hour":7,"minute":0}}],"securityOverviewMode":"ARMED","vehicleSoftwareVersion":{"puStep":{"month":11,"year":23},"iStep":{"seriesCluster":"S18A","year":23,"month":11,"iStep":573}}},"capabilities":{"a4aType":"NOT_SUPPORTED","climateNow":true,"climateFunction":"AIR_CONDITIONING","horn":true,"isBmwChargingSupported":true,"isCarSharingSupported":false,"isChargeNowForBusinessSupported":true,"isChargingHistorySupported":true,"isLocationBasedChargingSettingsSupported":false,"isChargingHospitalityEnabled":true,"isChargingLoudnessEnabled":true,"isChargingPlanSupported":true,"isChargingPowerLimitEnabled":true,"isChargingSettingsEnabled":true,"isChargingTargetSocEnabled":true,"isCustomerEsimSupported":false,"isDataPrivacyEnabled":false,"isDCSContractManagementSupported":true,"isEasyChargeEnabled":false,"isMiniChargingSupported":false,"isEvGoChargingSupported":false,"isRemoteHistoryDeletionSupported":false,"isRemoteEngineStartSupported":false,"isRemoteServicesActivationRequired":false,"isRemoteServicesBookingRequired":false,"isScanAndChargeSupported":true,"lastStateCallState":"ACTIVATED","lights":true,"lock":true,"remote360":true,"remoteSoftwareUpgrade":true,"sendPoi":true,"speechThirdPartyAlexa":true,"speechThirdPartyAlexaSDK":false,"unlock":true,"vehicleFinder":true,"vehicleStateSource":"LAST_STATE_CALL","isRemoteHistorySupported":true,"isWifiHotspotServiceSupported":false,"isNonLscFeatureEnabled":false,"isSustainabilitySupported":true,"isSustainabilityAccumulatedViewEnabled":true,"specialThemeSupport":[],"isRemoteParkingSupported":false,"remoteChargingCommands":{"chargingControl":["START","STOP"],"plugControl":["UNLOCK_PLUG"],"flapControl":["COUPLE_FLAP","DECOUPLE_FLAP"]},"isClimateTimerWeeklyActive":false,"digitalKey":{"state":"ACTIVATED","bookedServicePackage":"SMACC_1_5","readerGraphics":"000200000000","vehicleSoftwareUpgradeRequired":false,"isDigitalKeyFirstSupported":false},"isPersonalPictureUploadSupported":false,"isPlugAndChargeSupported":false,"isOptimizedChargingSupported":false,"alarmSystem":false,"isThirdPartyAppStoreSupported":false}}
2024-03-30 15:10:25.378 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Response Data - END ######
2024-03-30 15:10:25.398 [DEBUG] [nternal.utils.ChargingProfileWrapper] - Profile not valid - Key WINDOWSTART doesn't contain boolean value
2024-03-30 15:10:25.400 [DEBUG] [nternal.utils.ChargingProfileWrapper] - Profile not valid - Key WINDOWEND doesn't contain boolean value
2024-03-30 15:10:25.453 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Request URL - BEGIN ######
2024-03-30 15:10:25.454 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - https://cocoapi.bmwgroup.com/eadrax-chs/v1/charging-statistics?vin=anonymousVin&currentDate=2024-03-30T14%3A10%3A25.406213944Z
2024-03-30 15:10:25.454 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Request Body - BEGIN ######
2024-03-30 15:10:25.455 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - 
2024-03-30 15:10:25.455 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Response Data - BEGIN ######
2024-03-30 15:10:25.455 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - {"type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","title":"Not Found","status":404,"traceId":"00-1af5909320085131f147c805e570a6c5-df1123faf1e9e424-01"}
2024-03-30 15:10:25.456 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Response Data - END ######
2024-03-30 15:10:25.456 [DEBUG] [ybmw.internal.handler.VehicleHandler] - NetworkException [url=https://cocoapi.bmwgroup.com/eadrax-chs/v1/charging-statistics?vin=ABC12DEF345GH67890&currentDate=2024-03-30T14%3A10%3A25.406213944Z, status=404, reason={"type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","title":"Not Found","status":404,"traceId":"00-1af5909320085131f147c805e570a6c5-df1123faf1e9e424-01"}, body=]
2024-03-30 15:10:25.508 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Request URL - BEGIN ######
2024-03-30 15:10:25.509 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - https://cocoapi.bmwgroup.com/eadrax-ics/v3/presentation/vehicles/anonymousVin/images?carView=VehicleStatus
2024-03-30 15:10:25.510 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Request Body - BEGIN ######
2024-03-30 15:10:25.510 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - 
2024-03-30 15:10:25.511 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Response Data - BEGIN ######
2024-03-30 15:10:25.511 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - {"message":"Cannot GET /api/v3/presentation/vehicles/ABC12DEF345GH67890/images?carView=VehicleStatus","error":"Not Found","statusCode":404}
2024-03-30 15:10:25.512 [DEBUG] [ernal.handler.backend.MyBMWHttpProxy] - ###### Response Data - END ######
2024-03-30 15:10:25.512 [DEBUG] [ybmw.internal.handler.VehicleHandler] - NetworkException [url=https://cocoapi.bmwgroup.com/eadrax-ics/v3/presentation/vehicles/ABC12DEF345GH67890/images?carView=VehicleStatus, status=404, reason={"message":"Cannot GET /api/v3/presentation/vehicles/ABC12DEF345GH67890/images?carView=VehicleStatus","error":"Not Found","statusCode":404}, body=]

So, it seems, BMW has moved the images to another URI.

Is this an issue that others also have seen or does it only affect me?

Hi @Claude5555 ,

Can you successfully log in to the myBMW portal via the browser?

Hi @froyde ,

Could you create the fingerprint via the console and share the file with me? Looks like you’re getting other errors as well which should be analyzed further.

Thanks,
Martin

Hi,
Normally it works. I tried a web connection and it failed providing that my credentials are wrong. I tried on my application. I disconnected and tried to connect then. I got a message that my credentials were wrong. I am 100% sure that my credentials are the right ones. I am wondering if BMW have a security level that blocks any connection.
Do you have an explanation?

Thank you for your response and help

Claude

Hi again,

I changed my credentials and it works. I have just one issue. It doesn’t use the right unit. It provide hPa instead of Bar, m instead of Km. How is it possible to change it?

Thanks for your help

kind regards

Claude

Hi @MartinOpenhabFan,
didn’t forget you, but it doesn’t seem to be as easy as I thought getting the fingerprint working due to rate limits of the BMW API:

######### Vehicle charging statistics
Fingerprint failed, network exception: {"type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","title":"Not Found","status":404,"traceId":"00-d169cc63824b470c4df07d440072b5e7-658f0fc71122f574-01"}
### End account 1
### Fingerprint has been written to zipfile: /openhab/mybmw/20240404.zip
# End fingerprint
openhab> mybmw fingerprint
# Start fingerprint
### Account 1
###### Vehicles base for brand bmw
Fingerprint failed, network exception: { "statusCode": 403, "message": "Out of call volume quota. Quota will be replenished in 00:42:55." }
### End account 1
Exception zipping fingerprint: /openhab/mybmw/20240404
### Fingerprint has been written to files in directory: /openhab/mybmw/20240404
# End fingerprint

Furthermore my OH is running in Docker and I did not yet find the location where this goes on my host OS. Is the fingerprint “just” what is also printed on screen?

Best regards
Marco

Hi @Claude5555,

this is a known issue, as since OH 4 the way units are stored has been changed. You can read about it in Units Of Measurement | openHAB. You can only change it manually by changing the unit metadata or state metadata.

Best regards,
Martin

Hi @froyde,

if you enable debug logging for the binding, you should see all the HTTP requests and responses in the log - just there the VIN is not everywhere anonymized.

But I found in Change vehicle FRONTSIDE image by rikroe · Pull Request #604 · bimmerconnected/bimmer_connected · GitHub, that there was a change in the names of the vehicle images, I will fix that during the next days. I’m just wondering as none of the images is working, why they didn’t change the other image names as well. At least one looks like it is working fine…

Will keep you updated.

Best regards,
Martin

Thanks a lot Martin. Is there any tutorial that explains how to do it?

kind regards

Claude

Here what I did. Item app Metadata, unit selected and added the unit. For example litre/KiloMetre (French) based on Units Of Measurement | openHABAm I wrong because it doesn’t work, I still have the same unit

Tanks a lot for your help

Kind regards

Claude

Hi everyone,

after one day, the connection to my BMW did not work anymore. I tried to connect to my account on bmw.fr using my Mac computer. I realized that my password was not working anymore and a process to change it was suggested. I didi it and changed my password. It works and then a few minutes later I was rejected and the password was not working. I called Bmw conectedDrive and the conclusion was that a bot was trying to connect to my account and the new Bmw policy rejected the connection and blocked the access to my account. They asked me to disable my bot in order to provide a new password. Is there any solution to fix this issue or can we have to conclude that the connection of openhab4 will not work anymore due to new BMW security policy?

Thanks for your help

Kind regards

Claude

Hi @Claude5555,

hmmm I never faced this issue. What is your configured frequency for fetching the data? How many vehicles do you have in your account?

Thanks,
Martin

Hi @MartinOpenhabFan,
while I have nothing changed on my end, the car pictures somehow did return in OH. Since approximately 1 week they are back. Either OH is so smart that I now get some cached pictures from almost a month ago or BMW did change something on their end.
That said: my initial problem does not seem to exist any more.
Thanks for your support in troubleshooting it.

Best regards

Marco

Hi @froyde,

oh, thanks for notifying me - i already fixed the code so that only the new image would be available in the addon, nevertheless I tested now and yes, all the images are loading with the old viewports as well… so I have to revert my changes :astonished:

Best regards,
Martin