   wm.addParameter(&custom_api_token);
 
   // set static ip
-  IPAddress _ip,_gw,_sn;
-  _ip.fromString(static_ip);
-  _gw.fromString(static_gw);
-  _sn.fromString(static_sn);
-  wifiManager.setSTAStaticIPConfig(_ip, _gw, _sn);
+  // IPAddress _ip,_gw,_sn;
+  // _ip.fromString(static_ip);
+  // _gw.fromString(static_gw);
+  // _sn.fromString(static_sn);
+  // wm.setSTAStaticIPConfig(_ip, _gw, _sn);
 
   //reset settings - wipe credentials for testing
   //wm.resetSettings();

    json["mqtt_port"]   = mqtt_port;
    json["api_token"]   = api_token;

    json["ip"]          = WiFi.localIP().toString();
    json["gateway"]     = WiFi.gatewayIP().toString();
    json["subnet"]      = WiFi.subnetMask().toString();

    File configFile = SPIFFS.open("/config.json", "w");
    if (!configFile) {

          strcpy(mqtt_port, json["mqtt_port"]);
          strcpy(api_token, json["api_token"]);

          // if(json["ip"]) {
          //   Serial.println("setting custom ip from config");
          //   strcpy(static_ip, json["ip"]);
          //   strcpy(static_gw, json["gateway"]);
          //   strcpy(static_sn, json["subnet"]);
          //   Serial.println(static_ip);
          // } else {
          //   Serial.println("no custom ip in config");
          // }

        } else {
          Serial.println("failed to load json config");
