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
  1  
  1  
#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
  1  
  1  
#2
Options
icon

Accessibility Adjustments

icon RESET

Choose the right accessibility profile for you

OFF

Seizure Safe

Eliminates flashes and reduces color

OFF

Cognitive Disability

Assists with reading and focusing

OFF

Vision Impaired

Enhances the website's visuals

OFF

ADHD Friendly

More focus and fewer distractions

Content Adjustments

Adjust Scale

icon
100%
icon

Highlight Title

icon

Highlight Link

icon

Text Magnifier

icon

Readable Font

icon

Adjust Fontsize

icon
100%
icon

Align Center

icon

Adjust LineHeight

icon
100%
icon

Align Left

icon

Adjust LetterSpacing

icon
100%
icon

Align Right

icon

Color Adjustment

Low Saturate

icon

High Saturate

icon

Dark Contrast

icon

Light Contrast

icon

Set Text Colors

Monochrome

icon

Set Title Colors

High Contrast

icon

Set BackgroundColor

Orientation Adjustments

Muted

icon

Hide Images

icon

Read Mode

icon

Stop Animation

icon

Reading Mask

icon

Highlight Hover

icon

Big Black Cursor

mutedicon

Big White Cursor

icon

Hide Video/Audio

icon

Stop Video

icon

Stop Audio

icon

Hide Animation

icon

Reading Guide

icon

Useful Links