guy_c
December 23, 2021, 9:20pm
1
Hi, there are many smart plugs with wifi interface but there dont seems to be any that can be controlled via http, so that an arduino (as opposed yo a phone) would control it by issuing a client request.
Thanks
Juraj
December 24, 2021, 6:42am
2
For Sonnof and other ESP based devices there is an esp8266 Arduino firmware Tasmota.
I control Belkin Wemo with HTTP
/*
void wemoLoop() {
if (state != RegulatorState::REGULATING)
return;
measuredPower = wemoPowerUsage();
}
*/
int wemoSwitch(bool on) {
char response[128];
int res = wemoRequest("basicevent:1", "SetBinaryState", "BinaryState", on ? "1" : "0", response, sizeof(response));
if (res < 0)
return res;
return (response[0] - '0');
}
int wemoPowerUsage() {
char response[128];
int res = wemoRequest("insight:1", "GetInsightParams", "InsightParams", nullptr, response, sizeof(response));
if (res < 0) {
msg.printf("W err %d", res);
This file has been truncated. show original
you can get yourself a SONOFF device ,hack it and upload your custom firmware that's doing what you want
You can easily get many nice things as Web interface, console, OTA. Use this example.
guy_c
January 14, 2022, 8:00am
5
Bought a Shelly plug which is supposed to be controllable by http ur udp and have documented api. Will report here how it went to control it with Arduino
system
Closed
July 13, 2022, 8:00am
6
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.