TimSoethout / goodwe-sems-home-assistant

Sensor for Home Assistant pulling data from the GoodWe SEMS API for solar panel production metrics.
87 stars 35 forks source link

Ability to change server #82

Open luuks123 opened 1 year ago

luuks123 commented 1 year ago

Is it possible to use another server of Semsportal, us.semsportal.com for example ?

It always connects to eu.semsportal.com, but that isnt working in my case. I want to use us.semsportal.com because that one is working fine.

TimSoethout commented 1 year ago

Easiest way is to change the hardcoded URL in the source code in your custom_components directory. The component does not support changing this via configuration currently.

luuks123 commented 1 year ago

I have tried that, but it didnt work.

i changed the url and rebooted HA but it keeps connecting to eu.semsportal.com, is there something i'm doing wrong ?

changed in sems_api.py the following rules:

# _LoginURL = "https://us.semsportal.com/api/v2/Common/CrossLogin" _LoginURL = "https://us.semsportal.com/api/v2/Common/CrossLogin" _PowerStationURLPart = "/v2/PowerStation/GetMonitorDetailByPowerstationId" _RequestTimeout = 30 # seconds

TimSoethout commented 1 year ago

That is what I would expect to work indeed. Does it show the eu URLs in the debug logs?

luuks123 commented 1 year ago

De debug log says it still connects to eu.semsportal.com,