SonnenladenGmbH / APsystems-EZ1-API-HomeAssistant

The APsystems EZ1 Integration offers a streamlined interface for interacting with the local API of APsystems EZ1 Microinverters using Home Assistant.
MIT License
77 stars 11 forks source link

APSystems EZ1-M inverter with custom port because of NAT #46

Open Lorzware opened 1 month ago

Lorzware commented 1 month ago

Hello, thank you very much for your great work creating this HomeAssistant API integration. I would like to use the HA-integration with multiple APSystems EZ1-M inverters behind a NAT repeater (https://github.com/martin-ger/esp_wifi_repeater) to extend the wifi signal down into the garden. Unfortunately this is currently not possible, because the port 8050 is hard coded and not configurable. Would it be possible to make the port configurable with the default value of 8050? I already tried to find the code for it but didn't manage to get it to work, since this is my first use of home-assistant so far. Keep up the good work!

Lorzware commented 1 month ago

Hello, I butchered something together and it is working now. You can check it out here for now: https://github.com/Lorzware/APsystems-EZ1-API-HomeAssistant_NAT/tree/main I changed the DOMAIN, title, etc. and added the CONF_PORT throughout to have it working next to your official integration in my home assistant instance for testing. I will clean this up and create a pull request in the upcoming days. I hope you are interested in this feature and will integrate in your code base.

Here is also a screenshot of the config flow

APsystems_custom-port_ha-integration
mawoka-myblock commented 1 month ago

Okay. But as the integration will be merged and partly is already, consider creating the PR in the official HA repo if you don't mind.