Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I am using the CLI. I can't find a way to control a socket on an HS300 strip.
--child doesn't work nor does --index.
I want to check the state and turn on if a socket is off.

Any ideas?

You must be logged in to vote

Replies: 4 comments · 2 replies

Comment options

Which version of the cli are you using? #1020 was merged into master yesterday which makes handling child devices simpler to use and consistent across commands. Although previously --index should have worked with the on and off commands so it would be helpful to paste the command you are using if you still have issues with the latest master.

You must be logged in to vote
2 replies
@JGrana01
Comment options

Thanks for the quick reply! I'm on kasa version 0.7.0.2

Here is the command I tried:
kasa --host 192.168.1.96 --child 80063ADA9F449E4742D06E363053EA9E222690A005 state

Here is kasa response:

Usage: kasa [OPTIONS] COMMAND [ARGS]...
Try 'kasa --help' for help.

Error: No such option: --child Did you mean --help?

I also tried with index:
kasa --host 192.168.1.96 --index 6 on

Response:
Usage: kasa [OPTIONS] COMMAND [ARGS]...
Try 'kasa --help' for help.

Error: No such option: --index

@sdb9696
Comment options

So the --index and --name parameters need to go after the command you want to apply them too, i.e.

kasa --host 192.168.1.96 on --index 6

That's why they're only listed when you do kasa on --help and not kasa --help

Comment options

Worked like a charm - many thanks. Any chance you guys will support --index with the state command?

You must be logged in to vote
0 replies
Comment options

Yes we do in the latest master branch. If you want an easier way to extract the current state though try kasa feature state (plus the other usual options) which will limit the output to just the on/off state.

You must be logged in to vote
0 replies
Comment options

The placement of the option is at times annoying (e.g., when you want to just add --debug), so I'm wondering if we should look into adding the main group's options to all commands? The only concern I can think of is how to handle conflicts, if there are any?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.