Login fails
Closed this issue · 15 comments
I am unable to log in to the iSmart application account. The credentials are triple-checked, no issues there. I get the following error messages:
Failed to authenticate or fetch vehicle data: return code: 1000036, message: The account is not registered.
I tried with both email and phone number, as well as a different location. But there doesn't seem to be a difference.
Here you are the complete log entry:
This error originated from a custom integration.
Logger: custom_components.mg_saic
Source: custom_components/mg_saic/config_flow.py:76
integration: MG SAIC Integration (documentation, issues)
First occurred: 1:22:14 AM (4 occurrences)
Last logged: 1:59:15 AM
Failed to authenticate or fetch vehicle data: return code: 1000036, message: The account is not registered.
Hi,
Can it be that you hace special characters on your password?
The API, for some reason, only accepts alphanumeric passwords.
Although, looking at the log, seems like the response is that the account is not registered. Are you using the right server? Did the integration work before or is this a new deployment? It might be an issue with MG, but I would need more info on that.
Thanks for looking at the issue. I read the previous issue reports and I made sure that I use only alphanumeric characters. A combination of small and capital letters and numbers.
I tested with all the three servers: Asia, China, EU. Same response with all of them. Could it be that there is a new location to use? FYI I'm located in Australia.
For reference, let me paste here another error log. This is fired at the same time as the one reported earlier.
This error originated from a custom integration.
Logger: saic_ismart_client_ng.api.base
Source: custom_components/mg_saic/config_flow.py:153
integration: MG SAIC Integration (documentation, issues)
First occurred: 1:22:14 AM (7 occurrences)
Last logged: 7:30:49 AM
API call return code is not acceptable: 1000036: {"code":1000036,"message":"The account is not registered."}. Headers: Headers({'date': 'Wed, 13 Nov 2024 15:23:01 GMT', 'content-type': 'application/x-www-form-urlencoded', 'connection': 'keep-alive', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'pragma': 'no-cache', 'expires': '0', 'x-frame-options': 'DENY', 'app-content-encrypted': '1', 'original-content-type': 'application/x-www-form-urlencoded', 'app-send-date': '1731511381401', 'app-verification-string': '15d7642a8264b22921eb86e565ff3cd1317f045db278f98410f8b9d86cf1ab05', 'content-length': '59'})
API call return code is not acceptable: 1000036: {"code":1000036,"message":"The account is not registered."}. Headers: Headers({'date': 'Wed, 13 Nov 2024 15:59:15 GMT', 'content-type': 'application/x-www-form-urlencoded', 'connection': 'keep-alive', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'pragma': 'no-cache', 'expires': '0', 'x-frame-options': 'DENY', 'app-content-encrypted': '1', 'original-content-type': 'application/x-www-form-urlencoded', 'app-send-date': '1731513555621', 'app-verification-string': 'e37da7c7eb7a7a739df3cc6a615facd572baea2497df9e0fa0830ac9ddcf4a7c', 'content-length': '59'})
API call return code is not acceptable: 1000036: {"code":1000036,"message":"The account is not registered."}. Headers: Headers({'date': 'Wed, 13 Nov 2024 21:29:36 GMT', 'content-type': 'application/x-www-form-urlencoded', 'connection': 'keep-alive', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'pragma': 'no-cache', 'expires': '0', 'x-frame-options': 'DENY', 'app-content-encrypted': '1', 'original-content-type': 'application/x-www-form-urlencoded', 'app-send-date': '1731533376919', 'app-verification-string': '0e0d49a1f7bd60bfeab7a67c9a355e08492d07134f1c13835146b1e7554e67e9', 'content-length': '59'})
API call return code is not acceptable: 1000036: {"code":1000036,"message":"The account is not registered."}. Headers: Headers({'date': 'Wed, 13 Nov 2024 21:30:30 GMT', 'content-type': 'application/x-www-form-urlencoded', 'connection': 'keep-alive', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'pragma': 'no-cache', 'expires': '0', 'x-frame-options': 'DENY', 'app-content-encrypted': '1', 'original-content-type': 'application/x-www-form-urlencoded', 'app-send-date': '1731533430649', 'app-verification-string': '3575156b469c5ceccf173bf796e48136f18e391d799aebcb9963787afa372f7e', 'content-length': '59'})
API call return code is not acceptable: 1000036: {"code":1000036,"message":"The account is not registered."}. Headers: Headers({'date': 'Wed, 13 Nov 2024 21:30:48 GMT', 'content-type': 'application/x-www-form-urlencoded', 'connection': 'keep-alive', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'pragma': 'no-cache', 'expires': '0', 'x-frame-options': 'DENY', 'app-content-encrypted': '1', 'original-content-type': 'application/x-www-form-urlencoded', 'app-send-date': '1731533448938', 'app-verification-string': 'c385e2f8210c3acd23cb2a332729b278273306413260c435d2509f429bdd62f8', 'content-length': '59'})
Thanks for the feedback.
That's quite weird. I tried to login and it worked without any issue on my end.
At the end you get the "account is not registered" message from the API the whole time.
Are you able to get the full debug logs? You need to activate the debug logs on configuration.yaml. Check here #3 (comment)
I will try to have a look later and see if I can find something else that might be causing the issue.
Cheers
Thanks for investigating it with me!
Here is the warning log item after enabling debug logging:
Logger: homeassistant.util.loop
Source: util/loop.py:136
First occurred: 5:45:44 PM (1 occurrences)
Last logged: 5:45:44 PM
Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0xffff5aa94f50>,) inside the event loop by custom integration 'mg_saic' at custom_components/mg_saic/config_flow.py, line 150: saic_api = SaicApi(config) (offender: /usr/local/lib/python3.12/site-packages/httpx/_config.py, line 149: context.load_verify_locations(cafile=cafile)), please create a bug report at https://github.com/ad-ha/mg-saic-ha/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 556, in start task = asyncio.Task(coro, loop=loop, eager_start=True) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle return await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 370, in async_configure result = await self._async_configure(flow_id, user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 417, in _async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 520, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) File "/config/custom_components/mg_saic/config_flow.py", line 72, in async_step_login_data await self.fetch_vehicle_data(username_is_email) File "/config/custom_components/mg_saic/config_flow.py", line 150, in fetch_vehicle_data saic_api = SaicApi(config)
Thanks.
Could you please post the whole debug log for the mg_saic integration? You should be getting something similar to this while trying to get the integration added:
DEBUG (MainThread) [custom_components.mg_saic] Logging in with username: email@me.com, country_code: None, is_email: True, region: EU
If you login with the phone it shall be something like:
DEBUG (MainThread) [custom_components.mg_saic] Logging in with username: 123456789, country_code: 34, is_email: False, region: EU
Where 123456789 is your phone number without the country code.
If you are able to login, which is not happening right now, you will get to the vehicle list. Once you select the vehicle and define the vehicle type you should be able to get this:
INFO (MainThread) [custom_components.mg_saic] Fetched vehicle data successfully.
DEBUG (MainThread) [custom_components.mg_saic] Logging in with region-based endpoint for region: EU
DEBUG (MainThread) [custom_components.mg_saic] Login successful, initializing vehicle APIs
Attach also any further messages related to the integration, please.
I looked up on the loop error you just shared above and already got a fix for it.
Anyhow, that is not what's might be blocking you from adding the integration, as you get a response from the server and end up on the "The account is not registered." It is just a matter of your account (or login details) and not the integration itself.
I am trying to log in using email. Based on the logs, it looks like that it fails at the region resolution. You can see below that the region is set to Asia, however in the connection paramters the hostname is set to 'gateway-mg-eu.soimt.com'. Which is clearly not in Asia. I'm not sure what difference the hostname makes - if any.
Here you are the relevant trace from the logs after setting the log level to debug:
2024-11-14 22:56:38.754 DEBUG (MainThread) [custom_components.mg_saic] Logging in with username: email@email.com, country_code: None, is_email: True, region: Asia
2024-11-14 22:56:38.786 DEBUG (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0xffff83633ad0>,) inside the event loop by custom integration 'mg_saic' at custom_components/mg_saic/config_flow.py, line 150: saic_api = SaicApi(config) (offender: /usr/local/lib/python3.12/site-packages/httpx/_config.py, line 149: context.load_verify_locations(cafile=cafile)), please create a bug report at https://github.com/ad-ha/mg-saic-ha/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations
2024-11-14 22:56:38.796 DEBUG (MainThread) [saic_ismart_client_ng.net.crypto] headerInterceptor apiName--->>> /oauth/token
encryptURI --->>> /oauth/token
origin_key_part_one --->>> /oauth/token459771app
encrypt_key_part_one --->>> c66c8df28cc708a69543403b47a5106c
origin_key_part_two --->>> 17315889987961application/x-www-form-urlencoded
完整的加密Key encrypt_key --->>> f49efd9a776e21ed8f820c34feb14f28
加密IV encrypt_iv --->>> 635654c0a9c926ea34e779823b274c6e
原始params paramsStr --->>> grant_type=password&username=email%email.com&password=redacted&scope=all&deviceId=cqSHOMG1SmK4k-fzAeK6hr%3AAPA91bGtGihOG5SEQ9hPx3Dtr9o9mQguNiKZrQzboa-1C_UBlRZYdFcMmdfLvh9Q_xA8A0dGFIjkMhZbdIXOYnKfHCeWafAfLXOrxBS3N18T4Slr-x9qpV6FHLMhE9s7I6s89k9lU7DD%23%23%23europecar&deviceType=1&loginType=2&countryCode=
加密params encrypt_req --->>> cf567aa3e839e0f3390dfdc93c91e41377af2a8da0209a8dd352cc1a87047581d83cebd5e409f061473b8f589e1008b3dfd9b78627f8d4b0ebf73008c73f6cb37d051c7f10b987a157690dbc7c16a2119fa5568f561de37b180138aba0b665b04409d955e03fb1face88d23d4bd1531a2435638979e5f4464535cf29b832a45e7937d033119ec9df48eac64f67c35a838c2de1f60b793fc12488af546a3588497d0f837f1fccc14b5770fa55c41225e94993717ea9fbdba6bd3f137091202449a089673a20f538b33a8cca0c1a2fd373f1d063bb10a0801455e39a7add9118a672ce25971bbaeb7bb7c3844be91c425ed263a18181ed8419387aa268344bade82788ec203dc237e78e734f9f882c81d0ef2e7ee51c018fca07e5717d92f88a33d8001951687175bf9c214b4b252a4cd3325a42ca4e812789baee891c965dee461d93b3ead8d6390933227bd7872a76aba0dee25448c22dff38b8132a50d951db
hmac_sha256_value --->>> /oauth/token459771app17315889987961application/x-www-form-urlencodedcf567aa3e839e0f3390dfdc93c91e41377af2a8da0209a8dd352cc1a87047581d83cebd5e409f061473b8f589e1008b3dfd9b78627f8d4b0ebf73008c73f6cb37d051c7f10b987a157690dbc7c16a2119fa5568f561de37b180138aba0b665b04409d955e03fb1face88d23d4bd1531a2435638979e5f4464535cf29b832a45e7937d033119ec9df48eac64f67c35a838c2de1f60b793fc12488af546a3588497d0f837f1fccc14b5770fa55c41225e94993717ea9fbdba6bd3f137091202449a089673a20f538b33a8cca0c1a2fd373f1d063bb10a0801455e39a7add9118a672ce25971bbaeb7bb7c3844be91c425ed263a18181ed8419387aa268344bade82788ec203dc237e78e734f9f882c81d0ef2e7ee51c018fca07e5717d92f88a33d8001951687175bf9c214b4b252a4cd3325a42ca4e812789baee891c965dee461d93b3ead8d6390933227bd7872a76aba0dee25448c22dff38b8132a50d951db
origin hmacKey --->>> f49efd9a776e21ed8f820c34feb14f281731588998796
hmacSha256Key --->>> 7d9d377e46805833338d62e69785818f
APP-VERIFICATION-STRING --->>> 469ca8826f7f4f66cc19029af95aa506d74881482b8569570f237b542e2d0d75
2024-11-14 22:56:38.797 DEBUG (MainThread) [httpcore.connection] connect_tcp.started host='gateway-mg-eu.soimt.com' port=443 local_address=None timeout=5.0 socket_options=None
2024-11-14 22:56:39.094 DEBUG (MainThread) [httpcore.connection] connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0xffff836cc290>
2024-11-14 22:56:39.095 DEBUG (MainThread) [httpcore.connection] start_tls.started ssl_context=<ssl.SSLContext object at 0xffff83633ad0> server_hostname='gateway-mg-eu.soimt.com' timeout=5.0
2024-11-14 22:56:39.655 DEBUG (MainThread) [httpcore.connection] start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0xffff836cc3e0>
2024-11-14 22:56:39.656 DEBUG (MainThread) [httpcore.http11] send_request_headers.started request=<Request [b'POST']>
2024-11-14 22:56:39.658 DEBUG (MainThread) [httpcore.http11] send_request_headers.complete
2024-11-14 22:56:39.658 DEBUG (MainThread) [httpcore.http11] send_request_body.started request=<Request [b'POST']>
2024-11-14 22:56:39.659 DEBUG (MainThread) [httpcore.http11] send_request_body.complete
2024-11-14 22:56:39.659 DEBUG (MainThread) [httpcore.http11] receive_response_headers.started request=<Request [b'POST']>
2024-11-14 22:56:39.958 DEBUG (MainThread) [httpcore.http11] receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Thu, 14 Nov 2024 12:56:39 GMT'), (b'Content-Type', b'application/x-www-form-urlencoded'), (b'Content-Length', b'128'), (b'Connection', b'keep-alive'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'Cache-Control', b'no-cache, no-store, max-age=0, must-revalidate'), (b'Pragma', b'no-cache'), (b'Expires', b'0'), (b'X-Frame-Options', b'DENY'), (b'APP-CONTENT-ENCRYPTED', b'1'), (b'ORIGINAL-CONTENT-TYPE', b'application/x-www-form-urlencoded'), (b'APP-SEND-DATE', b'1731588999829'), (b'APP-VERIFICATION-STRING', b'63ef64eef11254fa98298af6933f3a9118b41622a7c26d7ed04f9e0f77323a7a')])
2024-11-14 22:56:39.960 DEBUG (MainThread) [httpcore.http11] receive_response_body.started request=<Request [b'POST']>
2024-11-14 22:56:39.961 DEBUG (MainThread) [httpcore.http11] receive_response_body.complete
2024-11-14 22:56:39.961 DEBUG (MainThread) [httpcore.http11] response_closed.started
2024-11-14 22:56:39.961 DEBUG (MainThread) [httpcore.http11] response_closed.complete
2024-11-14 22:56:39.963 DEBUG (MainThread) [saic_ismart_client_ng.api.base] Response code: 1000036 {"code":1000036,"message":"The account is not registered."}
2024-11-14 22:56:39.963 ERROR (MainThread) [saic_ismart_client_ng.api.base] API call return code is not acceptable: 1000036: {"code":1000036,"message":"The account is not registered."}. Headers: Headers({'date': 'Thu, 14 Nov 2024 12:56:39 GMT', 'content-type': 'application/x-www-form-urlencoded', 'connection': 'keep-alive', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'pragma': 'no-cache', 'expires': '0', 'x-frame-options': 'DENY', 'app-content-encrypted': '1', 'original-content-type': 'application/x-www-form-urlencoded', 'app-send-date': '1731588999829', 'app-verification-string': '63ef64eef11254fa98298af6933f3a9118b41622a7c26d7ed04f9e0f77323a7a', 'content-length': '59'})
2024-11-14 22:56:39.964 ERROR (MainThread) [custom_components.mg_saic] Error fetching vehicle data: return code: 1000036, message: The account is not registered.
2024-11-14 22:56:39.964 ERROR (MainThread) [custom_components.mg_saic] Failed to authenticate or fetch vehicle data: return code: 1000036, message: The account is not registered.
I tried to reverse engineer the code to find where the BASE_URLS resolution to the wrong region occurs. But I couldn't find it yet.
Sorry @vidotom you're fully right.
I was checking the API code and seems like they are always forwarding to the European endpoint. I just figured that there's one for Australia and New Zealand, which can be accessed.
Let me see if I find a workaround for it. I may take sometime to get it sorted, as it seems that I may need to change a lot of mechanics, but let me try and I will get back to you
Cheers
Thanks. I am looking forward to the fixed version. Good luck!
Hi @vidotom
I think I found a quick fix for the issue. I've tested my account on Australia and I got the same message that you were getting, (as I'm in Europe) so this make it. When selecting Europe for me it get's me to the right server, and now with Australia it also points to the correct API endpoint.
Can you please try 0.4.7-beta1 and see if this solves the issue? https://github.com/ad-ha/mg-saic-ha/releases/tag/0.4.7-beta1
Here are the instructions to install a beta version: #16 (comment)
Hi @ad-ha,
Thank you for figuring this out and fixing the bug so quickly! It works fine now. I was able to connect to the server and fetch the vehicle data. Some data seems to be way off, but I will look into it later and in a different thread if need be.
Thanks again!
Glad it did work out.
I will keep this for the final version 0.4.7
In the meanwhile, let me know the issues with the sensors that you may have. I hope that the response from both servers is the same and you should be getting reliable data (as with the EU server that I'm using), but with MG you never know. Any issue, just pop up and let me know, along with the logs, so I may look into.
Cheers
The incorrect sensor readings are as follows:
- Charging Current
It says 19.9 Amp, but it is only on an 8 Amps trickle charger. And measured with an multimeter, it is pulling approximately 8 Amps indeed. Which is in line with the power reading from the utility meter and another independent power meter IoT device. - Charging Power
In line with the current, it is proportionally off. The charging power on the car's dashboard is only 1.3-1.4 kW, which is aligned with the 8A trickle charger. - Charging switch is off, while the car is charging and the "Charging Status" sensor's reading is Charging (AC) as expected. What is this switch for? I would have thought it is to start or stop the charging session. But in this case the switch's state does not correspond to the charging status.
- Added Electric Range is always 0.0 km - despite of charging the vehicle for a long while
- Charging Duration is 92:11:00, which I have no idea what it corresponds to. It makes no sense.
- Charging Voltage 202.855 V, which doesn't seem to be aligned with any voltage really.
And what I am missing the most, is the action for setting the charging current. I am not sure why it is not available. It can be set on the car's dashboard (6A, 8A, 16A, no limit). And in the previous version of the MG iSmart app it was possible too. However, in the latest version of the app (2.0 released just a week ago) this functionality seems to be gone.
So let me try to get this as clarified as I can.
We could expect MG to return sensible values for all those kind of sensors, but the truth is that it doesn't. A lot of sensors need to be converted in order to show readable values. As an example, tyre pressure needs to be multiplied by 0.04 to get bar pressure.
There«s also data on the server reply for some vehicles that are incorrect. In my case, for a BEV, the MG data does not have the boolean active for ELECTRIC (seen a similar response on other models as well). I have sunroof, but MG seems to disagree and says on the data that they have that my vehicle did not come with sunroof. And so on... there are some more examples.
There's also the case where the API sends generic data, which is being now discarded, but as an example, sometimes it sends: SOC = 102.3%, Mileage = 0, Exterior Temperature = -128 Celsius. So the data is not fully reliable as one would expect. I've implemented mechanisms to discard these generic responses as far as I found them.
The same happens with some of the charging sensors. In order to translate the values into something that was usable, I needed to factorize all values in order to get the Current and Voltage working. The Charging Power is an equation between Current and Voltage,
With EU 220v, in my case at least, the values match the charger and vehicle data.
Would you be able to show your sensor readings for Voltage, Current and Power Charging? Also, can you share the debug logs for Vehicle Status and Vehicle Charging Data, so I may try to understand the differences?
Now on the remaining points.
3. Let me have a look. For sure I can solve this easily and show the switch as ON when the vehicle is charging.
4. That's a value being sent by the API. MG does not send that value for all vehicles.
5. The same as above. It's a translation of the time sent by the API for the charging duration. Sometimes the API sends abnormal data.
6. Might be some issue with the formulas, but if you have the logs, we may find the root cause for it.
At last. There are still some services/actions missing on the integration. I started this a few weeks ago and did not implemented everything, basically I've prioritized what I could try and used and am adding more features as I can. Setting charging current is something that I do not see as available on the API.
Thanks for the feedback and your help.