Set_relay_state no longer working

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.

Set_relay_state no longer working

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
Set_relay_state no longer working
Set_relay_state no longer working
2022-10-29 15:27:45 - last edited 2022-10-31 01:25:08
Model: EP10  
Hardware Version: V1
Firmware Version: 1.0.2

For years I've managed my switches via HTTP, but a few days ago I started getting HTTP/1.1 400 BAD_Request.

Example:

 

curl.exe --insecure --request POST "https://wap.tplinkcloud.com?token=%A% HTTP/1.1" -d @e:\ManageIT\LoveON.json --header "Content-Type: application/json"

 

Where %A% is the KasaToken and the JSON file is

 

{"method":

"passthrough",
"params": {
"deviceId": "DEVICEID",
"requestData":"{\"system\":{\"set_relay_state\":{\"state\":1}}}"
 }
}

 

I can still pull status from all my Kasa Devices, but can no longer turn them off or on using the above. Tried several different things, but figured I'd ask for help since I'm shooting in the dark at this point. I am using an old curl.exe as the new one ends up with security issues.

 

Thanks

  0      
  0      
#1
Options
1 Accepted Solution
Re:Set_relay_state no longer working -Solution
2022-10-30 13:13:24 - last edited 2022-10-31 01:25:08

  @RichardO Found the fix. Changed HTTP/1.1 to HTTP/2.1

Recommended Solution
  3  
  3  
#2
Options
1 Reply
Re:Set_relay_state no longer working -Solution
2022-10-30 13:13:24 - last edited 2022-10-31 01:25:08

  @RichardO Found the fix. Changed HTTP/1.1 to HTTP/2.1

Recommended Solution
  3  
  3  
#2
Options

Information

Helpful: 0

Views: 324

Replies: 1

Related Articles