Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection Error #4

Closed
jangelgon opened this issue Mar 14, 2023 · 3 comments
Closed

Connection Error #4

jangelgon opened this issue Mar 14, 2023 · 3 comments

Comments

@jangelgon
Copy link

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>

@alexandre-leites
Copy link
Contributor

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
Copy link
Owner

Merged, thanks @alexandre-leites 👍

@jangelgon
Copy link
Author

Work's fine with my Dryer
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants