homeassistant-alphaESS icon indicating copy to clipboard operation
homeassistant-alphaESS copied to clipboard

AlphaESS Set Battery Charge disable

Open LordBube opened this issue 1 year ago • 6 comments

Hey there, Sometimes I use the "Set battery Charge"-Service at night to charge my battery when the electricity price is really low and when I can anticipate that I will use more electricity the following day. I do that through NodeRed but with the home assistant node and calling the service in the node. Charging the battery works well and I use the following code:

service: alphaess.setbatterycharge
data:
  enabled: true
  cp1start: "02:00"
  cp1end: "05:00"
  cp2start: "00:00"
  cp2end: "00:00"
  chargestopsoc: 100
  serial: XXXXXXXXXXXX (I insert my serial here)

If I understand the code correctly, I need to set "enabled" to false to turn it off. Correct? If so, this does not seem to work. It is still on in the app and also on cloud.alphaess.com. It also charges the battery the following night if I do not turn it off.

Can someone please look into this or point me in the right direction.

Big thanks by the way to @CharlesGillanders for the awesome integration!!!

LordBube avatar Feb 27 '24 20:02 LordBube

Would you mind trying to use the initial letter capitalised as "False" to disable charging - that's the case that python expects.

CharlesGillanders avatar Feb 27 '24 20:02 CharlesGillanders

Thank you for your quick response. Unfortunately, it is still not working after changing it to False :(

LordBube avatar Feb 27 '24 21:02 LordBube

I am also having some related problems. I am trying to change the setbatterycharge times in an automation, but I have found that sometimes it does not work. For example, if 'enabled: false', then it won't change it to 'enabled: true' and as per the example below, if 'enable: true', then it won't change the times to new values. I think it works about half the time.

This is my automation code.

  service: setbatterycharge
  service_data:
    serial: XXXXXXXXXXXXXXX (my serial hidden)
    enabled: true
    cp1start: '12:00'
    cp1end: '15:00'
    cp2start: '00:00'
    cp2end: '00:00'
    chargestopsoc: 100

Notes:

  • only the start and end times (for dp1 and dp2 ) are different to the existing settings
  • the YAML editor forces the 'true' value to be lowercase, even if I write it as 'True'.
  • I am also changing the setbatterydischarge values in the same automation.
  • I didn't see any errors in the logs

wallus avatar Aug 20 '24 05:08 wallus

I am having the same issue here. I'm not 100% sure, but it looks like once it is enabled that it cannot be changed. For example if I manually turn it off, then it seems to be able to be turned on through home assistant, but then any further changes don't work. For example, I experimented with leaving it enabled, but changing the times so it wouldn't charge, but nothing changed. But if I turned it off again (manually) then the new changes would pass through again.

achie188 avatar Sep 10 '24 08:09 achie188

Seems to be a upstream issue? a issue has been made here https://github.com/alphaess-developer/alphacloud_open_api/issues/83

Poshy163 avatar Sep 10 '24 11:09 Poshy163

Good spot, thanks. Seems to be working now, but haven't seen anything communicated about a fix! Hopefully it continues.

Thanks all

achie188 avatar Sep 11 '24 12:09 achie188