New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BMW 5 Series 2014 F10 #62
Comments
Also just to note that I followed the instructions to run the fingerprint command but VIN no longer seems to be an argument, is that correct? |
@dws199 Now to the hard part about the status call failing. The response from the server contains the error message I was fearing to see:
I've heard rumours that in some cases you can only get the state of the vehicle if you're within a certain distance of the vehicle 😞 . I guess the same applies to your smartphone app 📱. I'm not sure why that is and which vehicles are affected by it. I'm also not sure if this is somehow related to the vehicle or the account. So, what to do now. Some ideas:
But none of these options is probably what you want 😢. But as we're using the same API as the smartphone 📱, we can't do any better than that 😐 @gerard33 |
@m1n3rva @gerard33
Thanks for looking into this. Yes definitely with the app you have to be
within a mile is the vehicle to get its location, this a restriction on the
earlier models I believe. But it would be good at least to know if the car
was home or away, so maybe pass the location of my home location?
Thanks
Dave
…On Fri, 6 Apr 2018, 21:07 m1n3rva, ***@***.***> wrote:
@dws199 <https://github.com/dws199>
The easy part of the answer 😉 is: Yes, the VIN is no longer needed. We
figured out a way to list all the cars 🚗 associated with your connected
drive account. And the vehicle_0.txt is exactly that list.
Now to the hard part about the status call failing. The response from the
server contains the error message I was fearing to see:
"description" : "(SmartPhoneUtil-A-101) Mandatory parameter(s) missed or
blank: dlat and dlon are required for BMW vehicles!"
I've heard rumours that in some cases you can only get the state of the
vehicle if you're within a certain distance of the vehicle 😞 . I guess
the same applies to your smartphone app 📱. I'm not sure why that is and
which vehicles are affected by it. I'm also not sure if this is somehow
related to the vehicle or the account.
So, what to do now. Some ideas:
1. Always send a default position e.g. dlat=0.0 dlon=0.0 and see what
happens
2. Let the user of the library guess the position. In case of Home
Assistant: use your home location then you will at least get some data when
the vehicle is at home.
3. Switch of the status-related attributes for such vehicles and only
offer the remote services.
But none of these options is probably what you want 😢. But as we're
using the same API as the smartphone 📱, we can't do any better than that
😐
@gerard33 <https://github.com/gerard33>
Looking at the data in #60
<#60> there we also
have the lscType: NOT_SUPPORTED but the server at least returns some
data. Not much, but at least not an error message. So I guess this means
something different.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AjZaLBddSHFBfyz_VLuajXwt_PPMotvXks5tl8rygaJpZM4TFJ92>
.
|
Hey @dws199, so I added the gps position 🌎 as parameter in #71. It does work with my vehicle, but is also worked before 😀. So I can't really test if that changes anything 😐 . The new call is:
Where latitude and longitude are floating point numbers with your GPS position 🌎 . Please checkout the PR and let me know if it works. |
Hi @m1n3rva That sounds great! Sorry for the noob question but how do I go about testing it? I tried running pip3 install --upgrade bimmer_connected but it doesn't seem to get this version, I presume because it hasn't been commited? Should I copy the py file manually to my system instead? Thanks |
@dws199
Or If you do not want to mess with your normal installation you can also create a virtual environment. And then install it there and also run your tests from there... |
Many thanks for your help with this. I have installed your new version as per your instructions but when I try and use it passing the lat and long I still get the same error "description" : "(SmartPhoneUtil-A-101) Mandatory parameter(s) missed or blank: dlat and dlon are required for BMW vehicles!". Also I did try passing an empty lat and long parameter (to make sure that I'm using the correct version of your code) and I do now see the prompt saying that these parameters are now optional. So maybe the new parameters aren't being passed to the api correctly? |
@dws199: The weird thing is: I can send whatever parameters I want and the server does not complain either way. So I can't really check if that does anything... I just uploaded the change to the same branch. Can you please try again? |
Hi @m1n3rva That seems to have done the trick! It's now pulled back all the details of the vehicle! Thanks! |
Cool 😎 ! Are you a HomeAssistant user? homeassistant:
latitude: xxx
longitude: yyy Or where should the position come from? FYI: I just merged the change and deleted the branch. So if you want to keep testing, you have to take the master branch from now on:
|
Yes that sounds like the best approach
…On Wed, 2 May 2018, 21:21 m1n3rva, ***@***.***> wrote:
Cool 😎 !
Are you a HomeAssistant user?
If so: How do you want to have this integrated with HomeAssistant? Should
we take the position from the configuration.yaml?
homeassistant:
latitude: xxx
longitude: yyy
Or where should the position come from?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AjZaLLwHohmNpAV1sdTGiTfmwdtx7ic0ks5tuhUxgaJpZM4TFJ92>
.
|
@gerard33 @ChristianKuehnel: I can create a new release of |
We can have a look at that 😀 In which scenario should we use the position from HA? Is that in case And while we are at it, we can also check for the unit_system in the config.yaml to determine if we should show the ranges in km or miles. See this request on the forum. |
My 2 cents: 1) Concerning the position: 2) Concerning imperial vs. metric units: 3) Concerning the lscType: bottom line @gerard33 |
@ChristianKuehnel, the change I have in the pipeline as adding (binary) sensors for electric/hybrid cars. It's already available in the custom component and thanks to your tip regarding the |
The PR for the new sensors is there. |
Hi Guys - I'm having exactly the same problem as dws199. I have the same 2014 Series 535d. I get the same fingerpring data ( exactly ). However, I can't gat any data back from the car. The iPhone app works perfectly. After setting up the component in hassio don't receive any sensor badges. I probably have a more basic mistake but I cant find it. After reading all the posts, I can't determine if there was a fix for the problems discribed by dws199. So, ant help on that AND my more basic problem would be greatly appreciated. Thanks |
@delstel If that's the case then the reason that HA is not showing the data from your car is described here. |
Forgive me, I’m not sure how to respond from GitHub.
Thanks for the info… I will follow this intently. This is something I’ve wanted to see for a long time...
… On May 6, 2018, at 5:11 PM, Gerard ***@***.***> wrote:
@delstel <https://github.com/delstel>
I guess you use the fingerprint command including the lat and lon option?
bimmerconnected status <user> <password> <region> <latitude> <longitude>
If that's the case then the reason that HA is not showing the data from your car is described here.
#62 (comment) <#62 (comment)>
We plan to make an update for that by implementing scenario 2 where the lat/lon from the HA settings is being send so you will at least receive data when your car is home.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#62 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/Ac78azInY-lqbYEREGuLoM3zR6Yb_Q6Yks5tv2cHgaJpZM4TFJ92>.
|
Thanks, That exchange broaden my communication skills on GitHub. |
Another question. If I use the command -- bimmerconnected status user password region latitude longitude I get --- bimmerconnected: error: unrecognized arguments: xx.0005 -xx.5769 When I used -- If I use -- bimmerconnected status user password region vin |
Have you downloaded the latest version? The lat lon option is recently added. |
Was that the master |
Can you share which data is available for you when adding the lat lon parameters? |
Hi @gerard33 , it seems to have stopped working for me now but I have a different error message as below. I tried upgraded first using pip3 install --upgrade bimmer_connected, is that correct ERROR:bimmer_connected.account:Unknown status code 500, expected 200 |
Try this upgrade. It worked for me pip install --upgrade https://github.com/m1n3rva/bimmer_connected/archive/master.zip |
@delstel Thanks for that but that is the version I was trying originally, I've just tried it again and I still get the same error EDIT: Possibly the service is down as I'm unable to use any of the features on the Android app at the moment |
I’m not getting the error, but I don’t get any location data or mileage. I do get the status of all activated services. I’ll attach that fingerprint in a few minutes. Is this what you “were” getting and did you receive location coordinates? |
Unfortunately I didn't check carefully enough when it did work. However I've noticed on the android app that the mileage and fuel range barely seem to update unless I connect the phone to the car via usb every time I drive which makes the feature pointless really. |
Here's the status report: https://github.com/m1n3rva/bimmer_connected/files/1980108/vehicles_0.txt The fingerprint is similar - but no location Has anyone else with our model, etc been able to get location data? |
One other note: I did spin up a new VM and install pip3 and the new version of bimmer_connected to get it to run. |
It's working for me now and I have a position in the status_0.txt file but it appears to be very wrong, currently it's showing that the car is in Sudan, I'm in the UK! Also I noticed that the mobile app is still saying that it can't retrieve the vehicle location despite the car being outside my house where it has worked before. However when logging on the connected drive website it picks up the location fine. |
@dws199 the fingerprint script does anonymize the coordinates to |
@gerard33 Ok thanks for confirming. How can I implement this change in my Hass? As I believe a change is still required to get the default location from the main config file? Also in the phone app I sometimes see fuel level/range and mileage of car but it seems to update very infrequently so is not really useful |
I'm Back to getting the same errors: I have been running this in a VM with pip3 installed - ran fine - then errors - reinstalled the master - same issues - I must have done something wrong but I don't know what...... I'll keep looking. DEBUG:bimmer_connected.account:Getting vehicle list |
Here's my messages: I'm using Master bimmerconnected status me@me.com XXXXX north_america 34.xxx -84.xxx bimmerconnected fingerprint me@me.com XXXXXXXX north_america 34.xxx -84.xxx |
This solves issues with some vehicles as discussed in bimmerconnected/bimmer_connected#62
@dws199 I just uploaded a first try at the integration with Home Assistant: home-assistant/core#14464 Please give that a try and let me know if it works.
|
@delstel What is the output of |
@m1n3rva some requests, based on the discussion above:
|
@ChristianKuehnel This sounds great, thanks! How would I download this version with PIP so that I can test? |
@dws199 to test a PR of Home Assistant you need to set up your machine according to this wiki page: |
@ChristianKuehnel Thanks for this info, unfortunately I don't have a spare machine to test this on although I presume I can setup a vm. Is there anyway I can just update the bimmer script on my machine? Or use it as a custom component? |
@dws199
|
no answer for a long time -> closing the ticket |
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. |
@ChristianKuehnel @gerard33
I've managed to run the fingerprint command now and am seeing the following error, I have also attached the only file that was created
vehicles_0.txt
DEBUG:bimmer_connected.account:Getting vehicle list
DEBUG:bimmer_connected.account:getting new oauth token
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): b2vapi.bmwgroup.com
DEBUG:urllib3.connectionpool:https://b2vapi.bmwgroup.com:443 "POST /webapi/oauth/token HTTP/1.1" 200 None
DEBUG:bimmer_connected.account:got new token frDNNgIsIbmPice5feQCvGA2Kme5Z55J with expiration date 2018-04-03 23:01:10.770055
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): b2vapi.bmwgroup.com
DEBUG:urllib3.connectionpool:https://b2vapi.bmwgroup.com:443 "GET /webapi/v1/user/vehicles HTTP/1.1" 200 None
DEBUG:bimmer_connected.state:requesting new data from connected drive
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): b2vapi.bmwgroup.com
DEBUG:urllib3.connectionpool:https://b2vapi.bmwgroup.com:443 "GET /webapi/v1/user/vehicles/WBA5C32050D629352/status HTTP/1.1" 400 None
ERROR:bimmer_connected.account:Unknown status code 400, expected 200
ERROR:bimmer_connected.account:{
"error" : {
"code" : 500,
"description" : "(SmartPhoneUtil-A-101) Mandatory parameter(s) missed or blank: dlat and dlon are required for BMW vehicles!"
}
}
Traceback (most recent call last):
File "/usr/bin/bimmerconnected", line 106, in
main()
File "/usr/bin/bimmerconnected", line 44, in main
args.func(args)
File "/usr/bin/bimmerconnected", line 73, in fingerprint
account.update_vehicle_states()
File "/usr/lib/python3.6/site-packages/bimmer_connected/account.py", line 205, in update_vehicle_states
car.update_state()
File "/usr/lib/python3.6/site-packages/bimmer_connected/vehicle.py", line 58, in update_state
self.state.update_data()
File "/usr/lib/python3.6/site-packages/bimmer_connected/state.py", line 92, in update_data
VEHICLE_STATUS_URL.format(server=self._account.server_url, vin=self._vehicle.vin), logfilename='status')
File "/usr/lib/python3.6/site-packages/bimmer_connected/account.py", line 128, in send_request
raise IOError(msg)
OSError: Unknown status code 400, expected 200
The text was updated successfully, but these errors were encountered: