somlioy / amina_s

Zigbee2MQTT external converter for Amina S EV Charger
9 stars 1 forks source link

Charger returns to 32A limit #7

Closed espmas closed 1 week ago

espmas commented 5 months ago

Works well on changing limit for charging current, but after a while it returns to 32A. No log of what is happening.

somlioy commented 5 months ago

I have noticed that a few times as well. In HA history I can see that the charger stops reporting the power and then after a while (almost an hour in my case) it start reporting again, but then the current limit is 32A...

Could this be due bad reception and wether the default behaviour of the charger is to charge at max current if it loses communication with the zigbee coordinator? I have not tested this.

In the Amina Zigbee documentation, there are some attributes regarding the offline behaviour, such as how long delay before offline and what charge current to use. Last time I tested these the charger reported that they are unknown attributes, so they are not implemented in the external converter.

image

Also, I know that the current limit is changed to max if you power cycle the charger.

espmas commented 5 months ago

You are correct, it resets after a disconnection of zigbee. Just happened to me, disconnected just a few seconds.

somlioy commented 5 months ago

I will try to come up with a fix for this when it reconnects ...

bmork commented 5 months ago

wrt the documentation mismatch: which firmware version do you have?

I bought my Amina S a couple of days ago and it had firmware version 1.4.10. The current docs appears to document "Revision C" of the API released in firmware version 1.5.3 and a revision D as wip. There is no record of earlier revisions.

Don't know where to find neither docs corresponding to 1.4.10 nor new firwmare versions. Do you?

espmas commented 5 months ago

How to update firmware: https://doc.clickup.com/9004130215/p/h/8cb07x7-30795/12688a97b1dfa55 (from Amina support)

somlioy commented 5 months ago

@bmork Afaik 1.5.3 is the latest version. Update using the instructions provided by @espmas above.

bmork commented 5 months ago

Thanks, will try that. And that solved another mystery. I wondered about a new BLE device advertising "8d53dc1d-1db7-4cd3-868b-8a527460aa84", which turned out to be "SMP" over BLE. Used by Nordic for firmware updates it seems: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.3/nrf/libraries/bluetooth_services/services/dfu_smp.html

I should probably have noticed that the BLE device name is the serial number of my Amina S....

There is an OTA cluster on endpoint 5. Do you know if they (plan to?) support Zigbee OTA updates too, or is firmware management BLE exclusively?

EDIT: trying not to add more OT comments but wanted to note that the upgrade over BLE worked fine as documented. Was a bit worried when it ended in a GATT_ERROR, but that's probably due to the final reset. Getting z2m to refresh the cached version seems impossible, though. Not that it matters. The "C" revision API works now, so it's definitely running new firmware.

somlioy commented 1 month ago

I have implemented the offline functionality in the updated version in the dev-branch. Getting somewhat different results every time I try it. The charger is accepting the commands but what happens after the connection is lost is not always identical. Sometimes the charging stop and then starts repeatedly, sometimes it returns to the set charge limit after connection is restablished. I've also noticed it returned to maximum charge limite after reconnection ...

I have also noticed that every setting (current limit and offline functionality) is lost after a power cycle.

VVVVVVVip commented 1 month ago

I have also noticed that every setting (current limit and offline functionality) is lost after a power cycle.

Weird, I would expect thoose settings to stick. As an example it could be messy if it restarts without power limit and a power watch is offline. Firmware bug?

somlioy commented 1 month ago

Support said that the values not being remembered was a deliberate choice, but they now realize it’s not practical, so they will release a new firmware update to fix this (apparantly by the end of this week) ...

somlioy commented 1 month ago

This should now be fixed as of Amina firmware 1.8.50 New firmware here: https://doc.clickup.com/9004130215/p/h/8cb07x7-30795/12688a97b1dfa55

The fixes is solved with an "offline functionality" for setting charging behaviour when Zigbee connection is lost, as well as the charger now remembering the settings after a power cycle.