mirror of
				https://github.com/kevinveenbirkenbach/physical-interface.git
				synced 2025-11-04 02:37:58 +00:00 
			
		
		
		
	Implemented hostname and group check
This commit is contained in:
		@@ -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.");
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user