Version OK avec Mqtt
This commit is contained in:
32
include/web_config.h
Normal file
32
include/web_config.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
void setup_web_config();
|
||||
void handle_web_config();
|
||||
bool should_save_config();
|
||||
void save_config();
|
||||
void load_config();
|
||||
|
||||
#define CFG_STRLEN 64
|
||||
|
||||
/**
|
||||
* Config struct for EEPROM storage.
|
||||
*/
|
||||
struct ConfigData
|
||||
{
|
||||
char wifi_ssid[CFG_STRLEN]; // Wifi SSID
|
||||
char wifi_pass[CFG_STRLEN]; // Wifi Password
|
||||
char mqtt_server[CFG_STRLEN]; // MQTT Server
|
||||
char mqtt_user[CFG_STRLEN]; // MQTT User
|
||||
char mqtt_pass[CFG_STRLEN]; // MQTT Password
|
||||
char temp_sensor_id[CFG_STRLEN]; // Temperature Sensor ID
|
||||
char mqtt_device_id[CFG_STRLEN]; // MQTT Device ID
|
||||
char mqtt_temp_topic[CFG_STRLEN]; // MQTT Temperature Topic
|
||||
int mqtt_port; // MQTT Port
|
||||
float preset_confort; // Confort Mode Temperature
|
||||
float preset_eco; // Eco Mode Temperature
|
||||
float preset_boost; // Boost Mode Temperature
|
||||
float preset_hors_gel; // Hors Gel Mode Temperature
|
||||
};
|
||||
|
||||
extern ConfigData config;
|
||||
Reference in New Issue
Block a user