I’ve done the following:
I installed MyBMW binding in parallel and created mybmw vehicle thing. I unlinked the mileage item from ConnectedDrive thing and linked it to MyBMW thing in order to keep the persisted history data. If you want to preserve some more history (soc, ranges, …) do the same for the desired items.
With this one time manual migration the previous collected data from BMW ConnectedDrive binding isn’t lost.
Is anyone getting error messages lately with this binding? I keep getting this, fresh install OH3.2… Everything else works fine but this.
2022-03-28 22:40:09.043 [WARN ] [internal.handler.ConnectedDriveProxy] - Server returned HTTP response code: 401 for URL: https://customer.bmwgroup.com/gcdm/oauth/authenticate
2022-03-28 22:40:09.329 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
at org.eclipse.jetty.util.UrlEncoded.decodeTo(UrlEncoded.java:238) ~[?:?]
at org.openhab.binding.bmwconnecteddrive.internal.handler.ConnectedDriveProxy.codeFromUrl(ConnectedDriveProxy.java:446) ~[?:?]
at org.openhab.binding.bmwconnecteddrive.internal.handler.ConnectedDriveProxy.updateToken(ConnectedDriveProxy.java:303) ~[?:?]
at org.openhab.binding.bmwconnecteddrive.internal.handler.ConnectedDriveProxy.getToken(ConnectedDriveProxy.java:259) ~[?:?]
at org.openhab.binding.bmwconnecteddrive.internal.handler.ConnectedDriveProxy.call(ConnectedDriveProxy.java:144) ~[?:?]
at org.openhab.binding.bmwconnecteddrive.internal.handler.ConnectedDriveProxy.get(ConnectedDriveProxy.java:177) ~[?:?]
at org.openhab.binding.bmwconnecteddrive.internal.handler.ConnectedDriveProxy.requestVehicles(ConnectedDriveProxy.java:185) ~[?:?]
at org.openhab.binding.bmwconnecteddrive.internal.handler.ConnectedDriveBridgeHandler.lambda$3(ConnectedDriveBridgeHandler.java:116) ~[?:?]
at java.util.Optional.ifPresent(Optional.java:183) ~[?:?]
at org.openhab.binding.bmwconnecteddrive.internal.handler.ConnectedDriveBridgeHandler.requestVehicles(ConnectedDriveBridgeHandler.java:116) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
I have a conventional BMW. Is it possible to track my ways? I know that there is a item for electric cars, but is there any process to have a map showing all ways I did.
Hi @Claude5555 it will depend on the model and age of your car. BMW have changed what information they collect and publish, for example I have a 2012 M5 that used to publish it’s location via the app but no longer does. My wife has a 2021 Mini Cooper and that tracks every location the car stops at, you have to enable the setting in the cars settings for this to work.
It should be possible then if you have ConnectedDrive and you have enabled it inside the car.
Use the MyBMW binding from the “Community Marketplace” from the bindings.
The setup is quite easy.
As for history: yes and no. The road you took is not there (at least in my case) as the car seems to update its position toward BMW on certain events (door open/close). So while driving it doesn’t necessarily update the position in my experience (G30 2017).
I already set up MyBMW bonding add-on and I get an update of my position, but just the update. I don’t get a map with the history of the way I used. Just the last position.
thanks again for your help. I don’t have GPSLatLngLocation, but GPS_coordinates. I think it is the same. I already make a Page site map using GPS_coordinates, but it doesn’t keep the different coordinates to show the road I used on a sitemap.
This is where you have to creative and do a little coding to achieve what your looking for. There is no out of the box way of displaying the full history of items in a way where you can map the various locations. The various persistence methods will help to a degree. BMW don’t record the route you take while driving, they only update the GPS location when the vehicle has stopped and the ignition turned off.
What this means is that you’ll only be able to show on a map, the locations that BMW have recorded for you. As an example, if you’ve travelled to three places and managed to work out how best to record that data, then you use an API into Google Maps to bring up a possible route.
Hi Maximo and thanks for your message. Just one additional thing. A fix years ago, it was possible to send an address with your computer using google maps. There was a partnership between google and BMW. It was simple to search an address on google and send it to your car. Now it seems that it is no more possible. Am I wrong?
No your not wrong. BMW have changed functionality of their app over the years and via the online portal.
I’m no coder myself, so not really in a position to help. I’ve had to learn by trial and error, also by come back here with my existing code when things don’t go as expected. Writing code for other people is a very difficult thing to get right, there are far to many variables involved. The best advice I could give is for you to search the forum to see how others have written their code and to adapt that for your needs. There are loads of people on here who will be able to help guide you along the way, once you’ve got started.