ad-ha / mg-saic-ha

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

Battery heating switch #16

Closed Johndowne closed 2 weeks ago

Johndowne commented 2 weeks ago

Hi, would it be possible to include the battery heating switch that is available in the iSMART App? I could then make this visible in CarPlay for when I am approaching a Rapid charge point. It would make it much easier that logging onto the App etc. Here i s screen shot of where it is in the App IMG_0406

ad-ha commented 2 weeks ago

Hi @Johndowne

Yes, there is that possibility, but my Marvel does not have that option, so I will not be able to test it. I can add a beta build to add the function, so you may try it and see if it works.

I will let you know once I am able to get it sorted.

Cheers

Johndowne commented 2 weeks ago

Great - I would be happy to try it out. I haven’t quite sorted out CarPlay actions in HA but I know it is possible and I’m sure I will work it out.

ad-ha commented 2 weeks ago

Hi @Johndowne

Can you try this release: https://github.com/ad-ha/mg-saic-ha/releases/tag/0.4.2-b1

On HACS you need to go here:

image

image

Restart HA and check if the switch and services do work. I am not sure about the output as the API is not very well documented on the responses, but it should work.

Let me know. And after if you have the logs, that will be helpful ;)

Johndowne commented 2 weeks ago

Thanks - I will be back at home on Wednesday and will test then. Edit - In fact I managed to do this already and can see the switch . I will try it out later today

Johndowne commented 2 weeks ago

I think the weather / car is too warm at the moment to test this. When I turn it in in the std App it soon turns off again with the message “Battery pack does not need to be heated”. The switch also just resets to OFF in the Beta HA integration - but I am suspicious it has a knock on effect on the Integration as at some point after trying it out I need to “Reload” the integration to get it operational again. I’ve only experienced this after trying the Integration Battery heating switch. I think I need colder weather!

ad-ha commented 2 weeks ago

Hi,

Well, if the behavior on HA is similar to the APP, maybe it's because the car just send the stop heating message and that's why the switch goes back to off, as it detects the heating is off.

From the last release, whenever a service/action is initiated, the integration reloads the data from the vehicle 15 seconds after, to check the status of the command and retrieve any update. Maybe that's the reason why it goes back to off.

For sure the colder weather might help. On top of that, if you have any logs, that will help as well.

Cheers

Johndowne commented 2 weeks ago

I realise this Enhancement is "closed" but you said you would like to see logs. I m not very familiar with dealing with the logs so would you be able to point me to a simple guide of what you would like?

ad-ha commented 2 weeks ago

Hi @Johndowne

Sure, I closed it because I believe the thing is done on the 0.4.2 release and should be working.

Anyhow, you may still share the logs and I will have a look if there's any need to address what's already implemented.

To get the logs, you need to follow this: https://github.com/ad-ha/mg-saic-ha/issues/3#issuecomment-2288824987

Johndowne commented 2 weeks ago

Hopefully this is right….i am on 0.4.2 now MG INTEGRATION.txt

ad-ha commented 2 weeks ago

Thanks for the log @Johndowne

Looking into it, at first glance, this is the "fun" bit of the MG API, this status, for example, bmsPTCHeatReqDspCmd should be 0 or 1, and in your log it has a 2.

Anyhow, it all looks fine to me.

Whenever you can, try to activate the battery heating and send me the logs with those actions, to see the response after activating and after the reschedule update.

Thanks