datMaffin / homebridge-tesla-powerwall

Homebridge Plugin for the Tesla Powerwall
ISC License
21 stars 11 forks source link

Feature request - set Powerwall battery reserve percentage #37

Open ibmaster opened 2 years ago

ibmaster commented 2 years ago

Is it possible to add the plugin feature to set the Powerwall battery reserve percentage, as exposed by the API?

Thank you

datMaffin commented 2 years ago

Hm. It does look possible. I am, however, not sure when I would try to implement this. (Probably not in the near future.)

The relevant API seems to be documented here: https://github.com/vloschiavo/powerwall2#apioperation

It would be easier to implement if the mode field could be left out. Otherwise, one probably would need to first fetch the current mode to make sure it stays the same.

datMaffin commented 2 years ago

I just noticed that this overlaps with #15

15 is a pretty old issue and I believe that the authentication I talk of in this issue is nowadays mandatory for everything. Authentication is already implemented. I.e., there should not be any "additional" authentication implementation stuff required.

ibmaster commented 2 years ago

Thanks, such a feature would be great. Currently I see a HomeKit device for the Powerwalls' current battery percentage as a ‘Light' device and ‘Brightness' value. Was thinking that maybe the same HomeKit device could be used to “set” the reserve percentage when writing to/changing the Brightness value?

On Feb 7, 2022, at 2:56 PM, Marvin Dostal @.***> wrote:

I just noticed that this overlaps with #15 https://github.com/datMaffin/homebridge-tesla-powerwall/issues/15

15 https://github.com/datMaffin/homebridge-tesla-powerwall/issues/15 is a pretty old issue and I believe that the authentication I talk of in this issue is nowadays mandatory for everything. I.e., there should not be any "additional" authentication implementation stuff required.

— Reply to this email directly, view it on GitHub https://github.com/datMaffin/homebridge-tesla-powerwall/issues/37#issuecomment-1032018197, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWC2EB4IGN3TW5EPLDA5ITU2BE3HANCNFSM5NDFETEA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

shanpinkoh commented 2 years ago

My utility rate is lower on nights and weekends. My Powerwall isn't enough to cover usage at night. I also have an EV so would not want to drain the battery charging the EV. One automation idea is for setting the Reserve % to a high value so it pulls from the grid, and reset back to a lower value towards the morning so that I use battery just as the sun is about to come up.

gdotp01 commented 2 years ago

I must say that adding this feature would be AWSOME. As much as I’d like the powerwall algorithm to be clever enough it sometime needs some help in winter to help it manually charge from the grid and setting this percentage would allow this from within HomeKit

gmcluhan commented 10 months ago

I would REALLY like this feature too, right now I'm using a Python script with a cron job to change my power wall to 100% reserve so I can change my car from the grid and not kill my batteries. With this feature in this plugin I could move to HomeKit controlling this!

gdotp01 commented 10 months ago

@gmcluhan hi. This can be done in Home assistant. There is a powerwall plugin called Tesla Custom Integration that allows some control. I use home assistant automations to do exactly that.