Commit 39e7a31b authored by Eric Duminil's avatar Eric Duminil
Browse files

AMPEL_PASSWORD instead of HTTP_PASSWORD

parent b4b5658b
Pipeline #5825 passed with stage
in 2 minutes and 31 seconds
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
# define CONFIG_H_INCLUDED # define CONFIG_H_INCLUDED
// This file is a config template, and can be copied to config.h. Please don't save any important password in this template. // This file is a config template, and can be copied to config.h. Please don't save any important password in this template.
// NOTE: Every parameter can be modified and saved later via the web-config.
// Some of those parameters can also be modified via commands in the Serial monitor :
// e.g. 'wifi 0' to turn WiFi off, or 'csv 60' to log data in csv every minute.
/** /**
* SERVICES * SERVICES
...@@ -68,13 +71,14 @@ ...@@ -68,13 +71,14 @@
# define LED_COUNT 12 # define LED_COUNT 12
/** /**
* WEB SERVER * AMPEL PASSWORD
* available at http://local_ip, with user HTTP_USER and password HTTP_PASSWORD * will be used for Access Point (without username), and for web-server available at http://local_ip
* with user 'admin', without quotes.
*/ */
// Define empty strings in order to disable authentication, or remove the constants altogether. // If left empty, the password will be set during the first configuration, via access point.
# define HTTP_USER "co2ampel" // In order to be set successfully, it should have at least 8 characters.
# define HTTP_PASSWORD "my_password" # define AMPEL_PASSWORD ""
/** /**
* MQTT * MQTT
......
...@@ -179,7 +179,7 @@ namespace web_config { ...@@ -179,7 +179,7 @@ namespace web_config {
} }
void initialize() { void initialize() {
iotWebConf = new IotWebConf(ampel.sensorId, &dnsServer, &http, HTTP_PASSWORD, config_version); iotWebConf = new IotWebConf(ampel.sensorId, &dnsServer, &http, AMPEL_PASSWORD, config_version);
iotWebConf->setHtmlFormatProvider(&optionalGroupHtmlFormatProvider); iotWebConf->setHtmlFormatProvider(&optionalGroupHtmlFormatProvider);
...@@ -340,10 +340,6 @@ namespace config { ...@@ -340,10 +340,6 @@ namespace config {
bool &mqtt_encryption = web_config::mqttEncryptionParam.value(); bool &mqtt_encryption = web_config::mqttEncryptionParam.value();
bool &allow_mqtt_commands = web_config::mqttCommandsParam.value(); bool &allow_mqtt_commands = web_config::mqttCommandsParam.value();
// HTTP
// const char *http_user = IOTWEBCONF_ADMIN_USER_NAME; // "admin" by default
// char *http_password = web_config::iotWebConf->getApPasswordParameter()->valueBuffer;
// LORAWAN // LORAWAN
#if defined(ESP32) #if defined(ESP32)
bool is_lorawan_active() { bool is_lorawan_active() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment