solidfox / solidfox/sigenergy-cloud

Unexpected Sigenergy Cloud token response: {'code': 11003, 'msg': 'authentication failed', 'data': None}

Open
#3 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Hi.

I have this simple program based on your example:

import asyncio

from sigenergy_cloud import SigenergyCloudClient

async def async_main():
    client = SigenergyCloudClient(username="[REDACTED]", password="[REDACTED]", region="apac")
    try:
        await client.connect()

        flow = await client.energy_flow()
        mode = await client.current_operational_mode()

        print(f"Energy Flow: {flow}")
        print(f"Operational Mode: {mode}")
    finally:
        await client.close()


if __name__ == "__main__":
    asyncio.run(async_main())

It always throws this error:

Traceback (most recent call last):
  File "/root/repositories/seud0nym/sigenergy2mqtt/tests/utils/cloud_test.py", line 21, in <module>
    asyncio.run(async_main())
    ~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/root/.local/share/uv/python/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/asyncio/runners.py", line 205, in run
    return runner.run(main)
           ~~~~~~~~~~^^^^^^
  File "/root/.local/share/uv/python/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/asyncio/runners.py", line 128, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/root/.local/share/uv/python/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/asyncio/base_events.py", line 720, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/root/repositories/seud0nym/sigenergy2mqtt/tests/utils/cloud_test.py", line 9, in async_main
    await client.connect()
  File "/root/repositories/seud0nym/sigenergy2mqtt/.venv/lib/python3.14/site-packages/sigenergy_cloud/client.py", line 67, in connect
    await self._auth.authenticate(
    ...<4 lines>...
    )
  File "/root/repositories/seud0nym/sigenergy2mqtt/.venv/lib/python3.14/site-packages/sigenergy_cloud/auth.py", line 82, in authenticate
    self._tokens = await self._request_token(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<8 lines>...
    )
    ^
  File "/root/repositories/seud0nym/sigenergy2mqtt/.venv/lib/python3.14/site-packages/sigenergy_cloud/auth.py", line 131, in _request_token
    raise error_type(f"Unexpected Sigenergy Cloud token response: {payload!r}")
sigenergy_cloud.errors.SigenergyCloudAuthError: Unexpected Sigenergy Cloud token response: {'code': 11003, 'msg': 'authentication failed', 'data': None}

I have double checked that the region is correct and that the credentials work on the mySigen web app (https://app-aus.sigencloud.com/). The same username/password also works on the Developer Portal.

I also tried your HACS integration, and I get Invalid username or password when trying to initially connect.

Do you have any idea why I can't connect?

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the example in tests/utils/cloud_test.py, then read sigenergy_cloud/client.py and sigenergy_cloud/auth.py, especially authenticate and _request_token. Compare the reported token payload with the credentials and region used against the mySigen web app. Done means identifying why valid credentials receive code 11003 and adding a verified fix or documenting the required authentication details.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.