1
0
mirror of https://github.com/taigrr/tplinkController synced 2025-01-18 04:43:13 -08:00

Add scan command for wifi AP scanning

This commit is contained in:
Jason Benaim 2018-11-24 03:15:38 -08:00
parent 8ff3ba7abf
commit 20a06eec3e
2 changed files with 7 additions and 0 deletions

View File

@ -17,6 +17,7 @@ Command can be:
- `off`: turn the power off
- `reboot`: reboot the plug
- `reset-yes-really`: factory reset the plug
- `scan`: scan for nearby wifi APs (probably only 2.4 GHz ones)
- Alternatively, you can supply a JSON string to be sent directly to the
device. Note that the JSON string must be quoted, like so:
`hs100 <ip> '{"system":{"set_relay_state":{"state":1}}}'`

View File

@ -33,6 +33,12 @@ struct cmd_s cmds[] = {
.help = "reboot\t\treboot the plug",
.json = "{\"system\":{\"reboot\":{\"delay\":0}}}",
},
{
.command = "scan",
.help = "scan\t\tscan for nearby wifi APs (probably only 2.4"
" GHz ones)",
.json = "{\"netif\":{\"get_scaninfo\":{\"refresh\":1}}}",
},
{
.end = 1,
},