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

Unexpected output + error when running pyhon while the appliance i running without remote control #22

Closed
arkanoid87 opened this issue Jan 30, 2024 · 1 comment

Comments

@arkanoid87
Copy link

I tried to run pyhon --user <myuser> --pass <mypass> while the appliance (washing machine) was running a program launched manually/physically. Same scenario where the original app shows read-only stats.

I got much longer output, containing multiple ========== <APPLIANCE NAME> ========== sections.
The first section is relevant to my only appliance, containing correct data, but the following sections have multiple different appliance names including AC - *, DW - *, with data replaced with placeholders like PK: xxxx#xx-xxxx-0:0x0xx000-xxxx-0xxx-x00x-x000xx0x00x0 like in export --anonymous mode, but actually not using it.

Then the output is truncated and the following error appears:

Traceback (most recent call last):                                                                                                                                                                                 
  File "/home/arkanoid/python/hon_washing_machine/venv/bin/pyhOn", line 8, in <module>                                                                                                                                 
                                                                                                                                                                                                                   
========== DW - CF 3C7L0X ==========                                                                                                                                                                               
    sys.exit(start())                                                                                                                                                                                              
             ^^^^^^^                                                                                                                                                                                               
  File "/home/arkanoid/python/hon_washing_machine/venv/lib/python3.11/site-packages/pyhon/__main__.py", line 110, in start                                                                                             
    asyncio.run(main())                                                                                                                                                                                            
  File "/home/arkanoid/.pyenv/versions/3.11.5/lib/python3.11/asyncio/runners.py", line 190, in run                                                                                                                     
    return runner.run(main)                                                                                                                                                                                        
           ^^^^^^^^^^^^^^^^                                                                                                                                                                                        
  File "/home/arkanoid/.pyenv/versions/3.11.5/lib/python3.11/asyncio/runners.py", line 118, in run                                                                                                                     
    return self._loop.run_until_complete(task)                                                                                                                                                                     
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                     
  File "/home/arkanoid/.pyenv/versions/3.11.5/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete                                                                                                  
    return future.result()                                                                                                                                                                                         
           ^^^^^^^^^^^^^^^                                                                                                                                                                                         
  File "/home/arkanoid/python/hon_washing_machine/venv/lib/python3.11/site-packages/pyhon/__main__.py", line 105, in main                                                                                              
    print(diagnose.yaml_export(device))                                                                                                                                                                            
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                             
  File "/home/arkanoid/python/hon_washing_machine/venv/lib/python3.11/site-packages/pyhon/diagnose.py", line 93, in yaml_export                                                                                        
    if commands := printer.create_commands(appliance.commands):                                                                                                                                                    
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arkanoid/python/hon_washing_machine/venv/lib/python3.11/site-packages/pyhon/printer.py", line 60, in create_commands
    for parameter, data in command.available_settings.items():
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arkanoid/python/hon_washing_machine/venv/lib/python3.11/site-packages/pyhon/commands.py", line 201, in available_settings
    result[name] = self._more_options(result[name], parameter)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arkanoid/python/hon_washing_machine/venv/lib/python3.11/site-packages/pyhon/commands.py", line 191, in _more_options
    if len(second.values) > len(first.values):
           ^^^^^^^^^^^^^
  File "/home/arkanoid/python/hon_washing_machine/venv/lib/python3.11/site-packages/pyhon/parameter/range.py", line 72, in values
    return [str(i) for i in range(int(self.min), int(self.max) + 1, int(self.step))]
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

running the same command again after the washmachine program finished results in correct output with just a single section.

Andre0512 added a commit that referenced this issue Feb 11, 2024
Andre0512 added a commit that referenced this issue Feb 11, 2024
@Andre0512
Copy link
Owner

Hi, please checkout the latest release, should work now 🙂

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

2 participants