drc38 / Fronius_solarweb

Home Assistant integration for cloud-based Fronius Solar.web api
MIT License
5 stars 3 forks source link

Combine with built in integration #278

Open JCalvi opened 1 month ago

JCalvi commented 1 month ago

I currently use the built in Fronius integration and it works well. Occasionally though there may be an issue with something in the chain and my HA data is lost. Examples are, Fronius data logger loses connection, Home assistant is off for a while etc.

Because the inverter stores data, when connection is restored Solar.web catches up this missing data.

A great feature IMHO, would be to combine the two. The Fronius integration for fast updating and local operation, and your integration for filling in missing data from solar.web.

Would it be possible to have you plug-in check for existing data and only add solar.web if missing?

Perhaps it already does, as I have not yet tried both integrations together and your documentation implies to run one or the other only?

drc38 commented 1 month ago

Hi, prior to creating this repo I approached the existing repo owners suggesting the two be combined. They preferred keeping it separate. Happy for you to raise it again with them.

JCalvi commented 1 month ago

I had the same thought, yes it would be perfect if they were combined. I suspected they may not want to change theirs, so thought I'd ask if you would consider changing yours to only update any missing data? This way the existing one is installed to get live data, and your integration if installed as well only adds missing data.

drc38 commented 1 month ago

I don't know how that would work. Happy to review a PR if you've got a workable solution.

farmio commented 1 month ago

Hi 👋!

They preferred keeping it separate.

If I remember correctly, my suggestion was to keep the communication libs (pyfronius and your python-fronius-web) separate as they used a very different tech stack (httpx vs aiohttp, pydantic vs custom parser). I still think this is a good idea so each can individually be updated, tested and be used in other projects.

I do not have any objections to import and use both libraries in the HA core Fronius integration.

That said, the local SolarAPI pyfronius uses does provide historical data as well, however using this endpoint is not implemented currently.

drc38 commented 1 month ago

I'd be happy if it was incorporated into the core HA fronius integration using @farmio's approach, this repo could then be sunset.

farmio commented 1 month ago

Great! @JCalvi are you planning on working on this? I'd be happy to do reviews or answer questions along the way (if I can 🙃).

JCalvi commented 1 month ago

Hi @farmio, no I was just hoping to see some merging of these two projects. Happy to help test, but coding it was not in my plans.