mirror of
https://github.com/kevinveenbirkenbach/physical-interface.git
synced 2024-11-13 05:41:05 +01:00
Implemented hostname and group check
This commit is contained in:
parent
8527865b9f
commit
e2a19fdc76
@ -5,7 +5,7 @@ String homepage_template(void){
|
||||
"<html>"
|
||||
"<head>"
|
||||
"<meta charset=\"UTF-8\">"
|
||||
"<title>"+String(titel)+"</title>"
|
||||
"<title>"+String(titel)+"("+ String(hostname) +")</title>"
|
||||
"<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css\">"
|
||||
"<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js\"></script>"
|
||||
"<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js\"></script>"
|
||||
|
@ -125,9 +125,9 @@ void controller(void){
|
||||
setIrColor(static_cast<decode_type_t>(server.arg(parameter_ir_type).toInt()),server.arg(parameter_ir_data).toInt(),server.arg(parameter_ir_bits).toInt());
|
||||
}
|
||||
if(isParameterDefined(parameter_plug_id) && isParameterDefined(parameter_plug_status)){
|
||||
if(server.arg(parameter_plug_id)=="0"){
|
||||
if(server.arg(parameter_plug_id)=="group"){
|
||||
setRitterGroup(server.arg(parameter_plug_status).toInt());
|
||||
}else{
|
||||
}else if(server.arg(parameter_plug_id).toInt()>0){
|
||||
setRitterSwitch(server.arg(parameter_plug_id).toInt(),server.arg(parameter_plug_status).toInt());
|
||||
}
|
||||
}
|
||||
@ -195,7 +195,8 @@ void setup(void)
|
||||
delay(500);
|
||||
}
|
||||
Serial.println("Connected to :" + String(ssid));
|
||||
Serial.println("IP address: " + WiFi.localIP());
|
||||
Serial.print("IP address: ");
|
||||
Serial.println(WiFi.localIP());
|
||||
if (mdns.begin(hostname, WiFi.localIP())) {
|
||||
Serial.println("MDNS responder started.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user