Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] No more entities since clean install 0.9 #98

Closed
2 of 4 tasks
SliDeeN opened this issue Jan 31, 2025 · 9 comments · Fixed by #102
Closed
2 of 4 tasks

[ISSUE] No more entities since clean install 0.9 #98

SliDeeN opened this issue Jan 31, 2025 · 9 comments · Fixed by #102
Labels
bug Something isn't working

Comments

@SliDeeN
Copy link

SliDeeN commented Jan 31, 2025

Home Assistant Version

Core 2025.1.4 / Supervisor 2024.12.3

MG/SAIC Integration Version

0.9.1

Installation Method

HACS

Did you check for existing issues?

  • Yes, I have checked for existing issues
  • No, I have not checked for existing issues

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

  • Yes, I have enabled debug logging
  • No, I have not enabled debug logging

Describe the Issue

Hello,

Since the 0.9 update i decide to made a clean install of the addon to delete the old unavailable entities...
But since this clean install, some entities are not available.
Example with the Front Left Heated Seat Level and Front Right Heated Seat Level for my MG4.

Old entities name :
mg_eh32_x9_heated_seat_front_left_level
mg_eh32_x9_heated_seat_front_right_level

Can you please check that ?
Thx

Logs

Additional Context

To reproduce :

  1. Delete the actual configuration of the addon
  2. Make a new configuration
  3. Check missing entities
@SliDeeN SliDeeN added the bug Something isn't working label Jan 31, 2025
@SliDeeN
Copy link
Author

SliDeeN commented Jan 31, 2025

I see a similar issue : #82 but with the older version.

@ad-ha
Copy link
Owner

ad-ha commented Jan 31, 2025

Well, I will have a look and check.

With the changes that I did to the coordinator and moving some values to consts, I may messed something there, and as my car does no have heated seats, I could not see the issue.

I wonder that the answer is yes, but both of you activated the Heated Seats Feature during configuration? Or on Options?

@SliDeeN
Copy link
Author

SliDeeN commented Jan 31, 2025

Hello @ad-ha .
Yes it's activated :

Image

but when i check the logs i have these lines :
2025-01-31 15:09:44.190 DEBUG (MainThread) [custom_components.mg_saic] Sunroof switch not created for VIN . 2025-01-31 15:09:44.190 DEBUG (MainThread) [custom_components.mg_saic] Heated seats switch not created for VIN . 2025-01-31 15:09:44.190 DEBUG (MainThread) [custom_components.mg_saic] Battery heating switch not created for VIN .

So i have restart the configuration, make sure that both options are active and confirm. Now the entities appear correctly.
So i think, at the first configuration, the 3 differents option (has sunroof, has heated seats and has battery heating) are not really activated and need a 2nd configuration and reload the addon.

EDIT :
I've just seen that since the heated seats appeared I no longer have access to the following entities:

switch.mg4_rear_window_defrost
switch.mg4_front_defrost
switch.mg4_charging
switch.mg4_charging_port_lock

@ad-ha
Copy link
Owner

ad-ha commented Jan 31, 2025

Ok. That's really odd.

Let me try to have a look this night and see if I find the issue and get a quick fix for that.

@SliDeeN
Copy link
Author

SliDeeN commented Jan 31, 2025

For your informatio, I did a rollback to the version 0.8.2 because a lot of features doesn't work (activate/desactivate of air conditioning, heating seat, battery,...)
Now everything work's :

Image

EDIT:
I spoke too soon, the diffrents entities go up well in HA but it's not possible to activate/desactivate it.
Example with the heating seats or the air conditionning.
I don't know if it's worked before.

@ad-ha
Copy link
Owner

ad-ha commented Jan 31, 2025

It should have work. On 0.8.2 I believe it was all fine.

Send me logs if you find any error.

Meanwhile, once I can get a handle at it, I will have a look at the issue with entities and those mix ups.

This was referenced Jan 31, 2025
@ad-ha ad-ha closed this as completed in #102 Feb 1, 2025
@ad-ha ad-ha closed this as completed in 62930bf Feb 1, 2025
@cactusb56
Copy link

