Skip to content

Instantly share code, notes, and snippets.

@ccimpoi
Created September 7, 2018 11:49
Show Gist options
  • Save ccimpoi/b830c015ab12942bdc4fb6047c776fee to your computer and use it in GitHub Desktop.
Save ccimpoi/b830c015ab12942bdc4fb6047c776fee to your computer and use it in GitHub Desktop.
cmdRes=$(/usr/bin/curl -s --request POST "https://wap.tplinkcloud.com/?token=$TOKEN HTTP/1.1" \
--header "Content-Type: application/json" \
--data @- << REQUEST_BODY
{
"method":"passthrough",
"params": {
"deviceId": "$DEVICE_ID",
"requestData": "{\"system\":{\"get_sysinfo\":null},\"emeter\":{\"get_realtime\":null}}"
}
}
REQUEST_BODY
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment