ldotlopez / ha-ideenergy

ideenergy integration for home-assistant
GNU General Public License v3.0
74 stars 13 forks source link

Sign in isn´t working #64

Open psanchezmejias opened 10 months ago

psanchezmejias commented 10 months ago

Describe the bug User/Pass credentials isn´t working since Jan-13-2024

To Reproduce Steps to reproduce the behavior:

  1. Go to add integration and search for I-DE and select
  2. A context menu is open requesting User/Pass credentials
  3. A log in error pop up is raised in spite the same user/pass credentials are right on the I-DE website.
  4. Changing the User/pass isn´t working too.

Environment

Expected behavior The i-DE Energy Monitor log in should be let the access.

Logs I´ve not able to provide any log since the integration is failing to load. i-DE login failure

ldotlopez commented 10 months ago

It's strange, I can log into my account...

  1. Try this inside your HomeAssistant environment:
python3 -m ideenergy --list-contracts -u username -p password
  1. Check if you can log via www.i-de.es

  2. Even if you can't log-in into ide, HomeAssistant logs may have information, enable debug for ideenergy and custom_components.ideenergy

psanchezmejias commented 10 months ago

Hi Luis,

Looks like some issue isolated on my end. Finally I got the integration working after remove the integration folder from the custom componen path and performing a power off cicle.

Thanks for your quick reply, thanks a million.

Best Pedro.

p4block commented 10 months ago

Same issue on my end. Can't seem to solve it container log:

homeassistant-1  | 2024-01-17 16:09:59.456 ERROR (MainThread) [aiohttp.server] Error handling request
homeassistant-1  | Traceback (most recent call last):
homeassistant-1  |   File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 350, in data_received
homeassistant-1  |     messages, upgraded, tail = self._request_parser.feed_data(data)
homeassistant-1  |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant-1  |   File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
homeassistant-1  | aiohttp.http_exceptions.BadStatusLine: 400, message:
homeassistant-1  |   Invalid method encountered:
homeassistant-1  | 
homeassistant-1  |     b'\x16\x03\x01\x02\x86\x01'
p4block commented 10 months ago

Misteriously worked today after doing nothing on my end

davcolme commented 9 months ago

I can't get it to work for me. I have been testing and I have launched the command indicated above but I cannot log in. I have an advanced user and I can see the data on mobile and on the web.

detex1337 commented 6 months ago

--UPDATE: fixed itself after one day :S

Same issue here, the log says:

/config# python3 -m ideenergy --list-contracts -u username -p password
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/lib/python3.12/site-packages/ideenergy/__main__.py", line 24, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ideenergy/cli.py", line 106, in main
    return asyncio.run(_main())
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ideenergy/cli.py", line 94, in _main
    if data := await get_requested_data():
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ideenergy/cli.py", line 51, in get_requested_data
    contracts = await client.get_contracts()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ideenergy/client.py", line 78, in _wrap
    await client.login()
  File "/usr/local/lib/python3.12/site-packages/ideenergy/client.py", line 208, in login
    raise CommandError(data)
ideenergy.client.CommandError: Command not succesful: {'captcha': 'false'}
2024-05-07 11:10:23.369 ERROR base_events Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f592cda27e0>
2024-05-07 11:10:23.369 ERROR base_events Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f592c7ff9b0>, 1458516.917445211)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f592df30c80>

Maybe is related to the captcha? Command not succesful: {'captcha': 'false'}