Use the “Add Integration” in Home Assistant and select “Smart EQ Connect”.
Optional configuration values
See Options dialog in the Integration under Home-Assistant/Configuration/Integration.
Excluded Cars: comma-separated list of VINs.
Debug Save Messages: Enable this option to save all relevant received message into the messages folder of the component
Available components
Depends on your own car or purchased Mercedes Benz licenses.
Internal Name: soc
State of charge (SoC) is the level of charge of an electric battery relative to its capacity. The units of SoC are percentage points (0% = empty; 100% = full).
Services
None so far
Switches
None so far
Logging
Set the logging to debug with the following settings in case of problems.
there seems to be a problem with the login after installing. after entering the e-mail address I should receive an e-mail with a 6 digit pin but I do not receive it.
few days after I published this integration, Smart activated the CAPTCHA protection (Google Captcha v3 Enterprise) to the login screen. Looks like that do not like that Car Owners use the data of their own car.
I have no plans to work on this component further.
Hi,
There are multiple ways. But each of them needs some IT knowledge and the code of the integration needs some changes
Idea 1:
You can “steal” the refresh_token from the IOS/Android App.
Install a reverse proxy like Burp (community edition is enough)
Install the root certificate from Burp into IOS and trust the the certificate
Change the code of the config_flow.py and remove the Auth-Checks
3a. Add the integration without any login
3b. Stop HA
3c. Create a .smarteqconnect-token-cache file (see content below)
Add the Burp Proxy Address as manual proxy in your IOS
Look for the refresh token in the Burp Logs (is requested every two hours)
Add the refresh token in to your smarteqconnect-token-cache file.
What is expires_in : 7199 (what this number means?) seconds? 120 mins?
expires_at - timestamp format as I suppose - should be let say 1.1.2026 ???
A file .smarteqconnect-token-cache should be placed in HA config root or in custom_components/smarteqconnect directory? Should file include . (dot) in his name?
But I’m lost in “Change the code of the config_flow.py and remove the Auth-Checks”. I can modify these files but what to remove???
Restart HA.
Add the integration and put any value into username and pin.
This will add the integration without a valid auth. please ignore the errors and ignore the reauth task.
Then
stop HA
Copy the result of the request “grant_type=refresh_token” into your .smarteqconnect-token-cache file
Add the attribute , "expires_at": 1640871271 to it (this means the access token is not valid anymore and the integration will request a new access_token with the refresh token
Save the file into your HA-Config root folder
Start HA (The integration will request a new access token and it should work) - at least in my test this was successful
Because I found there is a new version of app - I do not know if this matters or not???
So I can finally show car battery also on my Apple Watch
Rene do you think that there is some possibility to star Pre-Conditioning? Can I help somehow with that? With some logs or access to my car? Your code showed to me how terrible programmer I am
I was able to add the integration without the hassle of using burp.
I added the EQ integration, when asked for the pin I went on the smart website to login. I chose to login with the PIN and the PIN I received worked for HA. I did this in the same browser.
For sure, I was also thinking the same browser would have little impact as the request would come from the HA host and the other from my browser… So their security is not so strong. Lucky us