Replies: 4 comments 2 replies
-
The soliscloud_api.py class SoliscloudConfig(PortalConfig): doesn't return the plant_id as a result the API call returns error and doesn't find the inverter. following change fixes the issue ; @Property once this was added, it worked like a charm |
Beta Was this translation helpful? Give feedback.
-
@Property <https://github.com/Property> Thanks for the speedy reply.
I am new to HA and not overly familiar with Python but I have made the
changes and it still doesn't work.
I have a couple of questions:
1. Why has this not been corrected in the latest version on Github (you may
not know the answer but hopefully someone else does)
2. Are these changes required for both Ginlong2 and Solisclound
3..In your code, is """ Key ID.""" correct? Shouldn't it be the plant ID?
4, I assume @Property <https://github.com/Property> was a type and it
should be @Property (the original threw an error)?
My code follows with my changes in RED is it correct?
class SoliscloudConfig(PortalConfig):
""" Portal configuration data """
def __init__(self,
portal_domain: str,
portal_username: str,
portal_key_id: str,
portal_secret: bytes,
portal_plantid: str
) -> None:
super().__init__(portal_domain, portal_username, portal_plantid)
self._key_id: str = portal_key_id
self._plant_id: str = portal_plantid
self._secret: bytes = portal_secret
self._workarounds = {}
try:
with open('/config/custom_components/solis/workarounds.yaml',
'r') as file:
self._workarounds = yaml.safe_load(file)
_LOGGER.debug("workarounds: %s", self._workarounds)
except FileNotFoundError:
pass
@Property
def key_id(self) -> str:
""" Key ID."""
return self._key_id
@Property
def secret(self) -> bytes:
""" API Key."""
return self._secret
@Property
def workarounds(self) -> dict[str, Any]:
""" Return all workaround settings """
return self._workarounds
…On Tue, 25 Apr 2023 at 01:03, himBabbar ***@***.***> wrote:
The soliscloud_api.py class SoliscloudConfig(PortalConfig): doesn't return
the plant_id as a result the API call returns error and doesn't find the
inverter.
following change fixes the issue ;
add this line to the class definition in soliscloud_api.py
self._plant_id: str = portal_plantid
@Property <https://github.com/Property>
def plant_id(self) -> str:
""" Key ID."""
return self._plant_id
once this was added, it worked like a charm
—
Reply to this email directly, view it on GitHub
<#283 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIRNENFKQY6SQ2HRWH4ZB2TXC4IE3ANCNFSM6AAAAAAXKE72W4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I have the same issue. I've tried to add the lines off code like you mentioned, but this doesn't solve the problem for me. |
Beta Was this translation helpful? Give feedback.
-
Sorry but I couldnt get it to work so gave up and used a different add-on |
Beta Was this translation helpful? Give feedback.
-
Tried all combinations but cannot get HA to connect - just keep getting "Cannot login with provided URL and credentials"
I assume Ginlong Plant ID and Soliscloud Station ID are the same 19 digit number? There is a Plant ID on the soliscloud website but it ends with a capital B and that digit cannot be entered.
Are there any error logs I could inspect?
Any help would be greatly appreciated. Thanks
Beta Was this translation helpful? Give feedback.
All reactions