Skip to content

Conversation

@rleidner
Copy link
Collaborator

Support new captcha required by BMW server login
Store token file in folder data/bmwbc instead of ramdisk to avoid too frequent captcha process after reboot.
related UI PR: openWB/openwb-ui-settings#589

@rleidner rleidner requested a review from benderl November 23, 2024 19:38
@benderl benderl requested review from LKuemmel and removed request for benderl November 24, 2024 10:15
@benderl benderl added this to the 2.1.6 milestone Nov 24, 2024
@benderl benderl modified the milestones: 2.1.6, 2.1.7 Dec 2, 2024
@rleidner rleidner requested a review from benderl December 2, 2024 11:45
@Meli73
Copy link
Contributor

Meli73 commented Dec 11, 2024

In OWB1 nightly It works fine with Captcha.
Is there already a way to test it here in OWB2? in Alpha, Beta or Release ?

@rleidner
Copy link
Collaborator Author

As I said, different PR: #2035
Not finally reviewed/merged by openwb team yet.
If you have ssh access to OWB2, you can download the 4 modified files and update in your system.
The PR for the UI is mentioned in the PR. Without that you can still use it, but edit the settings in json format.
The captcha part works similar as in OWB1, but after saving the settings you need to trigger the SOC update manually (circular arrow on main page).

@kevinwieland kevinwieland merged commit c0d72d6 into openWB:master Dec 12, 2024
1 check passed
@Meli73
Copy link
Contributor

Meli73 commented Dec 12, 2024

tried it ,
updated to 2.1.7-Alpha.1
2024-12-12 15:49:02 +0100 [1927094]

but got this:

2024-12-12 14:53:19,334 - {modules.vehicles.bmwbc.api:49} - {WARNING:fetch soc_ev6} - load_store: store file not found, full authentication required
2024-12-12 14:53:19,335 - {modules.vehicles.bmwbc.api:143} - {ERROR:fetch soc_ev6} - bmwbc.fetch_soc: requestData Error, vnum: 6 err=TypeError("init() got an unexpected keyword argument 'hcaptcha_token'"), type(err)=<class 'TypeError'>
2024-12-12 14:53:19,369 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev6} - BMW (Bimmer): FaultState FaultStateLevel.ERROR, FaultStr <class 'TypeError'> ("init() got an unexpected keyword argument 'hcaptcha_token'",), Traceback:
Traceback (most recent call last):
File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 66, in update
car_state = self._get_carstate_by_source(vehicle_update_data, source)
File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 110, in _get_carstate_by_source
return self.__component_updater(vehicle_update_data)
File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/soc.py", line 20, in updater
return api.fetch_soc(
File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/api.py", line 156, in fetch_soc
soc, range = loop.run_until_complete(_fetch_soc(user_id, password, vin, captcha_token, vnum))
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/api.py", line 101, in _fetch_soc
auth = MyBMWAuthentication(user_id,
TypeError: init() got an unexpected keyword argument 'hcaptcha_token'

@rleidner
Copy link
Collaborator Author

tried it , updated to 2.1.7-Alpha.1 2024-12-12 15:49:02 +0100 [1927094]

but got this:

2024-12-12 14:53:19,334 - {modules.vehicles.bmwbc.api:49} - {WARNING:fetch soc_ev6} - load_store: store file not found, full authentication required 2024-12-12 14:53:19,335 - {modules.vehicles.bmwbc.api:143} - {ERROR:fetch soc_ev6} - bmwbc.fetch_soc: requestData Error, vnum: 6 err=TypeError("init() got an unexpected keyword argument 'hcaptcha_token'"), type(err)=<class 'TypeError'> 2024-12-12 14:53:19,369 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev6} - BMW (Bimmer): FaultState FaultStateLevel.ERROR, FaultStr <class 'TypeError'> ("init() got an unexpected keyword argument 'hcaptcha_token'",), Traceback: Traceback (most recent call last): File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 66, in update car_state = self._get_carstate_by_source(vehicle_update_data, source) File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 110, in _get_carstate_by_source return self.__component_updater(vehicle_update_data) File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/soc.py", line 20, in updater return api.fetch_soc( File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/api.py", line 156, in fetch_soc soc, range = loop.run_until_complete(_fetch_soc(user_id, password, vin, captcha_token, vnum)) File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/api.py", line 101, in _fetch_soc auth = MyBMWAuthentication(user_id, TypeError: init() got an unexpected keyword argument 'hcaptcha_token'

The PR is now merged - please update to latest master.

@Meli73
Copy link
Contributor

Meli73 commented Dec 12, 2024

you mean :
updated to 2.1.7-Alpha.1 2024-12-12 15:49:02 +0100 [1927094]

I did already.. or is there somthing newer ?

@rleidner
Copy link
Collaborator Author

you mean : updated to 2.1.7-Alpha.1 2024-12-12 15:49:02 +0100 [1927094]

I did already.. or is there somthing newer ?

That version should be working; if you continue to have issues, you get support in the openwb forum.
I can't maintain support on 2 different platforms; therefore I will not respond here from now on.

fibroin pushed a commit to fibroin/openWB that referenced this pull request Dec 14, 2024
soc_bmwbc: add new captcha for initial login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants