ad-ha / mg-saic-ha

MG SAIC Custom Integration for Home Assistant
MIT License
7 stars 0 forks source link

[ISSUE] Has become unavailable #37

Open nestor1832 opened 2 hours ago

nestor1832 commented 2 hours ago

Home Assistant Version

2024.11.2

MG/SAIC Integration Version

0.4.8

Installation Method

HACS

Did you check for existing issues?

Did you enable debug logging before and are ready to post logs?

Describe the Issue

After successfully receiving the data two hours ago, nothing was updated, although I requested an update of the data manually with the button: “Update Vehicle Data”. I reloaded the application several times, more than 8 times ;-) and now all the data is unavailable. Capture d’écran du 2024-11-19 18-10-18

Logs

2024-11-19 17:53:00.231 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:53:00.233 WARNING (MainThread) [custom_components.mg_saic] Data invalid or generic: Generic charging response received.
2024-11-19 17:53:00.234 INFO (MainThread) [custom_components.mg_saic] Retrying in 15 seconds... (Attempt 1/5)
2024-11-19 17:53:18.627 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:53:18.627 WARNING (MainThread) [custom_components.mg_saic] Data invalid or generic: Generic charging response received.
2024-11-19 17:53:18.627 INFO (MainThread) [custom_components.mg_saic] Retrying in 15 seconds... (Attempt 2/5)
2024-11-19 17:53:36.993 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:53:36.993 WARNING (MainThread) [custom_components.mg_saic] Data invalid or generic: Generic charging response received.
2024-11-19 17:53:36.993 INFO (MainThread) [custom_components.mg_saic] Retrying in 15 seconds... (Attempt 3/5)
2024-11-19 17:53:45.650 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: {('mg_saic', '01JD2F31060Z1YR1K82KS7R2P5'): 132555.898310899}
2024-11-19 17:53:55.359 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:53:55.360 WARNING (MainThread) [custom_components.mg_saic] Data invalid or generic: Generic charging response received.
2024-11-19 17:53:55.360 INFO (MainThread) [custom_components.mg_saic] Retrying in 15 seconds... (Attempt 4/5)
2024-11-19 17:54:13.832 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:54:13.832 WARNING (MainThread) [custom_components.mg_saic] Data invalid or generic: Generic charging response received.
2024-11-19 17:54:13.833 INFO (MainThread) [custom_components.mg_saic] Retrying in 15 seconds... (Attempt 5/5)
2024-11-19 17:54:28.833 ERROR (MainThread) [custom_components.mg_saic] Failed to fetch data after 5 retries.
2024-11-19 17:54:28.834 DEBUG (MainThread) [custom_components.mg_saic] Finished fetching MG SAIC data update coordinator data in 94.912 seconds (success: True)
2024-11-19 17:54:28.859 ERROR (MainThread) [custom_components.mg_saic] Failed to retrieve vehicle info or status.
2024-11-19 17:54:28.859 ERROR (MainThread) [custom_components.mg_saic] Failed to retrieve vehicle info or status.
2024-11-19 17:54:28.859 ERROR (MainThread) [custom_components.mg_saic] Failed to retrieve vehicle info or status.
2024-11-19 17:54:28.859 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:54:28.863 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:54:28.864 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:54:28.865 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:54:28.866 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:54:28.868 INFO (MainThread) [custom_components.mg_saic] Services registered for MG SAIC integration.
2024-11-19 17:54:28.868 INFO (MainThread) [custom_components.mg_saic] MG SAIC integration setup completed successfully.

Additional Context

No response

ad-ha commented 2 hours ago

Thanks @nestor1832

With those full logs I will try to find a workaround.

Seems like you keep having the same issue with the Charging Data being only generic.

I am wondering if I can break the data update into different blocks. Let me check if I find a way.