macxq / foxess-ha

Home Assistant & FoxESS integration. Monitor you photovoltaic installation directly from HA ☀️ ⚡️
114 stars 36 forks source link

[FEAUTRE REQUEST] More Stats - Battery, Force Charge, Export to Grid etc. #2

Closed BigManDave closed 2 years ago

BigManDave commented 2 years ago

Good Morning,

Thanks for the work you've put in so far. I was wondering what are the chances on being able to get more info out of this integration? My configuration is solar and battery with force charge and export to grid. So I'd be hoping to get things like Production (kwh), Battery charge (kwh), battery discharge (kwh), grid usage (kwh), grid export (kwh), energy draw (kwh), battery SoC (%), I think.

I'm not a developer but I've had a poke around the API and can see that there are a lot of variables available. The list can be seen using GET https://www.foxesscloud.com/c/v1/device/variables?deviceID=[xxxxx]. However I can only see that these are usable with a POST and a date range. I think there's a limit on how many can be in each POST too.

Would love to hear your feedback. Thanks in advance.

Daibutt commented 2 years ago

@BigManDave If it's any use for you too, I added a couple of template sensors to get the real time PV total and the daily PV total;

These would be analagous to sensor.foxess_solar and sensor.foxess_solar_power respectively.

macxq commented 2 years ago

@Daibutt @BigManDave awesome work 💪 I'm going to close this issue but wondering if you wold like to document your awesome work around energy generation per string as a wiki article - after closing this issue it will be hard to reach here, i think what you did is valuable for the other users 🤓

Daibutt commented 2 years ago

@macxq Yes no problem putting some stuff in a Wiki. I've never created a Github Wiki before. Looking at the instructions I don't seem to have the option to add a new page; image

macxq commented 2 years ago

@Daibutt I have added you as a collaborator you can add wiki pages tight now ;)

Daibutt commented 2 years ago

@macxq Thanks. I have had a go at creating my first Wiki page! The formatting was a bit of a nightmare, but I got something in there! Appreaciate any feedback. @BigManDave, any feedback from you very welcome too.

macxq commented 2 years ago

Thank you 🙇‍♂️ i have fixed the formatting a bit ;)

Daibutt commented 2 years ago

:) Thank you! I couldn't work out how to format the yaml code correctly !

Daibutt commented 2 years ago

Hi @macxq When you get 5 minutes could you update the readme with current entities please? It doesnt include the solar, solar_power, PV1, PV2 etc ones image

Thanks ;)

macxq commented 2 years ago

@Daibutt yes I will do this! thx for bringing this up ;)

macxq commented 2 years ago

@Daibutt doc updated - feel free to add comments to PR https://github.com/macxq/foxess-ha/pull/16

Daibutt commented 2 years ago

Looks good @macxq :)

One very minor thing I spotted, nothing to do with this update. Is this a typo here; image