I am trying to control the Sonoff Basic R3 Home Automation unit.
I can make it work in Windev without issue.
I have copied the code to a cmd button on Windev 24 Express but it does not work.
ws_switch is string = [
{
"deviceid": "1000b8d2be",
"data": {
"switch": "on"
}
}
]
i is int
maReq is a httpRequest
myRep is a httpResponse
HttpVariant is a Variant
maReq..URL = "[
192.168.1.56];
maReq..Header["content-type"] = "application/json"
maReq..Content=ws_switch
maReq..Method=httpPost
myRep = RESTSend(maReq)
What else do I need to do?
Kindest Regards,
Mike