Good morning,
I have the same problem on MG ZS EV, here are the logs that I was able to recover

hoping this will help things move forward
_

2025-02-07 18:53:28.067 INFO (MainThread) [custom_components.mg_saic] Heated seat front_left turned on for VIN: LSJW74098NZ247506
2025-02-07 18:53:28.083 DEBUG (MainThread) [custom_components.mg_saic] Scheduling immediate refresh with interval 0:00:15 for VIN: LSJW74098NZ247506.
2025-02-07 18:53:33.179 INFO (MainThread) [custom_components.mg_saic] Heated seat front_right turned on for VIN: LSJW74098NZ247506
2025-02-07 18:53:33.193 DEBUG (MainThread) [custom_components.mg_saic] Scheduling immediate refresh with interval 0:00:15 for VIN: LSJW74098NZ247506.
2025-02-07 18:53:34.637 DEBUG (MainThread) [custom_components.mg_saic] No changes detected in monitored keys or charging status.
2025-02-07 18:53:34.647 DEBUG (MainThread) [custom_components.mg_saic] Action interval active, skipping dynamic interval adjustment.
2025-02-07 18:53:34.647 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Type: BEV
2025-02-07 18:53:34.647 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Info: [VinInfo(bindTime=1683896380000, brandName='MG', colorName='St.Moritz Blue', isActivate=False, isCurrentVehicle=True, isSubaccount=False, modelName='ZS EV', modelYear='2021', name=None, series='ZS EV S', vin='LSJW74098NZ247506', subAccountList=[], vehicleModelConfiguration=[VehicleModelConfiguration(itemCode='J17', itemName='Tire', itemValue='1'), VehicleModelConfiguration(itemCode='Q00', itemName='Airbag', itemValue='1'), VehicleModelConfiguration(itemCode='Q01', itemName='FAirbag', itemValue='0'), VehicleModelConfiguration(itemCode='Q09', itemName='AirbagS', itemValue='0'), VehicleModelConf
iguration(itemCode='S35', itemName='Sunroof', itemValue='3'), 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'), VehicleModelConf
iguration(itemCode='ENGINE', itemName='ENGINE', itemValue='1'), VehicleModelConfiguration(itemCode='EV', itemName='EV', itemValue='0'), VehicleModelConfiguration(itemCode='HeatedSeat', itemName='HeatedSeat', itemValue='0'), Vehi
cleModelConfiguration(itemCode='KEYPOS', itemName='KEYPOS', itemValue='1'), VehicleModelConfiguration(itemCode='ENERGY', itemName='ENERGY', itemValue='1'), VehicleModelConfiguration(itemCode='BATTERY', itemName='BATTERY', itemVa
lue='1'), VehicleModelConfiguration(itemCode='INTEMP', itemName='INTEMP', itemValue='1'), VehicleModelConfiguration(itemCode='EXTEMP', itemName='EXTEMP', itemValue='1'), VehicleModelConfiguration(itemCode='WINDOW', itemName='WIN
DOW', itemValue='0000'), VehicleModelConfiguration(itemCode='LRD', itemName='LRD', itemValue='0'), VehicleModelConfiguration(itemCode='BTKEY', itemName='BTKEY', itemValue='1'), VehicleModelConfiguration(itemCode='BType', itemNam
e='Battery', itemValue='2'), VehicleModelConfiguration(itemCode='SBH', itemName='SBH', itemValue='1'), VehicleModelConfiguration(itemCode='BHI', itemName='BHI', itemValue='0'), VehicleModelConfiguration(itemCode='ROV', itemName=
'ROV', itemValue='25857')])]
2025-02-07 18:53:34.648 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Status: VehicleStatusResp(basicVehicleStatus=BasicVehicleStatus(batteryVoltage=145, bonnetStatus=0, bootStatus=0, canBusActive=1, clstrDspdFuelLvlSgmt=0, currentJourneyId=4731, currentJourneyDistance=20, dippedBeamStatus=0, driverDoor=0, driverWindow=1, engineStatus=0, extendedData1=18, extendedData2=0, exteriorTemperature=3, frontLeftSeatHeatLevel=0, frontLeftTyrePressure=6
5, frontRightSeatHeatLevel=0, frontRightTyrePressure=67, fuelLevelPrc=0, fuelRange=470, fuelRangeElec=470, handBrake=0, interiorTemperature=10, lastKeySeen=30051, lockStatus=1, mainBeamStatus=0, mileage=306370, passengerDoor=0,
passengerWindow=0, powerMode=0, rearLeftDoor=0, rearLeftTyrePressure=66, rearLeftWindow=0, rearRightDoor=0, rearRightTyrePressure=66, rearRightWindow=0, remoteClimateStatus=0, rmtHtdRrWndSt=0, sideLightStatus=0, steeringHeatLeve
l=0, steeringWheelHeatFailureReason=0, sunroofStatus=0, timeOfLastCANBUSActivity=None, vehElecRngDsp=0, vehicleAlarmStatus=2, wheelTyreMonitorStatus=0), extendedVehicleStatus=ExtendedVehicleStatus(alertDataSum=[0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), gpsPosition=GpsPosition(gpsStatus=2, timeStamp=1738
950808, wayPoint=GpsPosition.WayPoint(hdop=6, heading=167, position=GpsPosition.WayPoint.Position(altitude=7, latitude=47585079, longitude=-2703115), satellites=7, speed=0)), statusTime=1738950807)
2025-02-07 18:53:34.648 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Charging Data: ChrgMgmtDataResp(chrgMgmtData=ChrgMgmtData(bmsAdpPubChrgSttnDspCmd=1, bmsAltngChrgCrntDspCmd=0, bmsChrgCtrlDspCmd=2, bmsChrgOtptCrntReq=0, bmsChrgOtptCrntReqV=None, bmsChrgSpRsn=31, bmsChrgSts=8, bmsDsChrgSpRsn=None, bmsEstdElecRng=286, bmsOnBdChrgTrgtSOCDspCmd=7, bmsPackCrnt=20013, bmsPackCrntV=None, bmsPackSOCDsp=175, bmsPackVol=1555, bmsPTCHeatReqDspCmd=0,
bmsPTCHeatResp=None, bmsPTCHeatSpRsn=0, bmsReserCtrlDspCmd=1, bmsReserSpHourDspCmd=14, bmsReserSpMintueDspCmd=0, bmsReserStHourDspCmd=12, bmsReserStMintueDspCmd=0, ccuEleccLckCtrlDspCmd=None, ccuOffBdChrgrPlugOn=None, ccuOnbdChrgrPlugOn=None, chrgngAddedElecRng=None, chrgngAddedElecRngV=None, chrgngDoorOpenCnd=None, chrgngDoorPosSts=None, chrgngRmnngTime=1023, chrgngRmnngTimeV=1, chrgngSpdngTime=None, chrgngSpdngTimeV=None, clstrElecRngToEPT=47, disChr
gngRmnngTime=None, disChrgngRmnngTimeV=None, imcuChrgngEstdElecRng=None, imcuChrgngEstdElecRngV=None, imcuDschrgngEstdElecRng=None, imcuDschrgngEstdElecRngV=None, imcuVehElecRng=None, imcuVehElecRngV=None, onBdChrgrAltrCrntInptC
rnt=None, onBdChrgrAltrCrntInptVol=None), rvsChargeStatus=RvsChargeStatus(chargingDuration=0, chargingElectricityPhase=None, chargingGunState=1, chargingPileID=None, chargingPileSupplier=None, chargingType=3, endTime=1738918035, extendedData1=None, extendedData2=None, extendedData3=None, extendedData4=None, fotaLowestVoltage=None, fuelRangeElec=470, lastChargeEndingPower=201, mileage=306370, mileageOfDay=250, mileageSinceLastCharge=250, powerUsageOfDay
=2916, powerUsageSinceLastCharge=74, realtimePower=127, startTime=0, staticEnergyConsumption=None, totalBatteryCapacity=725, workingCurrent=20013, workingVoltage=1555))
2025-02-07 18:53:34.648 DEBUG (MainThread) [custom_components.mg_saic] State updated: Is Powered On: False, Is Charging: False, Last Powered On Time: 2025-02-07 16:39:45.390415+00:00, Last Powered Off Time: 2025-02-07 17:29:59.429830+00:00, Last Vehicle Activity: 2025-02-07 17:29:59.430562+00:00, Update Interval: 0:00:15
2025-02-07 18:53:34.648 DEBUG (MainThread) [custom_components.mg_saic] Finished fetching MG SAIC data update coordinator data in 6.565 seconds (success: True)
2025-02-07 18:53:34.648 DEBUG (MainThread) [custom_components.mg_saic] Next update scheduled in 0:00:15.

File "/usr/local/lib/python3.13/site-packages/saic_ismart_client_ng/api/base.py", line 200, in __deserialize
raise se
File "/usr/local/lib/python3.13/site-packages/saic_ismart_client_ng/api/base.py", line 174, in __deserialize
raise SaicApiRetryException(
...<3 lines>...
)
saic_ismart_client_ng.exceptions.SaicApiRetryException: return code: 8, message: The remote control instruction failed, please try again later.(59), event_id: 1953436270
2025-02-07 18:54:02.302 ERROR (MainThread) [custom_components.mg_saic] API call failed: return code: 8, message: The remote control instruction failed, please try again later.(59), event_id: 1837028322
2025-02-07 18:54:02.302 ERROR (MainThread) [custom_components.mg_saic] Error controlling heated seats for VIN LSJW74098NZ247506: return code: 8, message: The remote control instruction failed, please try again later.(59), event_id: 1837028322
2025-02-07 18:54:02.303 ERROR (MainThread) [custom_components.mg_saic] Failed to set heating level 'High' for seat frontRight in VIN LSJW74098NZ247506: return code: 8, message: The remote control instruction failed, please try again later.(59), event_id: 1837028322
2025-02-07 18:54:02.303 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547912750352] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/core.py", line 2794, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2837, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
hass, entity, func, data, call.context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 188, in async_handle_select_option
await self.async_select_option(option)
File "/config/custom_components/mg_saic/select.py", line 247, in async_select_option
await self._client.control_heated_seats(
self._vin, left_side_level, level
)
File "/config/custom_components/mg_saic/api.py", line 281, in control_heated_seats
await self._make_api_call(
...<4 lines>...
)
File "/config/custom_components/mg_saic/api.py", line 46, in _make_api_call
return await api_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/saic_ismart_client_ng/api/vehicle/climate/init.py", line 97, in control_heated_seats
return await self.send_vehicle_control_command(body, vin)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/saic_ismart_client_ng/api/vehicle/init.py", line 27, in send_vehicle_control_command
return await self.execute_api_call_with_event_id(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<5 lines>...
)
^
:

@ad-ha
Copy link
Owner

ad-ha commented Feb 7, 2025

LSJW74098NZ247506: return code: 8, message: The remote control instruction failed, please try again later.(59), event_id: 1837028322
2025-02-07 18:54:02.303 ERROR (MainThread) [custom_components.mg_saic] Failed to set heating level 'High' for seat frontRight in VIN LSJW74098NZ247506: return code: 8, message: The remote control instruction failed, please try again later.(59), event_id: 1837028322

That seems to be an issue on the API side and the connection to the car.

@cactusb56
Copy link

LSJW74098NZ247506: return code: 8, message: The remote control instruction failed, please try again later.(59), event_id: 1837028322
2025-02-07 18:54:02.303 ERROR (MainThread) [custom_components.mg_saic] Failed to set heating level 'High' for seat frontRight in VIN LSJW74098NZ247506: return code: 8, message: The remote control instruction failed, please try again later.(59), event_id: 1837028322

That seems to be an issue on the API side and the connection to the car.

Do I understand that it is not possible to activate heated seats because SAIC does not allow remote activation for my vehicle (MG ZS EV2)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants