Thanks for letting me know, looking forward to that as an option, but loving this already!
Hi
Fabulous integration, i am struggeling with getting it into Hacks, it does not appear when i search for it and it has been a while since i last put something into Hacs and it seems they changed the layout. Will have to investigate how to get it in there further.
So, my question would be…Did someone make some awesome card for this, with an MG (ZS EV here so possibly that) to present the data in a nice and sleak way.
Hi, I have been using this integration for a few weeks now on a secondary SAIC account and it works well. I have even used it to semi automate Octopus power up sessions successfully. However, I have had a couple of occasions where all the entities become unavailable. Sometimes reloading worked but sometimes I had to delete and reinstall the integration from scratch. This happened again yesterday but I have been unable to get it working again. I deleted the integration and deleted the download from HACS, updated HA, then redownloaded from HACS and installed the integration again. The install went fine and the initial setup seemed to go fine but the entities continued to show as unavailable and it came up as “failed to set up”.
Not sure if I have done something daft or what is going wrong.
I am copying part of the log here if it helps. Any ideas how I can get it working again greatly appreciated.
UPDATE: I have just tried deleting the secondary account in the iSmart app and creating a new one. The reinstalled the integration and ‘bingo’ all appears to be working again. Will see how long it keeps up for but would appear to be an issue with the secondary accounts?
Anyone else using a secondary account and having/not having similar issues?
[custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 2/5)e[0m
e[31m2025-01-11 06:04:32.483 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1399868244e[0m
e[31m2025-01-11 06:04:32.483 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1399868244e[0m
e[33m2025-01-11 06:04:32.483 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 06:04:32.483 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 3/5)e[0m
e[31m2025-01-11 06:05:18.152 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1102628033e[0m
e[31m2025-01-11 06:05:18.152 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1102628033e[0m
e[33m2025-01-11 06:05:18.152 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 06:05:18.152 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 4/5)e[0m
e[31m2025-01-11 06:06:03.791 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1794564456e[0m
e[31m2025-01-11 06:06:03.791 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1794564456e[0m
e[33m2025-01-11 06:06:03.791 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 06:06:03.792 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 5/5)e[0m
e[31m2025-01-11 06:06:18.793 ERROR (MainThread) [custom_components.mg_saic] Failed to fetch charging info after 5 retries.e[0m
e[31m2025-01-11 07:06:49.879 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1894778829e[0m
e[31m2025-01-11 07:06:49.879 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1894778829e[0m
e[33m2025-01-11 07:06:49.879 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 07:06:49.879 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 1/5)e[0m
e[31m2025-01-11 07:07:35.586 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1129729218e[0m
e[31m2025-01-11 07:07:35.587 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1129729218e[0m
e[33m2025-01-11 07:07:35.587 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 07:07:35.587 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 2/5)e[0m
e[31m2025-01-11 07:08:21.347 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1714765254e[0m
e[31m2025-01-11 07:08:21.348 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1714765254e[0m
e[33m2025-01-11 07:08:21.348 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 07:08:21.348 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 3/5)e[0m
e[31m2025-01-11 07:09:07.063 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 2013618988e[0m
e[31m2025-01-11 07:09:07.063 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 2013618988e[0m
e[33m2025-01-11 07:09:07.063 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 07:09:07.063 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 4/5)e[0m
e[31m2025-01-11 07:09:52.773 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1571939913e[0m
e[31m2025-01-11 07:09:52.773 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1571939913e[0m
e[33m2025-01-11 07:09:52.773 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 07:09:52.773 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 5/5)e[0m
e[31m2025-01-11 07:10:07.776 ERROR (MainThread) [custom_components.mg_saic] Failed to fetch vehicle status after 5 retries.e[0m
e[31m2025-01-11 07:10:38.483 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1250730546e[0m
e[31m2025-01-11 07:10:38.483 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1250730546e[0m
e[33m2025-01-11 07:10:38.483 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 07:10:38.483 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 1/5)e[0m
e[31m2025-01-11 07:11:24.197 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1516654047e[0m
e[31m2025-01-11 07:11:24.197 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1516654047e[0m
e[33m2025-01-11 07:11:24.197 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 07:11:24.197 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 2/5)e[0m
e[31m2025-01-11 07:12:09.911 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1832495476e[0m
e[31m2025-01-11 07:12:09.912 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1832495476e[0m
e[33m2025-01-11 07:12:09.912 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 07:12:09.912 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 3/5)e[0m
e[31m2025-01-11 07:12:55.590 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1684763835e[0m
e[31m2025-01-11 07:12:55.590 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1684763835e[0m
e[33m2025-01-11 07:12:55.590 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 07:12:55.591 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 4/5)e[0m
e[31m2025-01-11 07:13:41.276 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1705190115e[0m
e[31m2025-01-11 07:13:41.276 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1705190115e[0m
e[33m2025-01-11 07:13:41.276 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 07:13:41.276 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 5/5)e[0m
e[31m2025-01-11 07:13:56.278 ERROR (MainThread) [custom_components.mg_saic] Failed to fetch charging info after 5 retries.e[0m
e[31m2025-01-11 07:58:27.975 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1887385845e[0m
e[31m2025-01-11 07:58:27.975 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1887385845e[0m
e[33m2025-01-11 07:58:27.975 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 07:58:27.975 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 1/5)e[0m
e[31m2025-01-11 07:59:13.669 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 2041247056e[0m
e[31m2025-01-11 07:59:13.669 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 2041247056e[0m
e[33m2025-01-11 07:59:13.669 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 07:59:13.669 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 2/5)e[0m
e[31m2025-01-11 07:59:54.553 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry MG SAIC - LSJWH4093PN326671 for mg_saic
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mg_saic/__init__.py", line 42, in async_setup_entry
await coordinator.async_setup()
File "/config/custom_components/mg_saic/coordinator.py", line 358, in async_setup
await self.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 306, in async_config_entry_first_refresh
await self._async_refresh(
log_failures=False, raise_on_auth_failed=True, raise_on_entry_error=True
)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mg_saic/coordinator.py", line 383, in _async_update_data
data["status"] = await self._fetch_with_retries(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
)
^
File "/config/custom_components/mg_saic/coordinator.py", line 676, in _fetch_with_retries
data = await fetch_func()
^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mg_saic/api.py", line 125, in get_vehicle_status
vehicle_status = await self._make_api_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
self.saic_api.get_vehicle_status, self.vin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/config/custom_components/mg_saic/api.py", line 44, in _make_api_call
return await api_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/saic_ismart_client_ng/api/vehicle/__init__.py", line 15, in get_vehicle_status
return await self.execute_api_call_with_event_id(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/saic_ismart_client_ng/api/base.py", line 136, in execute_api_call_with_event_id
return await execute_api_call_with_event_id_inner(event_id='0')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/tenacity/asyncio/__init__.py", line 189, in async_wrapped
return await copy(fn, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/tenacity/asyncio/__init__.py", line 121, in __call__
await self.sleep(do) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/tasks.py", line 718, in sleep
return await future
^^^^^^^^^^^^
asyncio.exceptions.CancelledErrore[0m
e[33m2025-01-11 10:40:10.706 WARNING (Recorder) [homeassistant.components.sensor.recorder] Entity sensor.growatt_sph_battery_energy_out from integration mqtt has state class total_increasing, but its state is not strictly increasing. Triggered by state 56.66 (56.67) with last_updated set to 2025-01-11T10:38:47.113825+00:00. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22e[0m
e[31m2025-01-11 11:47:07.807 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1712981209e[0m
e[31m2025-01-11 11:47:07.807 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1712981209e[0m
e[33m2025-01-11 11:47:07.807 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 11:47:07.807 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 1/5)e[0m
e[31m2025-01-11 11:47:53.711 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1821769004e[0m
e[31m2025-01-11 11:47:53.711 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1821769004e[0m
e[33m2025-01-11 11:47:53.711 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 11:47:53.712 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 2/5)e[0m
e[31m2025-01-11 11:48:39.710 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1526530235e[0m
e[31m2025-01-11 11:48:39.711 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1526530235e[0m
e[33m2025-01-11 11:48:39.711 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 11:48:39.711 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 3/5)e[0m
e[31m2025-01-11 11:49:25.733 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 2128409717e[0m
e[31m2025-01-11 11:49:25.733 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 2128409717e[0m
e[33m2025-01-11 11:49:25.733 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 11:49:25.733 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 4/5)e[0m
e[31m2025-01-11 11:50:11.630 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 272903259e[0m
e[31m2025-01-11 11:50:11.631 ERROR (MainThread) [custom_components.mg_saic] Error retrieving vehicle status: return code: 4, message: The remote control instruction failed, please try again later., event_id: 272903259e[0m
e[33m2025-01-11 11:50:11.631 WARNING (MainThread) [custom_components.mg_saic] Vehicle status returned None.e[0m
e[33m2025-01-11 11:50:11.631 WARNING (MainThread) [custom_components.mg_saic] Error fetching vehicle status: Vehicle status is None.. Retrying in 15 seconds... (Attempt 5/5)e[0m
e[31m2025-01-11 11:50:26.632 ERROR (MainThread) [custom_components.mg_saic] Failed to fetch vehicle status after 5 retries.e[0m
e[31m2025-01-11 11:50:57.506 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1241345349e[0m
e[31m2025-01-11 11:50:57.506 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1241345349e[0m
e[33m2025-01-11 11:50:57.506 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 11:50:57.506 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 1/5)e[0m
e[31m2025-01-11 11:51:43.332 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 881022487e[0m
e[31m2025-01-11 11:51:43.332 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 881022487e[0m
e[33m2025-01-11 11:51:43.332 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 11:51:43.332 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 2/5)e[0m
e[31m2025-01-11 11:52:29.256 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1240500491e[0m
e[31m2025-01-11 11:52:29.256 ERROR (MainThread) [custom_components.mg_saic] Error retrieving charging information: return code: 4, message: The remote control instruction failed, please try again later., event_id: 1240500491e[0m
e[33m2025-01-11 11:52:29.256 WARNING (MainThread) [custom_components.mg_saic] Charging info returned None.e[0m
e[33m2025-01-11 11:52:29.256 WARNING (MainThread) [custom_components.mg_saic] Error fetching charging info: Charging info is None.. Retrying in 15 seconds... (Attempt 3/5)e[0m
e[31m2025-01-11 11:52:46.999 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry MG SAIC - LSJWH4093PN326671 for mg_saic
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mg_saic/__init__.py", line 42, in async_setup_entry
await coordinator.async_setup()
File "/config/custom_components/mg_saic/coordinator.py", line 358, in async_setup
await self.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 306, in async_config_entry_first_refresh
await self._async_refresh(
log_failures=False, raise_on_auth_failed=True, raise_on_entry_error=True
)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mg_saic/coordinator.py", line 391, in _async_update_data
data["charging"] = await self._fetch_with_retries(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
)
^
File "/config/custom_components/mg_saic/coordinator.py", line 676, in _fetch_with_retries
data = await fetch_func()
^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mg_saic/api.py", line 103, in get_charging_info
charging_status = await self._make_api_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
self.saic_api.get_vehicle_charging_management_data, self.vin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/config/custom_components/mg_saic/api.py", line 44, in _make_api_call
return await api_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/saic_ismart_client_ng/api/vehicle_charging/__init__.py", line 24, in get_vehicle_charging_management_data
return await self.execute_api_call_with_event_id(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<6 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/saic_ismart_client_ng/api/base.py", line 136, in execute_api_call_with_event_id
return await execute_api_call_with_event_id_inner(event_id='0')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/tenacity/asyncio/__init__.py", line 189, in async_wrapped
return await copy(fn, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/tenacity/asyncio/__init__.py", line 121, in __call__
await self.sleep(do) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/tasks.py", line 718, in sleep
return await future
^^^^^^^^^^^^
asyncio.exceptions.CancelledErrore[0m
Hi @cliver
From the logs, seems like the MG API is not able to connect to your car. That’s why the entities became unavailable and the integration did not setup.
That’s not an issue with the integration. Sometimes MG fails to connect to the car for some reason (in my case, when happens, it’s mostly at weekends) and no data is being received. Most certainly you cannot get data on the iSmart App either.
The only solution is to keep trying until you are able to get some data.
Thanks for the swift reply @VaReTaS . I kind of guessed it would be a problem with the API. MG software doesn’t seem to b the best . When I see the entities become unavailable I do check the iSmart app and it does seem to get data where/when the integration doesn’t. This time I left it a good 24hrs before doing anything and the integration was showing as needing attention. So I guess I had to reload or re-install at that point?
Glad I have it running again at the moment as I have a Power Up session available tomorrow right at the time I’ll be cooking Sunday lunch. So I can cook, charge the car and my solar battery for a couple of hours for free. Happy days
On another note. I have noticed some entities which are on the list on GitHub are missing in my instance. Namely the Heated Seats and Battery Heating controls.
I have ticked them in the configuration options.
Do I need to do anything else to get them to show up?
Hi @cliver
No issues, whatever I can help, when possible I try to respond as quick as I can.
I don’t know about you, but my experience is that sometimes the app seems to get the basic data, but not all data the integration tries to grab. Also, some of that data is quite a generic response that would mess the historical data of some entities… that’s why the app shows some data and the integration doesn’t.
Those related entities should pop-up with an integration reload or on the next HA restart. That’s something that I have in mind to revise, so whenever those changes are made, the integration properly reload and shows new sensors/entities.
Hi @hmadsen
Hope you were able to get the integration installed through HACS. On the README you have a summary of steps needed: GitHub - ad-ha/mg-saic-ha: MG SAIC Custom Integration for Home Assistant
On the cards, my lovelace for the car currently looks like this:
I have pending changing the actual “Charging Power” and “Charging Current” to mushroom templates to get the proper color when “on” and status working.
Hope this helps
Hi everyone,
I know I have a pending version to come out, but I am still trying to sort the issues with Climate (AC, Heat, Fan)… I just got another project in my hands and have to spare time for both, but I will try to get is out asap.
Cheers
Damit. Just tried a reload to see if the missing entities came up. It’s failed to set up.
Seems to fail authorisation?
2025-01-11 14:49:08.329 ERROR (MainThread) [custom_components.mg_saic] Failed to log in to MG SAIC API: return code: 500, message: API call POST /oauth/token failed unexpectedly
2025-01-11 14:49:08.329 ERROR (MainThread) [custom_components.mg_saic] Failed to set up MG SAIC integration: return code: 500, message: API call POST /oauth/token failed unexpectedly
UPDATE:
OK, Reloading kept on failing. I have gone into the iSmart app and saved the secondary account (no changes made). Reloaded the integration and it came up first time, with the missing integrations as well.
Not sure why it keeps failing authorisation. I’ll keep an eye on it.
I do find the app a bit flaky. I often have to refresh it (pull down on android) to get it to load the data.
I don’t suppose you could share how you setup those lovelace cards, especially the first one please?
I’m just starting to explore the various card options and would love to see how you achieve that.
It has to be something on MG’s end. That is a direct connection to their server, so nothing we can do about it
In my experience the only time I receive errors are when I also can’t get through on the MG app.
Hi.
Yes got it installed, can not bind it to the car as i only get it next week
Is this a card that is part of the interration you made or is this created from “scratch”
I am not good at making cards like that, is it possible to get it if it is not part of the integration ?
Sure thing. Here is the code for the first card: For this one you will need the images from here: https://www.figma.com/community/file/1213146362129423427
You have more info on the images and its usage check here: Generic 'Vehicle' Card
square: false
columns: 1
type: grid
cards:
- type: picture-elements
elements:
- type: conditional
conditions:
- condition: state
entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
state: "on"
- condition: or
conditions:
- condition: state
entity: sensor.mg_marvel_r_electric_charging_status
state: Charging (AC)
- condition: state
entity: sensor.mg_marvel_r_electric_charging_status
state: Charging (DC)
elements:
- type: image
entity: null
image: /local/img/ev6/charging.png
style:
top: 50%
left: 50%
width: 100%
animation: pulsate 2s linear infinite
filter: saturate(1)
tap_action: none
card_mod:
style: |
@keyframes pulsate {
0%,100% { opacity: 0 }
50% { opacity: 1 }
}
- type: conditional
conditions:
- condition: state
entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
state: "on"
elements:
- type: image
entity: null
image: /local/img/ev6/charging.png
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: conditional
conditions:
- entity: binary_sensor.mg_marvel_r_electric_bonnet_status
state: "on"
elements:
- type: image
entity: binary_sensor.mg_marvel_r_electric_bonnet_status
image: /local/img/ev6/hyundai-santa-fe-hood.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
entity: null
image: /local/img/ev6/hyundai-santa-fe-hood.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: conditional
conditions:
- entity: binary_sensor.mg_marvel_r_electric_door_front_left
state: "on"
elements:
- type: image
image: /local/img/ev6/hyundai-santa-fe-driver-door.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
image: /local/img/ev6/hyundai-santa-fe-driver-door.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: conditional
conditions:
- condition: numeric_state
entity: sensor.mg_marvel_r_electric_tyre_pressure_front_left
below: 2.6
elements:
- type: image
image: /local/img/ev6/hyundai-santa-fe-front-left-tire.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
image: /local/img/ev6/hyundai-santa-fe-front-left-tire.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: conditional
conditions:
- condition: numeric_state
entity: sensor.mg_marvel_r_electric_tyre_pressure_front_right
below: 2.6
elements:
- type: image
image: /local/img/ev6/hyundai-santa-fe-front-right-tire.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
image: /local/img/ev6/hyundai-santa-fe-front-right-tire.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: conditional
conditions:
- condition: numeric_state
entity: sensor.mg_marvel_r_electric_tyre_pressure_rear_left
below: 2.6
elements:
- type: image
image: /local/img/ev6/hyundai-santa-fe-rear-left-tire.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
image: /local/img/ev6/hyundai-santa-fe-rear-left-tire.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: conditional
conditions:
- condition: numeric_state
entity: sensor.mg_marvel_r_electric_tyre_pressure_rear_right
below: 2.6
elements:
- type: image
entity: sensor.mg_marvel_r_electric_tyre_pressure_rear_right
image: /local/img/ev6/hyundai-santa-fe-rear-right-tire.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
image: /local/img/ev6/hyundai-santa-fe-rear-right-tire.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
- type: conditional
conditions:
- entity: binary_sensor.mg_marvel_r_electric_door_front_right
state: "on"
elements:
- type: image
image: /local/img/ev6/hyundai-santa-fe-passenger-door.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
entity: binary_sensor.mg_marvel_r_electric_door_front_right
image: /local/img/ev6/hyundai-santa-fe-passenger-door.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: conditional
conditions:
- entity: binary_sensor.mg_marvel_r_electric_door_rear_left
state: "on"
elements:
- type: image
image: /local/img/ev6/hyundai-santa-fe-rear-left-door.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
entity: binary_sensor.mg_marvel_r_electric_door_rear_left
image: /local/img/ev6/hyundai-santa-fe-rear-left-door.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: conditional
conditions:
- entity: binary_sensor.mg_marvel_r_electric_door_rear_right
state: "on"
elements:
- type: image
image: /local/img/ev6/hyundai-santa-fe-rear-right-door.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
entity: binary_sensor.mg_marvel_r_electric_door_rear_right
image: /local/img/ev6/hyundai-santa-fe-rear-right-door.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: conditional
conditions:
- entity: binary_sensor.mg_marvel_r_electric_boot_status
state: "on"
elements:
- type: image
image: /local/img/ev6/hyundai-santa-fe-trunk.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
entity: binary_sensor.mg_marvel_r_electric_boot_status
image: /local/img/ev6/hyundai-santa-fe-trunk.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: conditional
conditions:
- entity: binary_sensor.mg_marvel_r_electric_lock_status
state: "on"
- entity: binary_sensor.mg_marvel_r_electric_door_front_left
state: "on"
- entity: binary_sensor.mg_marvel_r_electric_door_front_right
state: "on"
- entity: binary_sensor.mg_marvel_r_electric_door_rear_left
state: "on"
- entity: binary_sensor.mg_marvel_r_electric_door_rear_right
state: "on"
- entity: binary_sensor.mg_marvel_r_electric_bonnet_status
state: "on"
- entity: binary_sensor.mg_marvel_r_electric_boot_status
state: "on"
elements:
- type: image
image: /local/img/ev6/hyundai-santa-fe-lock.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: image
image: /local/img/ev6/hyundai-santa-fe-lock.svg
style:
top: 50%
left: 50%
width: 100%
filter: saturate(1)
tap_action: none
- type: state-icon
entity: device_tracker.mg_marvel_r_electric_gps_location
state_color: false
style:
top: 25%
left: 19%
- type: state-label
entity: device_tracker.mg_marvel_r_electric_gps_location
style:
top: 30%
left: 19%
font-size: 70%
- type: state-icon
entity: sensor.mg_marvel_r_electric_mileage
style:
top: 48%
left: 11.5%
- type: state-label
entity: sensor.mg_marvel_r_electric_mileage
style:
top: 53%
left: 11.5%
font-size: 70%
- type: state-icon
entity: binary_sensor.mg_marvel_r_electric_lock_status
icon: mdi:car-door-lock
state_color: false
style:
top: 70%
left: 19%
- type: state-label
entity: binary_sensor.mg_marvel_r_electric_lock_status
style:
top: 75%
left: 19%
font-size: 70%
- type: conditional
conditions:
- condition: state
entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
state: "on"
- condition: or
conditions:
- condition: state
entity: sensor.mg_marvel_r_electric_charging_status
state: Charging (AC)
- condition: state
entity: sensor.mg_marvel_r_electric_charging_status
state: Charging (DC)
elements:
- type: state-icon
entity: sensor.mg_marvel_r_electric_state_of_charge
icon: mdi:battery-charging-high
style:
top: 25%
left: 82%
- type: conditional
conditions:
- condition: state
entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
state: "on"
- condition: or
conditions:
- condition: state
entity: sensor.mg_marvel_r_electric_charging_status
state: Charging Finished
elements:
- type: state-icon
entity: sensor.mg_marvel_r_electric_state_of_charge
icon: mdi:power-plug-battery
style:
top: 25%
left: 82%
- type: conditional
conditions:
- entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
state: "off"
elements:
- type: state-icon
entity: sensor.mg_marvel_r_electric_state_of_charge
icon: mdi:battery
style:
top: 25%
left: 82%
- type: state-label
entity: sensor.mg_marvel_r_electric_state_of_charge
style:
top: 30%
left: 82%
font-size: 70%
- type: conditional
conditions:
- condition: state
entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
state: "on"
- condition: or
conditions:
- condition: state
entity: sensor.mg_marvel_r_electric_charging_status
state: Charging (AC)
- condition: state
entity: sensor.mg_marvel_r_electric_charging_status
state: Charging (DC)
elements:
- type: state-icon
icon: mdi:lightning-bolt
entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
style:
top: 48%
left: 89%
animation: pulsate 2s linear infinite
- type: conditional
conditions:
- condition: state
entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
state: "on"
- condition: or
conditions:
- condition: state
entity: sensor.mg_marvel_r_electric_charging_status
state: Charging Finished
- condition: state
entity: sensor.mg_marvel_r_electric_charging_status
state: Not Charging
elements:
- type: state-icon
icon: mdi:ev-plug-ccs2
entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
style:
top: 48%
left: 89%
- type: conditional
conditions:
- entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
state: "off"
elements:
- type: state-icon
icon: mdi:ev-plug-ccs2
entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
style:
top: 48%
left: 89%
- type: state-label
entity: binary_sensor.mg_marvel_r_electric_charging_gun_state
style:
top: 53%
left: 89%
font-size: 70%
- type: state-icon
entity: sensor.mg_marvel_r_electric_electric_range
style:
top: 70%
left: 82%
- type: state-label
entity: sensor.mg_marvel_r_electric_electric_range
style:
top: 75%
left: 82%
font-size: 70%
image: /local/img/ev6/hyundai-santa-fe.png
Everything else are tile, mushroom entities or template buttons.
Just a sample:
type: custom:mushroom-template-card
primary: Charging Status
secondary: "{{ states('sensor.mg_marvel_r_electric_charging_status') }}"
icon: |-
{% set status = states('sensor.mg_marvel_r_electric_charging_status') %}
{% if status == "Not Charging" %}
mdi:home-export-outline
{% elif status == "Charging Finished" %}
mdi:ev-station
{% elif status == "Charging (AC)" %}
mdi:ev-station
{% elif status == "Charging (DC)" %}
mdi:battery-charging-high
{% else %}
mdi:ev-station
{% endif %}
icon_color: |-
{% set status = states('sensor.mg_marvel_r_electric_charging_status') %}
{% if status == "Not Charging" %}
grey
{% elif status == "Charging Finished" %}
cyan
{% elif status == "Charging (AC)" %}
light-green
{% elif status == "Charging (DC)" %}
green
{% else %}
yellow
{% endif %}
entity: sensor.mg_marvel_r_electric_charging_status
tap_action:
action: more-info
hold_action:
action: none
double_tap_action:
action: none
multiline_secondary: false
Hope this helps
hello, first : great work!
But I have issues to turn on the heat or the defrosting : 2 sec after I put it On it goes off (the unlock features does not have the problem)
so i suppose it s better to wait your next version
Can you provide your logs? Better open an issue on Github (Issues · ad-ha/mg-saic-ha · GitHub) and I will have a look.
It might be something with your specific model, so it might be worth to check what’s happening.
Cheers
Many thanks.
I have just restarted HA after a HACS installation that required it.
The MG/SAIC integration failed to start up again.
I went into the iSmart app and saved the secondary account (without changing anything) then reloaded this integration and it worked.
A bit odd and inconvenient but, at least I can get it running after a restart now.
Anything I can do to figure out why it’s happening?
Also, am I the only on experiencing this?
Be good to hear from anyone using a secondary account.
Never mind this, i was just being “Not very bright”
No worries. Glad you were able to sort it.