briancmpbll / home_assistant_custom_envoy

171 stars 76 forks source link

Question: how to turn off power production temporarily? #174

Open guido999 opened 7 months ago

guido999 commented 7 months ago

Would it be possible to turn off power production from HA, in case of negative enery prices? I have read some time ago that I would need an installer-Token. My installer is willing to give that to me, but at the moment, I wouldn't know what to do with it.

Thank you for your time and efford!

catsmanac commented 7 months ago

Yes it's technical possible but the function needs to be added to the code. There's no real difference in using a home owner versus an Installer account, same configuration process in HA. But you need to obtain a new token that contains the new authorizations after your account was upgraded (remove/re-add the envoy again in HA). The new token is then used and will allow access to pages that require a installer token. But as mentioned code for this needs to be added.

You may want to check on @vincentwolsink's custom integration that is aimed at installer accounts and offers this and other functions already as I understand it. I don't know how compatible it is with this one for long term history continuation tough.

There is also the new HA Core Enphase Envoy integration which has internally in the pyenphase module the capability to such a thing but this is not yet implemented in the HA core. Asking for the feature there is an option too. Will take probably longer, but history compatibility exists for now.

I don't mind adding it here, but as I'm now active on getting features from here to the new HA Core (3 phase support and grid import/export missing there), so my preference would be to have the feature request over there. I would need more detail on the what and how as well and do some searching for that.