diff --git a/ampel-firmware/config.public.h b/ampel-firmware/config.public.h index 4333280227903ef5c28d143fbd8ef683534100f4..501dcedd3e2b423409e49b9a1fdc018a5d2f6c33 100644 --- a/ampel-firmware/config.public.h +++ b/ampel-firmware/config.public.h @@ -2,6 +2,9 @@ # 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. +// 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 @@ -68,13 +71,14 @@ # define LED_COUNT 12 /** - * WEB SERVER - * available at http://local_ip, with user HTTP_USER and password HTTP_PASSWORD + * AMPEL 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. -# define HTTP_USER "co2ampel" -# define HTTP_PASSWORD "my_password" +// If left empty, the password will be set during the first configuration, via access point. +// In order to be set successfully, it should have at least 8 characters. +# define AMPEL_PASSWORD "" /** * MQTT diff --git a/ampel-firmware/web_config.cpp b/ampel-firmware/web_config.cpp index d646e424bc4d068850ebdf311dc278c19570dc4f..78a894e5bbd41e6d2e79fbc2748c354c4499254f 100644 --- a/ampel-firmware/web_config.cpp +++ b/ampel-firmware/web_config.cpp @@ -179,7 +179,7 @@ namespace web_config { } 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); @@ -340,10 +340,6 @@ namespace config { bool &mqtt_encryption = web_config::mqttEncryptionParam.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 #if defined(ESP32) bool is_lorawan_active() {