ReneNulschDE / mbapi2020

Custom Component to integrate MercedesME devices into Home-Assistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

European Market - Pin Email Request Not Working

tibuski opened this issue · comments

FYI, same issue in BE

Tried with latest beta, email and mobile phone.

I can test/take logs if you need.

Regards,

Laurent

Hi,
thanks for reporting. I'm still unsure what is raising the issue. Some users reported that they received the Pin mails again after a few days without any change some others still have the problem. Other users (like me) have no problem at all. I have requests > 50 pins in the last 72h...

Could describe your environment?

  • Add your system information. Can be found in: Settings ⇒ System ⇒ Repairs ⇒ Three Dots in Upper Right ⇒ System information.
  • What is the version of your mbapi2020 component. Can be found in: the manifest.json of the custom_component

First of all, thank you very much for your work and your really quick reaction !
Second, here is the requested info :

manifest.json

{
  "domain": "mbapi2020",
  "name": "MercedesME 2020",
  "codeowners": [
    "@ReneNulschDE"
  ],
  "config_flow": true,
  "dependencies": [],
  "documentation": "https://github.com/ReneNulschDE/mbapi2020",
  "integration_type": "hub",
  "iot_class": "cloud_push",
  "issue_tracker": "https://github.com/ReneNulschDE/mbapi2020/issues",
  "loggers": [
    "custom_components.mbapi2020"
  ],
  "requirements": [
    "protobuf>=3.19.1"
  ],
  "version": "0.9.10"

System Information

version core-2024.1.5
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 4.14.167-0-vanilla
arch x86_64
timezone Europe/Brussels
config_dir /config
Home Assistant Cloud
logged_in true
subscription_expiration August 30, 2024 at 2:00 AM
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled true
remote_server eu-central-1-4.ui.nabu.casa
certificate_status ready
instance_id 33ebe278f29e4199980f603e71693ffa
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 1
resources 3
views 6
mode storage
Recorder
oldest_recorder_run January 18, 2024 at 12:36 PM
current_recorder_run January 28, 2024 at 11:48 AM
estimated_db_size 380.68 MiB
database_engine sqlite
database_version 3.41.2

Thanks. Do you use a HA standard container image or is this customized?

Standard with image from : ghcr.io/home-assistant/home-assistant:stable

I also have the same problem. Hope a solution is found.

ghcr.io/home-assistant/home-assistant:stable

I checked the image with my account and it works as expected...

Are you able to execute an command on the host maschine and in the docker environment? If yes, send me an email mbdev.i182@nulsch.de and I will share the command. (Please share the os-version of the host too in the mail.)

or...

  1. connect to your docker instance with "docker exec -it homeassistant bash"
  2. Copy the curl command from https://pastes.io/0uugksd1bd
  3. Replace XXXXXX with your mb-account-email
  4. run
  5. check the result
  6. leave the docker instance with "exit"

Result should be:

HTTP/1.1 200 OK
Content-Security-Policy: default-src https:
Content-Type: application/json
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=63072000
X-Authmode: CIAMNG
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
Date: Sun, 28 Jan 2024 19:12:51 GMT
Content-Length: 43
Connection: close

{"isEmail":true,"username":"XXXXXXX"}

and you should get a email

Hello,

It worked, received the PIN !

nuc:/config# curl -i -s -k -X $'POST' \
    -H $'Host: bff.emea-prod.mobilesdk.mercedes-benz.com' \
    -H $'User-Agent: MyCar/1.40.0 (com.daimler.ris.mercedesme.ece.ios; build:2097; iOS 17.3.0) Alamofire/5.4.0' \
    -H $'Ris-Os-Name: ios' \
    -H $'Ris-Os-Version: 17.3' \
    -H $'Ris-Sdk-Version: 2.111.1' \
    -H $'X-Locale: en-GB' \
    -H $'X-Trackingid: 4eaa3090-94a6-4688-ba4a-8bd6c270fe59' \
    -H $'X-Sessionid: 6d1521d2-9f17-415d-a442-95e859aeba5d' \
    -H $'Content-Type: application/json' \
    -H $'X-Applicationname: mycar-store-ece' \
    -H $'Ris-Application-Version: 1.40.0 (2097)' \
    -H $'Accept: */*' \
    -H $'Accept-Encoding: gzip, deflate, br' \
    -H $'Connection: close' \
    --data-binary $'{\"emailOrPhoneNumber\" : \"surname@xxxxxxxxxxx.be\", \"countryCode\" : \"EN\", \"nonce\" : \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"}' \
    $'https://bff.emea-prod.mobilesdk.mercedes-benz.com/v1/login'
HTTP/1.1 200 OK
Content-Security-Policy: default-src https:
Content-Type: application/json
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=63072000
X-Authmode: CIAMNG
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
Date: Sun, 28 Jan 2024 20:08:17 GMT
Content-Length: 49
Connection: close

{"isEmail":true,"username":"surnmae@xxxxxxxxxxx.be"}

And now the integration works too ... I didn't change anything.

Probably a Mercedes backend issue ...

Still working, once again, thank you for your work on this integration and the support you provided !

It's happening to me the same problem. Also, when I tried to run the curl command I got:
HTTP/1.1 400 Bad Request
Content-Security-Policy: default-src https:
Content-Type: application/json
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=63072000
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
Date: Mon, 29 Jan 2024 09:50:08 GMT
Content-Length: 0
Connection: close

@hcraveiro : Please share youre platform details with same information like tibuski did. How many cars do you have in your account?

Hi, yes, I have only one car. Here it goes:

Version core-2024.1.0
Installation Type Home Assistant OS
Development false
Supervisor true
Docker true
User root
Virtual Environment false
Python Version 3.11.6
Operating System Family Linux
Operating System Version 6.1.63-haos-raspi
CPU Architecture aarch64
Timezone Europe/Lisbon
Configuration Directory /config

Home Assistant Community Store

GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.34.0
Stage running
Available Repositories 1379
Downloaded Repositories 4

Home Assistant

Logged In false
Reach Certificate Server ok
Reach Authentication Server ok
Reach Home Assistant Cloud ok

Home Assistant Supervisor

Host Operating System Home Assistant OS 11.4
Update Channel stable
Supervisor Version supervisor-2023.12.1
Agent Version 1.6.0
Docker Version 24.0.7
Disk Total 14.0 GB
Disk Used 8.3 GB
Healthy true
Supported true
Board rpi3-64
Supervisor API ok
Version API ok
Installed Add-ons Samba share (12.2.0), Terminal & SSH (9.8.1), Whisper (1.0.2), Piper (1.4.0), Duck DNS (1.15.0)

Dashboards

Dashboards 2
Resources 0
Views 11
Mode storage

MercedesME 2020

error unknown

Can you please share the list of installed addins and the version information of the manifest file? See above...

And do you have any other device in your network where you can run a command under Linux or Windows or Mac?
Do you use the email address or mobilephone numer to request the pin?
Are there any special characters (other then numbers or letters) in your email?

Hallo,

hab das selbe Problem, dass ich keinen Pin bekomme :(

Hab nur ein Fahrzeug
Version (Manifest Datei) ist die Beta 0.9.10
Login ist via Mail ohne Sonderzeichen

System Information

version core-2024.1.5
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.21-v8
arch aarch64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.33.0
Stage running
Available Repositories 1381
Downloaded Repositories 7
Home Assistant Cloud
logged_in true
subscription_expiration 14. Januar 2025 um 01:00
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled true
remote_server eu-central-1-12.ui.nabu.casa
certificate_status ready
instance_id b9365bda93894af0a861e651f33cfbdc
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 10.3
update_channel stable
supervisor_version supervisor-2023.12.1
agent_version 1.5.1
docker_version 23.0.6
disk_total 28.5 GB
disk_used 12.0 GB
healthy true
supported true
board rpi4-64
supervisor_api ok
version_api ok
installed_addons File editor (5.6.0), Mosquitto broker (6.4.0), Terminal & SSH (9.7.1), ESPHome (2023.12.9), Home Assistant Google Drive Backup (0.112.1)
Dashboards
dashboards 5
resources 3
views 5
mode storage
Recorder
oldest_recorder_run 22. Januar 2024 um 18:23
current_recorder_run 29. Januar 2024 um 12:42
estimated_db_size 73.10 MiB
database_engine sqlite
database_version 3.41.2

Can you please share the list of installed addins and the version information of the manifest file? See above...

And do you have any other device in your network where you can run a command under Linux or Windows or Mac? Do you use the email address or mobilephone numer to request the pin? Are there any special characters (other then numbers or letters) in your email?

The addons are already on the list I provided. I don't have any special characters on the email (I use email). I have devices on my network where I can run commands (namely the homeassistant OS).

The manifest is this one:
{
"domain": "mbapi2020",
"name": "MercedesME 2020",
"codeowners": [
"@ReneNulschDE"
],
"config_flow": true,
"dependencies": [],
"documentation": "https://github.com/ReneNulschDE/mbapi2020",
"integration_type": "hub",
"iot_class": "cloud_push",
"issue_tracker": "https://github.com/ReneNulschDE/mbapi2020/issues",
"loggers": [
"custom_components.mbapi2020"
],
"requirements": [
"protobuf>=3.19.1"
],
"version": "0.9.9"
}

I have the same problem

I have the same problem

Please read the different comments in this issue, and deliver, test the different things. An please create a new issue with all the infos. This is not a general bug in this component - for some its working for others not...

@karJohBab : I have moved you comment to a new issue... I'm loosing the control :-)

@hcraveiro : Thanks! May I ask you to open a new issue for this and copy all the information into that one? This will help me to keep control.

@aleksej0307 : May I ask you to open a new issue for this and copy the same level of information what the others have provided into that new issue? This will help me to keep control.

@hcraveiro : Thanks! May I ask you to open a new issue for this and copy all the information into that one? This will help me to keep control.

Yes, for sure! Thank you!