bimmer_connected: F39/F30/G30/I01/F80 Fingerprints - 404 errors (5 vehicles)
Describe the issue New install, experiencing limited access with numerous “Unavailable” or “Unknown” messages on features on most vehicles. X2 seems to be the only vehicle fully supported.
Only interested in integrating I3s features to Home Assistant.
Home Assistant version Home Assistant 0.110.6, fresh install pip3 install --upgrade bimmer_connected
Screenshots
Connected Drive website
- I can still successfully login to the BMW Connected Drive website and the car status is available there.
- I have Connected Drive enabled for my vehicles.
Your config.yaml
bmw_connected_drive:
name_of_car:
username: USERNAME_BMW_CONNECTED_DRIVE
password: PASSWORD_BMW_CONNECTED_DRIVE
region: north_america
Number of cars 18 i3s (I01/ID5) 17 530 (G30/ID5) 18 X2 ( F39/ENTRYNAV2) 18 M3 (F80/ID5) 18 M3 (F80/ID5)
- I have 5 vehicles linked to the Connected Drive account.
Output of bimmer_connected fingerprint
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.us:443
DEBUG:urllib3.connectionpool:https://b2vapi.bmwgroup.us:443 "POST /gcdm/oauth/token HTTP/1.1" 200 None
DEBUG:bimmer_connected.account:got new token [TOKEN] with expiration date 2020-06-09 08:03:06.105282
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): b2vapi.bmwgroup.us:443
DEBUG:urllib3.connectionpool:https://b2vapi.bmwgroup.us: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.us:443
DEBUG:urllib3.connectionpool:https://b2vapi.bmwgroup.us:443 "GET /webapi/v1/user/vehicles/[VEHICLE VIN]/status?deviceTime=2020-06-09T07%3A03%3A08&dlat=0.0&dlon=0.0 HTTP/1.1" 200 None
DEBUG:bimmer_connected.state:received new data from connected drive
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.us:443
DEBUG:urllib3.connectionpool:https://b2vapi.bmwgroup.us:443 "GET /webapi/v1/user/vehicles/[VEHICLE VIN]/status?deviceTime=2020-06-09T07%3A03%3A09&dlat=0.0&dlon=0.0 HTTP/1.1" 404 None
DEBUG:bimmer_connected.account:The BMW Connected Drive portal returned an error: NOT_FOUND (received status code 404 and expected 200).
DEBUG:bimmer_connected.account:{"error":{"code":500,"description":"(SmartPhoneUtil-A-2012) Ressource not found. No status available for VIN [VEHICLE VIN]"}}
Traceback (most recent call last):
File "/usr/bin/bimmerconnected", line 10, in <module>
sys.exit(main())
File "/usr/lib/python3.8/site-packages/bimmer_connected/cli.py", line 223, in main
args.func(args)
File "/usr/lib/python3.8/site-packages/bimmer_connected/cli.py", line 116, in fingerprint
account.update_vehicle_states()
File "/usr/lib/python3.8/site-packages/bimmer_connected/account.py", line 251, in update_vehicle_states
car.update_state()
File "/usr/lib/python3.8/site-packages/bimmer_connected/vehicle.py", line 72, in update_state
self.state.update_data()
File "/usr/lib/python3.8/site-packages/bimmer_connected/state.py", line 128, in update_data
response = self._account.send_request(
File "/usr/lib/python3.8/site-packages/bimmer_connected/account.py", line 170, in send_request
raise IOError(msg)
OSError: The BMW Connected Drive portal returned an error: NOT_FOUND (received status code 404 and expected 200).
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 32 (18 by maintainers)
That looks good. The other cars are also showing data now (except the F30)?
Installed 20200617.2 and starting to get some activity on the i3:
Just went ahead and installed HACS and bmw_connected_drive beta version 20200511.2 if that’s any easier to troubleshoot. No change in status on i3.
I have tried to find the bimmerconnected library on my install (hassio) but can’t find it. I think (not checked) the path mentioned above is to the via pip installed version and not the one HA uses.
I think HA can indeed handle it if a vehicle doesn’t have a state (empty dict).
Easiest way to test the new code is with a custom component. It’s possible to make a folder in the component folder where you place the bimmerconnected library, but guess making the code changes for that in the custom component is more work than to push a beta version to Pypi. Maybe make the change to the 0.8.0b version so we have a test case for US at the same moment?
It’s also possible to make a link to a Github repo in the manifest.json, but that won’t save a lot of work I think.
@gerard33 could you help us out here?
As far as I can see nothing in the HA component should break if a single vehicle does not have a
state
(or rather an emptydict
asstate
).Is it possible to test this in HA without releasing a new version to PyPi?
Mhh, as I use HA Core on Docker I don’t know how that works exactly for you. I’ll try to check how the changes work with the HA component tomorrow to see if we can safely use it from HA (or using a custom component as a workaround).
Could you please revert the changes?
Looking at your first logs and the code thoroughly it has nothing to do with the list of vehicles itself (i.e.
vehicles_0.txt
) but the vehiclestate
itself. Therefore we need the same logic in a different place.Could you please try to change your
state.py
according to this: https://github.com/bimmerconnected/bimmer_connected/compare/master...rikroe:fix/exit_unsupported_vehicles and let me know if that works for you?That looks how I imagined. Not sure why it doesn’t work as expected…
The
try
/except
block is still there? Then I need to look through it fully but cannot give you an eta. But I am pretty sure I know where the issue comes from 👍Sorry for being clear: the changes were supposed to go to the current stable version, so the one you downgraded to.