goodwe-sems-home-assistant icon indicating copy to clipboard operation
goodwe-sems-home-assistant copied to clipboard

Ability to change server

Open luuks123 opened this issue 1 year ago • 4 comments

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.

luuks123 avatar Mar 21 '23 09:03 luuks123

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.

TimSoethout avatar Mar 21 '23 09:03 TimSoethout

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

luuks123 avatar Mar 21 '23 10:03 luuks123

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

TimSoethout avatar Mar 21 '23 11:03 TimSoethout

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

luuks123 avatar Mar 21 '23 19:03 luuks123