Open Soodium opened 4 days ago
Hi @Soodium,
So it seems like the issue is on the data that you are receiving from MG, which is sending way to many generic responses on the charging data response (you would get, for example, SOC 102.3% and similar issues on other sensors).
The integration has a mechanism to now stop those values to get into the sensors. You may go back to 0.4.5 or you may try the 0.4.8-a2 (https://github.com/ad-ha/mg-saic-ha/releases/tag/0.4.8-a2) which is a trial to see if we may setup the integration without fully valid data.
In any case, at some point you may get data from MG, just keep trying to get the integration to work and valid data to come through. It happens quite often, in my case, especially on weekends.
@Soodium
Can you please try on release 0.4.8 https://github.com/ad-ha/mg-saic-ha/releases/tag/0.4.8
I hope this fixes those issues.
Thanks
`2024-11-19 17:29:54.376 DEBUG (MainThread) [custom_components.mg_saic] Logging in with Username: my-email-adress, Country Code: None, Email: True, Region: EU, Base URL: https://gateway-mg-eu.soimt.com/api.app/v1/ 2024-11-19 17:29:57.238 DEBUG (MainThread) [custom_components.mg_saic] Vehicle list response: VehicleListResp(vinList=[VinInfo(bindTime=1690814423000, brandName='MG', colorName='Brighton Blue', isActivate=False, isCurrentVehicle=True, isSubaccount=False, modelName='EH32 X7', modelYear='2023', name='Car', series='EH32 L', vin='LMNOP3333OO888888', subAccountList=[], vehicleModelConfiguration=[VehicleModelConfiguration(itemCode='J17', itemName='Tire', itemValue='1'), VehicleModelConfiguration(itemCode='Q00', itemName='Airbag', itemValue='1'), VehicleModelConfiguration(itemCode='Q01', itemName='FAirbag', itemValue='1'), VehicleModelConfiguration(itemCode='Q09', itemName='AirbagS', itemValue='1'), VehicleModelConfiguration(itemCode='S35', itemName='Sunroof', itemValue='0'), VehicleModelConfiguration(itemCode='S61', itemName='Remote control', itemValue='1'), VehicleModelConfiguration(itemCode='T11', itemName='AC', itemValue='1'), VehicleModelConfiguration(itemCode='EPS', itemName='EPS', itemValue='1'), VehicleModelConfiguration(itemCode='SA64', itemName='SA64', itemValue='0111110000000000001000000100101000000010100000000000000000000110'), VehicleModelConfiguration(itemCode='BONNUT', itemName='BONNUT', itemValue='1'), VehicleModelConfiguration(itemCode='DOOR', itemName='DOOR', itemValue='1111'), VehicleModelConfiguration(itemCode='BOOT', itemName='BOOT', itemValue='1'), VehicleModelConfiguration(itemCode='ENGINE', itemName='ENGINE', itemValue='1'), VehicleModelConfiguration(itemCode='EV', itemName='EV', itemValue='0'), VehicleModelConfiguration(itemCode='HeatedSeat', itemName='HeatedSeat', itemValue='0'), VehicleModelConfiguration(itemCode='KEYPOS', itemName='KEYPOS', itemValue='0'), VehicleModelConfiguration(itemCode='ENERGY', itemName='ENERGY', itemValue='1'), VehicleModelConfiguration(itemCode='BATTERY', itemName='BATTERY', itemValue='1'), VehicleModelConfiguration(itemCode='INTEMP', itemName='INTEMP', itemValue='1'), VehicleModelConfiguration(itemCode='EXTEMP', itemName='EXTEMP', itemValue='1'), VehicleModelConfiguration(itemCode='WINDOW', itemName='WINDOW', itemValue='0000'), VehicleModelConfiguration(itemCode='LRD', itemName='LRD', itemValue='0'), VehicleModelConfiguration(itemCode='BTKEY', itemName='BTKEY', itemValue='1'), VehicleModelConfiguration(itemCode='BType', itemName='Battery', itemValue='2'), VehicleModelConfiguration(itemCode='SBH', itemName='SBH', itemValue='1'), VehicleModelConfiguration(itemCode='BHI', itemName='BHI', itemValue='1'), VehicleModelConfiguration(itemCode='ROV', itemName='ROV', itemValue='25857')])]) 2024-11-19 17:29:57.241 INFO (MainThread) [custom_components.mg_saic] Fetched vehicle data successfully. 2024-11-19 17:29:58.784 DEBUG (MainThread) [custom_components.mg_saic] Logging in with base URL: https://gateway-mg-eu.soimt.com/api.app/v1/ for region: EU 2024-11-19 17:30:01.826 DEBUG (MainThread) [custom_components.mg_saic] Login successful, initializing vehicle APIs. 2024-11-19 17:30:09.934 ERROR (MainThread) [aioharmony.harmonyclient] 192.168.178.22: Unable to determine if XMPP is enabled: [Errno 113] Connect call failed ('192.168.178.22', 5222) 2024-11-19 17:30:11.570 DEBUG (MainThread) [custom_components.mg_saic] Generic Charging Data: ChrgMgmtData(bmsAdpPubChrgSttnDspCmd=0, bmsAltngChrgCrntDspCmd=0, bmsChrgCtrlDspCmd=0, bmsChrgOtptCrntReq=511, bmsChrgOtptCrntReqV=1, bmsChrgSpRsn=0, bmsChrgSts=0, bmsDsChrgSpRsn=0, bmsEstdElecRng=2046, bmsOnBdChrgTrgtSOCDspCmd=0, bmsPackCrnt=65535, bmsPackCrntV=1, bmsPackSOCDsp=1023, bmsPackVol=4095, bmsPTCHeatReqDspCmd=0, bmsPTCHeatResp=0, bmsPTCHeatSpRsn=None, bmsReserCtrlDspCmd=0, bmsReserSpHourDspCmd=30, bmsReserSpMintueDspCmd=62, bmsReserStHourDspCmd=30, bmsReserStMintueDspCmd=62, ccuEleccLckCtrlDspCmd=0, ccuOffBdChrgrPlugOn=0, ccuOnbdChrgrPlugOn=0, chrgngAddedElecRng=0, chrgngAddedElecRngV=0, chrgngDoorOpenCnd=0, chrgngDoorPosSts=0, chrgngRmnngTime=1023, chrgngRmnngTimeV=1, chrgngSpdngTime=0, chrgngSpdngTimeV=0, clstrElecRngToEPT=2046, disChrgngRmnngTime=1023, disChrgngRmnngTimeV=1, imcuChrgngEstdElecRng=2046, imcuChrgngEstdElecRngV=1, imcuDschrgngEstdElecRng=4095, imcuDschrgngEstdElecRngV=1, imcuVehElecRng=2046, imcuVehElecRngV=1, onBdChrgrAltrCrntInptCrnt=0, onBdChrgrAltrCrntInptVol=0) 2024-11-19 17:30:11.572 WARNING (MainThread) [custom_components.mg_saic] Data invalid or generic: Generic charging response received. 2024-11-19 17:30:11.572 INFO (MainThread) [custom_components.mg_saic] Retrying in 15 seconds... (Attempt 1/5) 2024-11-19 17:30:32.973 DEBUG (MainThread) [custom_components.mg_saic] Generic Charging Data: ChrgMgmtData(bmsAdpPubChrgSttnDspCmd=0, bmsAltngChrgCrntDspCmd=0, bmsChrgCtrlDspCmd=0, bmsChrgOtptCrntReq=511, bmsChrgOtptCrntReqV=1, bmsChrgSpRsn=0, bmsChrgSts=0, bmsDsChrgSpRsn=0, bmsEstdElecRng=2046, bmsOnBdChrgTrgtSOCDspCmd=0, bmsPackCrnt=65535, bmsPackCrntV=1, bmsPackSOCDsp=1023, bmsPackVol=4095, bmsPTCHeatReqDspCmd=0, bmsPTCHeatResp=0, bmsPTCHeatSpRsn=None, bmsReserCtrlDspCmd=0, bmsReserSpHourDspCmd=30, bmsReserSpMintueDspCmd=62, bmsReserStHourDspCmd=30, bmsReserStMintueDspCmd=62, ccuEleccLckCtrlDspCmd=0, ccuOffBdChrgrPlugOn=0, ccuOnbdChrgrPlugOn=0, chrgngAddedElecRng=0, chrgngAddedElecRngV=0, chrgngDoorOpenCnd=0, chrgngDoorPosSts=0, chrgngRmnngTime=1023, chrgngRmnngTimeV=1, chrgngSpdngTime=0, chrgngSpdngTimeV=0, clstrElecRngToEPT=2046, disChrgngRmnngTime=1023, disChrgngRmnngTimeV=1, imcuChrgngEstdElecRng=2046, imcuChrgngEstdElecRngV=1, imcuDschrgngEstdElecRng=4095, imcuDschrgngEstdElecRngV=1, imcuVehElecRng=2046, imcuVehElecRngV=1, onBdChrgrAltrCrntInptCrnt=0, onBdChrgrAltrCrntInptVol=0) 2024-11-19 17:30:32.973 WARNING (MainThread) [custom_components.mg_saic] Data invalid or generic: Generic charging response received. 2024-11-19 17:30:32.974 INFO (MainThread) [custom_components.mg_saic] Retrying in 15 seconds... (Attempt 2/5) 2024-11-19 17:30:51.294 DEBUG (MainThread) [custom_components.mg_saic] Generic Charging Data: ChrgMgmtData(bmsAdpPubChrgSttnDspCmd=0, bmsAltngChrgCrntDspCmd=0, bmsChrgCtrlDspCmd=0, bmsChrgOtptCrntReq=511, bmsChrgOtptCrntReqV=1, bmsChrgSpRsn=0, bmsChrgSts=0, bmsDsChrgSpRsn=0, bmsEstdElecRng=2046, bmsOnBdChrgTrgtSOCDspCmd=0, bmsPackCrnt=65535, bmsPackCrntV=1, bmsPackSOCDsp=1023, bmsPackVol=4095, bmsPTCHeatReqDspCmd=0, bmsPTCHeatResp=0, bmsPTCHeatSpRsn=None, bmsReserCtrlDspCmd=0, bmsReserSpHourDspCmd=30, bmsReserSpMintueDspCmd=62, bmsReserStHourDspCmd=30, bmsReserStMintueDspCmd=62, ccuEleccLckCtrlDspCmd=0, ccuOffBdChrgrPlugOn=0, ccuOnbdChrgrPlugOn=0, chrgngAddedElecRng=0, chrgngAddedElecRngV=0, chrgngDoorOpenCnd=0, chrgngDoorPosSts=0, chrgngRmnngTime=1023, chrgngRmnngTimeV=1, chrgngSpdngTime=0, chrgngSpdngTimeV=0, clstrElecRngToEPT=2046, disChrgngRmnngTime=1023, disChrgngRmnngTimeV=1, imcuChrgngEstdElecRng=2046, imcuChrgngEstdElecRngV=1, imcuDschrgngEstdElecRng=4095, imcuDschrgngEstdElecRngV=1, imcuVehElecRng=2046, imcuVehElecRngV=1, onBdChrgrAltrCrntInptCrnt=0, onBdChrgrAltrCrntInptVol=0) 2024-11-19 17:30:51.294 WARNING (MainThread) [custom_components.mg_saic] Data invalid or generic: Generic charging response received. 2024-11-19 17:30:51.294 INFO (MainThread) [custom_components.mg_saic] Retrying in 15 seconds... (Attempt 3/5) 2024-11-19 17:31:09.576 DEBUG (MainThread) [custom_components.mg_saic] Generic Charging Data: ChrgMgmtData(bmsAdpPubChrgSttnDspCmd=0, bmsAltngChrgCrntDspCmd=0, bmsChrgCtrlDspCmd=0, bmsChrgOtptCrntReq=511, bmsChrgOtptCrntReqV=1, bmsChrgSpRsn=0, bmsChrgSts=0, bmsDsChrgSpRsn=0, bmsEstdElecRng=2046, bmsOnBdChrgTrgtSOCDspCmd=0, bmsPackCrnt=65535, bmsPackCrntV=1, bmsPackSOCDsp=1023, bmsPackVol=4095, bmsPTCHeatReqDspCmd=0, bmsPTCHeatResp=0, bmsPTCHeatSpRsn=None, bmsReserCtrlDspCmd=0, bmsReserSpHourDspCmd=30, bmsReserSpMintueDspCmd=62, bmsReserStHourDspCmd=30, bmsReserStMintueDspCmd=62, ccuEleccLckCtrlDspCmd=0, ccuOffBdChrgrPlugOn=0, ccuOnbdChrgrPlugOn=0, chrgngAddedElecRng=0, chrgngAddedElecRngV=0, chrgngDoorOpenCnd=0, chrgngDoorPosSts=0, chrgngRmnngTime=1023, chrgngRmnngTimeV=1, chrgngSpdngTime=0, chrgngSpdngTimeV=0, clstrElecRngToEPT=2046, disChrgngRmnngTime=1023, disChrgngRmnngTimeV=1, imcuChrgngEstdElecRng=2046, imcuChrgngEstdElecRngV=1, imcuDschrgngEstdElecRng=4095, imcuDschrgngEstdElecRngV=1, imcuVehElecRng=2046, imcuVehElecRngV=1, onBdChrgrAltrCrntInptCrnt=0, onBdChrgrAltrCrntInptVol=0) 2024-11-19 17:31:09.577 WARNING (MainThread) [custom_components.mg_saic] Data invalid or generic: Generic charging response received. 2024-11-19 17:31:09.577 INFO (MainThread) [custom_components.mg_saic] Retrying in 15 seconds... (Attempt 4/5) 2024-11-19 17:31:27.896 DEBUG (MainThread) [custom_components.mg_saic] Generic Charging Data: ChrgMgmtData(bmsAdpPubChrgSttnDspCmd=0, bmsAltngChrgCrntDspCmd=0, bmsChrgCtrlDspCmd=0, bmsChrgOtptCrntReq=511, bmsChrgOtptCrntReqV=1, bmsChrgSpRsn=0, bmsChrgSts=0, bmsDsChrgSpRsn=0, bmsEstdElecRng=2046, bmsOnBdChrgTrgtSOCDspCmd=0, bmsPackCrnt=65535, bmsPackCrntV=1, bmsPackSOCDsp=1023, bmsPackVol=4095, bmsPTCHeatReqDspCmd=0, bmsPTCHeatResp=0, bmsPTCHeatSpRsn=None, bmsReserCtrlDspCmd=0, bmsReserSpHourDspCmd=30, bmsReserSpMintueDspCmd=62, bmsReserStHourDspCmd=30, bmsReserStMintueDspCmd=62, ccuEleccLckCtrlDspCmd=0, ccuOffBdChrgrPlugOn=0, ccuOnbdChrgrPlugOn=0, chrgngAddedElecRng=0, chrgngAddedElecRngV=0, chrgngDoorOpenCnd=0, chrgngDoorPosSts=0, chrgngRmnngTime=1023, chrgngRmnngTimeV=1, chrgngSpdngTime=0, chrgngSpdngTimeV=0, clstrElecRngToEPT=2046, disChrgngRmnngTime=1023, disChrgngRmnngTimeV=1, imcuChrgngEstdElecRng=2046, imcuChrgngEstdElecRngV=1, imcuDschrgngEstdElecRng=4095, imcuDschrgngEstdElecRngV=1, imcuVehElecRng=2046, imcuVehElecRngV=1, onBdChrgrAltrCrntInptCrnt=0, onBdChrgrAltrCrntInptVol=0) 2024-11-19 17:31:27.897 WARNING (MainThread) [custom_components.mg_saic] Data invalid or generic: Generic charging response received. 2024-11-19 17:31:27.897 INFO (MainThread) [custom_components.mg_saic] Retrying in 15 seconds... (Attempt 5/5) 2024-11-19 17:31:33.070 ERROR (MainThread) [aioharmony.harmonyclient] 192.168.178.22: Unable to determine if XMPP is enabled: [Errno 113] Connect call failed ('192.168.178.22', 5222) 2024-11-19 17:31:42.899 ERROR (MainThread) [custom_components.mg_saic] Failed to fetch data after 5 retries. 2024-11-19 17:31:42.900 DEBUG (MainThread) [custom_components.mg_saic] Finished fetching MG SAIC data update coordinator data in 100.810 seconds (success: True) 2024-11-19 17:31:42.901 ERROR (MainThread) [custom_components.mg_saic] Failed to retrieve vehicle info or status. 2024-11-19 17:31:42.902 ERROR (MainThread) [custom_components.mg_saic] Failed to retrieve vehicle info or status. 2024-11-19 17:31:42.903 ERROR (MainThread) [custom_components.mg_saic] Failed to retrieve vehicle info or status. 2024-11-19 17:31:42.904 ERROR (MainThread) [homeassistant.components.button] Error while setting up mg_saic platform for button Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 365, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/mg_saic/button.py", line 11, in async_setup_entry vin_info = coordinator.data["info"][0]
TypeError: 'NoneType' object is not subscriptable
2024-11-19 17:31:42.906 ERROR (MainThread) [homeassistant.components.climate] Error while setting up mg_saic platform for climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 365, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/mg_saic/climate.py", line 23, in async_setup_entry
vin_info = coordinator.data["info"][0]
~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
2024-11-19 17:31:42.908 ERROR (MainThread) [homeassistant.components.number] Error while setting up mg_saic platform for number
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 365, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/mg_saic/number.py", line 11, in async_setup_entry
vin_info = coordinator.data["info"][0]
~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
2024-11-19 17:31:42.910 ERROR (MainThread) [homeassistant.components.switch] Error while setting up mg_saic platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 365, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/mg_saic/switch.py", line 10, in async_setup_entry
vin_info = coordinator.data["info"][0]
~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
2024-11-19 17:31:42.912 ERROR (MainThread) [homeassistant.components.lock] Error while setting up mg_saic platform for lock
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 365, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/mg_saic/lock.py", line 10, in async_setup_entry
vin_info = coordinator.data["info"][0]
~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
2024-11-19 17:31:42.919 INFO (MainThread) [custom_components.mg_saic] Services registered for MG SAIC integration.
2024-11-19 17:31:42.919 INFO (MainThread) [custom_components.mg_saic] MG SAIC integration setup completed successfully.`
Unfortunately, no improvement.
Thanks for the logs and feedback.
Let me have a look later and see what I may come up with. The full logs will help for sure.
Anyhow, keep trying and see if gets any valid data. Another user said that he had to try 8 times until he got it working.
Hi @Soodium
Let's see if version 0.5.0 may help with your issue and solves those problems.
Cheers
I was able to integrate my car again, but now only 37 entities are available. With version 0.4.5, I had 51. The entities related to the battery status and everything concerning the battery are missing.
That should now be fixed on version 0.5.2
By my mistake, the vehicle type was being overwritten on the code and some BEV got to be shown as HEV or ICE. This should now be fixed.
Let me know if it gets back to normal.
https://github.com/SAIC-iSmart-API/saic-python-client-ng/issues/7
I accidentally wrote the issue in the wrong repo :-D
I have since updated to version 0.4.7, but I still don't receive any data. I let it run for 48 hours, but still no data. I need to switch back to version 0.4.5. Is there any update on this?