Skip to content
Snippets Groups Projects
Commit 557475ec authored by Cyril Danilevski's avatar Cyril Danilevski :scooter:
Browse files

Make use of PowerProcedure define IP adress

parent 8fa85fdc
No related branches found
No related tags found
1 merge request!3DEPFET Q2M1 Power Procedure
Pipeline #164888 passed
......@@ -148,7 +148,7 @@ void sendSNMP() {
}
}
auto ipAddr = IPAddress(192, 168, 140, 79);
auto ipAddr = pproc.ipAddr;
if (output != NONE && channel != 0) {
setChannelAndWait(&ipAddr, channel, output);
......@@ -243,13 +243,12 @@ void powerAllOff() {
}
String http_msg = "{\n";
http_msg += "\"arguments\":{";
http_msg += "\"groups\":\"" + groups + "\",";
http_msg += "\"success\":" + String(success);
if (success) {
http_msg += ",\n\"status\":\n";
http_msg += pproc.toJSON();
}
// if (success) {
// http_msg += ",\n\"status\":\n";
// http_msg += pproc.toJSON();
// }
http_msg += "\n}";
restServer.send(success ? 200 : 406, "text/json", http_msg);
......@@ -267,9 +266,8 @@ void pollMPODChannel() {
if (!channel) {
ret = "\"reason\": \"Invalid channel\"";
} else {
auto ipAddr = IPAddress(192, 168, 140, 79);
SNMP::Message *snmp_msg = mpod.read(channel);
snmp.send(snmp_msg, ipAddr, SNMP::Port::SNMP);
snmp.send(snmp_msg, pproc.ipAddr, SNMP::Port::SNMP);
delete snmp_msg;
delay(MPOD_UPDATE_LATENCY);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment