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:
		
							parent
							
								
									8ff3ba7abf
								
							
						
					
					
						commit
						20a06eec3e
					
				| @ -17,6 +17,7 @@ Command can be: | |||||||
| - `off`: turn the power off | - `off`: turn the power off | ||||||
| - `reboot`: reboot the plug | - `reboot`: reboot the plug | ||||||
| - `reset-yes-really`: factory reset 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 | - Alternatively, you can supply a JSON string to be sent directly to the | ||||||
| device. Note that the JSON string must be quoted, like so: | device. Note that the JSON string must be quoted, like so: | ||||||
| `hs100 <ip> '{"system":{"set_relay_state":{"state":1}}}'` | `hs100 <ip> '{"system":{"set_relay_state":{"state":1}}}'` | ||||||
|  | |||||||
							
								
								
									
										6
									
								
								hs100.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								hs100.c
									
									
									
									
									
								
							| @ -33,6 +33,12 @@ struct cmd_s cmds[] = { | |||||||
| 		.help = "reboot\t\treboot the plug", | 		.help = "reboot\t\treboot the plug", | ||||||
| 		.json = "{\"system\":{\"reboot\":{\"delay\":0}}}", | 		.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, | 		.end = 1, | ||||||
| 	}, | 	}, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user