barry-scott / prometheus-givenergy

prometheus exporter for GivEnergy inverter metrics
Apache License 2.0
1 stars 2 forks source link

Docker support #1

Open FileGo opened 11 months ago

FileGo commented 11 months ago

This looks promising, as I'm trying to migrate away from givenergy_local due to pymodbus incompatibilities with SolarEdge integration, that is preventing me to install a recent version of HA.

Would there be any chance to add Docker support for this?

barry-scott commented 10 months ago

Can't you build a python venv with this package in it for your needs? Why is a Docker container necessary?

For my use case I do not need a container to run the code. On Fedora I install an RPM with this package into the system.

I would be willing to add docs that show how to build a container if you can provide a PR with the details.

Given how quirky the GivEnergy implementation is I suspect that a SolarEdge version of the code would need to use a different set of register definitions.

FileGo commented 10 months ago

A lot of people (including myself) use Dockerized services, as you no longer have to worry about dependency hell. I know venv tries to solve this, but Docker is still way more practical.

I know SolarEdge registers are different, the issue I am facing with is that givenergy_local uses an outdated version of pymodbus, while the SolarEdge integration uses a more recent ones, and I can't get both integrations to run concurrently on latest version of HA, as the dependencies break.

I'll try to work on a PR to get this into Docker, as that would really work great with my use case. Thanks for all the work so far.

barry-scott commented 10 months ago

Suggest that you put the files into a contrib folder please.

I can test your PR with podman on Fedora (Docker does not work on Fedora for Docker sad reasons).