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

Have to get_devices before get_device #72

Open
majurgens opened this issue Nov 28, 2022 · 2 comments
Open

Have to get_devices before get_device #72

majurgens opened this issue Nov 28, 2022 · 2 comments

Comments

@majurgens
Copy link

majurgens commented Nov 28, 2022

In the example code from the "module ussage" in the readme the flow is 3 basic steps

  1. get session
  2. get all devices
  3. get info about one device

Step 3 uses the device id (eg abcdefg) from Step 2

I assumed that if I already knew the device id eg abcdefg, then I could skip Step 2 and just go straight to Step 3. This proves to be incorrect.

For some reason, you have to list the devices (Step 2) before getting the info from a device, even if you make exactly the same call with exactly the same parameter values at Step 3.

I was hoping that I could skip Step 2 to speed up the process.

Any ideas why Step 2 seems to be required?

@lostfields
Copy link
Owner

the device id in the CLI command is just a reference to a long device guid in the panasonic API. Guess we could use that in the CLI command by updating this library.

@majurgens
Copy link
Author

I guess what I am really trying to do is speed up the commands. For me a command to query a single device takes around 2 seconds. After digging further, this is made up of about 0.5 sec for the login session and then 1.5 seconds for the device query. Looking at this in a packet capture this is mostly waiting for the panasonic cloud to respond.

So perhaps there is actually nothing that we can do since it looks like the panasonic cloud is the slow part

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