mirror of
				https://github.com/taigrr/tplinkController
				synced 2025-01-18 04:43:13 -08:00 
			
		
		
		
	Add reboot and reset commands
This commit is contained in:
		
							parent
							
								
									629708555c
								
							
						
					
					
						commit
						5ccb2fd24d
					
				
							
								
								
									
										21
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								README.md
									
									
									
									
									
								
							| @ -1,18 +1,25 @@ | |||||||
| # hs100 | # hs100 | ||||||
| 
 | 
 | ||||||
| A small program for flipping TP-Link HS100/HS105/HS110 wi-fi smart plugs on | A tool for using TP-Link HS100/HS105/HS110 wi-fi smart plugs. You can turn | ||||||
| and off. | them on or off, reboot them, and factory reset them. | ||||||
|  | 
 | ||||||
|  | Tested to work on Linux, OSX, IRIX, and Windows under WSL. | ||||||
| 
 | 
 | ||||||
| Loosely based on [pyHS100](https://github.com/GadgetReactor/pyHS100) and | Loosely based on [pyHS100](https://github.com/GadgetReactor/pyHS100) and | ||||||
| [research from softScheck](https://www.softscheck.com/en/reverse-engineering-tp-link-hs110/). | [research from softScheck](https://www.softscheck.com/en/reverse-engineering-tp-link-hs110/). | ||||||
| 
 | 
 | ||||||
| Tested to work on Linux, OSX, and IRIX. |  | ||||||
| 
 |  | ||||||
| ## Usage | ## Usage | ||||||
| ```hs100 <ip of plug> <json command blob>``` |  | ||||||
| 
 | 
 | ||||||
| As a convenience, you can supply the words 'on' or 'off' in place of a json | `hs100 <ip> <command>` | ||||||
| command blob. | 
 | ||||||
|  | Command can be: | ||||||
|  | - `on`: turn the power on | ||||||
|  | - `off`: turn the power off | ||||||
|  | - `reboot`: reboot the plug | ||||||
|  | - `reset-yes-really`: factory reset the plug | ||||||
|  | - 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}}}'` | ||||||
| 
 | 
 | ||||||
| ## Todo | ## Todo | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								hs100.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								hs100.c
									
									
									
									
									
								
							| @ -23,6 +23,14 @@ struct cmd_alias_s cmd_aliases[] = { | |||||||
| 		.alias = "on", | 		.alias = "on", | ||||||
| 		.command = "{\"system\":{\"set_relay_state\":{\"state\":1}}}", | 		.command = "{\"system\":{\"set_relay_state\":{\"state\":1}}}", | ||||||
| 	}, | 	}, | ||||||
|  | 	{ | ||||||
|  | 		.alias = "reboot", | ||||||
|  | 		.command = "{\"system\":{\"reboot\":{\"delay\":0}}}", | ||||||
|  | 	}, | ||||||
|  | 	{ | ||||||
|  | 		.alias = "reset-yes-really", | ||||||
|  | 		.command = "{\"system\":{\"reset\":{\"delay\":0}}}", | ||||||
|  | 	}, | ||||||
| 	{ | 	{ | ||||||
| 		.end = 1, | 		.end = 1, | ||||||
| 	}, | 	}, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user