Connection Error #4

Closed
opened 2023-03-14 12:35:22 +01:00 by jangelgon · 3 comments
jangelgon commented 2023-03-14 12:35:22 +01:00 (Migrated from github.com)

It worked for me in the first versions, but it stopped working from version 2.X, I am currently using the integration "https://github.com/gvigroux/hon", but it works worse than yours.

I have a Candy dryer connected to hOn

I have tried with pyhOn and it always gives me connection errors.

Traceback (most recent call last):
File "/home/jangelgon/.local/bin/pyhOn", line 8, in
sys.exit(start())
File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/main.py", line 108, in start
asyncio.run(main())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/main.py", line 90, in main
async with HonConnection(user, password) as hon:
File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/api.py", line 29, in aenter
await self.setup()
File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/api.py", line 60, in setup
await asyncio.gather(*[
File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/device.py", line 116, in load_commands
await self._recover_last_command_states(commands)
File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/device.py", line 95, in _recover_last_command_states
for key, data in command.settings.items():
File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/commands.py", line 70, in settings
return {s: self._parameters[s] for s in self.setting_keys}
File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/commands.py", line 70, in
return {s: self._parameters[s] for s in self.setting_keys}
KeyError: 'remainingTimeMM'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fec927dbee0>
Unclosed connector
']
connector: <aiohttp.connector.TCPConnector object at 0x7fec927dbfa0>

It worked for me in the first versions, but it stopped working from version 2.X, I am currently using the integration "https://github.com/gvigroux/hon", but it works worse than yours. I have a Candy dryer connected to hOn I have tried with pyhOn and it always gives me connection errors. Traceback (most recent call last): File "/home/jangelgon/.local/bin/pyhOn", line 8, in <module> sys.exit(start()) File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/__main__.py", line 108, in start asyncio.run(main()) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/__main__.py", line 90, in main async with HonConnection(user, password) as hon: File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/api.py", line 29, in __aenter__ await self.setup() File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/api.py", line 60, in setup await asyncio.gather(*[ File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/device.py", line 116, in load_commands await self._recover_last_command_states(commands) File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/device.py", line 95, in _recover_last_command_states for key, data in command.settings.items(): File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/commands.py", line 70, in settings return {s: self._parameters[s] for s in self.setting_keys} File "/home/jangelgon/.local/lib/python3.10/site-packages/pyhon/commands.py", line 70, in <dictcomp> return {s: self._parameters[s] for s in self.setting_keys} KeyError: 'remainingTimeMM' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7fec927dbee0> Unclosed connector '] connector: <aiohttp.connector.TCPConnector object at 0x7fec927dbfa0>
alexandre-leites commented 2023-03-14 14:34:43 +01:00 (Migrated from github.com)

I think my PR #5 will also fix your issue as its very similar to mine.
Wait for the approval and release to test again.

I think my PR #5 will also fix your issue as its very similar to mine. Wait for the approval and release to test again.
Andre0512 commented 2023-03-14 19:17:24 +01:00 (Migrated from github.com)

Merged, thanks @alexandre-leites 👍

Merged, thanks @alexandre-leites :+1:
jangelgon commented 2023-03-15 09:21:35 +01:00 (Migrated from github.com)

Work's fine with my Dryer
Thanks

Work's fine with my Dryer Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xiconfjs/pyhOn#4
No description provided.