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

Is the CLI login with the installer account possible in the future? #21

Open
matzeck opened this issue Nov 14, 2024 · 8 comments
Open

Comments

@matzeck
Copy link

matzeck commented Nov 14, 2024

Hi,
currently it's possible to use pykoplenti CLI with the standard user login.
Are you thinking about, it will also be possible to login with the installer account (with master key and service code) as well?

@stegm
Copy link
Owner

stegm commented Nov 15, 2024

it should already be possible. there was a pr one year ago which was integrated, but I cannot test it by myself

@matzeck
Copy link
Author

matzeck commented Nov 15, 2024

Yes, I found the PR and the functionality was implemented in the lib, but not in the cli (comment from DavidLinner "I didn't touch the CLI though").
Is it easy to implement the installer login support in the cli?

@stegm
Copy link
Owner

stegm commented Nov 23, 2024

Ah, yes. I'll come back to this

@stegm
Copy link
Owner

stegm commented Dec 4, 2024

@matzeck I drafted a branch installer_auth_cli with the installer authentication.

Are you able to try it out? As I have no installer account, I cannot do it.

@matzeck
Copy link
Author

matzeck commented Dec 8, 2024

Hi stegm,
thanks a lot for your adjustments.
I tried it out now... but I got an error (also with the standard login):

Traceback (most recent call last): File "/homeassistant/my_py_venv/.venv/lib/python3.12/site-packages/pykoplenti/cli.py", line 533, in <module> cli(sys.argv[1:], auto_envvar_prefix="PYKOPLENTI") File "/homeassistant/my_py_venv/.venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/my_py_venv/.venv/lib/python3.12/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/homeassistant/my_py_venv/.venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/my_py_venv/.venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/my_py_venv/.venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/my_py_venv/.venv/lib/python3.12/site-packages/click/decorators.py", line 92, in new_func return ctx.invoke(f, obj, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/my_py_venv/.venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/my_py_venv/.venv/lib/python3.12/site-packages/pykoplenti/cli.py", line 489, in read_settings command_main(global_args.host, global_args.port, global_args.passwd, fn) ^^^^^^^^^^^^^^^^^^ AttributeError: 'GlobalArgs' object has no attribute 'passwd'

Do you can find the error with my details or do you need more/other infos?

@stegm
Copy link
Owner

stegm commented Dec 9, 2024

Should be enough. Come back to you. Thanks!

@stegm
Copy link
Owner

stegm commented Dec 11, 2024

Can you try again? Fixed this error.

@matzeck
Copy link
Author

matzeck commented Dec 18, 2024

Hi,
I tested your changes successfully... it works now.
Thanks a lot :-)

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