globalVars_conf.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. struct confDataSecrets
  2. {
  3. char WiFiPW1[64];
  4. char WiFiPW2[64];
  5. char WiFiAPModePassword[64];
  6. char http_token[31];
  7. char http_user[31];
  8. char http_pass[31];
  9. char http_user1[31];
  10. char http_pass1[31];
  11. char http_user2[31];
  12. char http_pass2[31];
  13. char mqtt_user[31];
  14. char mqtt_pass[31];
  15. // --- 471 bytes
  16. char spare[23];
  17. // --- 494 bytes + 2 bytes size information
  18. // in EEPROM before the actual data => 512 bytes
  19. } confSecrets;
  20. bool confSecrets_wasChanged = false;
  21. // if this struct is changed, encrypt/decrypt functions also have to be modified!
  22. // confDevWiFi
  23. struct confDataDevWiFi
  24. {
  25. char deviceName[33]; // device name - for web interface and AP-Mode SSID
  26. char hostName[33]; // announced hostname on WiFi connection
  27. char WiFiSSID1[33];
  28. //char WiFiPW1[64];
  29. char WiFiSSID2[33];
  30. //char WiFiPW2[64];
  31. char WiFiAPModeSSID[33]; // generated, not set via config
  32. //char WiFiAPModePassword[64];
  33. uint16_t WiFiAPModeTimeout;
  34. uint16_t WiFiRetryInterval;
  35. uint16_t WiFiConnCheckInterval;
  36. uint16_t WiFiRebootOnNoConnect;
  37. bool enableArduinoOTA = false;
  38. } confDevWiFi;
  39. bool confDevWiFi_wasChanged = false;
  40. // confWeb
  41. struct confDataWeb
  42. {
  43. //char http_token[31];
  44. //char http_user[31];
  45. //char http_pass[31];
  46. bool http_user_auth;
  47. //char http_user1[31];
  48. //char http_pass1[31];
  49. //char http_user2[31];
  50. //char http_pass2[31];
  51. bool wConsole;
  52. bool wsConsole;
  53. bool enableOTA = false;
  54. bool FSbrowser = false;
  55. } confWeb;
  56. bool confWeb_wasChanged = false;
  57. // confMqtt
  58. struct confDataMqtt
  59. {
  60. bool mqtt_enable;
  61. char mqtt_server[41];
  62. uint16_t mqtt_port;
  63. //char mqtt_user[31];
  64. //char mqtt_pass[31];
  65. char mqtt_topic_in[51]; // MQTT in topic for commands
  66. char mqtt_topic_out[51]; // MQTT out base topic, will be extended by various value names
  67. char mqtt_willTopic[51]; // MQTT Last Will topic
  68. uint8_t mqtt_willQos; // MQTT Last Will topic QOS
  69. bool mqtt_willRetain; // MQTT Last Will retain
  70. char mqtt_willMsg[31]; // MQTT Last Will payload
  71. char mqtt_connMsg[31];
  72. bool mqtt_outRetain; // send MQTT out with retain flag
  73. bool mqtt_outRetain_sensors; // send MQTT out with retain flag
  74. uint8_t mqtt_outPubInterval;
  75. uint8_t mqtt_outPubInterval_sensors;
  76. bool mqtt_enable_heartbeat;
  77. unsigned int mqtt_heartbeat_maxage_reconnect;
  78. unsigned int mqtt_heartbeat_maxage_reboot;
  79. bool mqtt_reconnect_silent = false;
  80. } confMqtt;
  81. bool confMqtt_wasChanged = false;
  82. // confAdd
  83. struct confDataAdd
  84. {
  85. char mqtt_topic_pir[51];
  86. char mqtt_payload_pir_on[10];
  87. char mqtt_payload_pir_off[10];
  88. char outTemp_topic_in[51];
  89. char outHum_topic_in[51];
  90. } confAdd;
  91. bool confAdd_wasChanged;
  92. #ifdef ENABLE_FEATURE_NTP_TIME
  93. // confTime
  94. struct confDataTime
  95. {
  96. bool ntpEnable;
  97. char timeZoneStr[50];
  98. char ntpServer1[31];
  99. char ntpServer2[31];
  100. unsigned long ntpSyncInterval;
  101. } confTime;
  102. bool confTime_wasChanged;
  103. #endif
  104. // confLog
  105. struct confDataLog
  106. {
  107. uint8_t logLevelSerial;
  108. uint8_t logLevelWeb;
  109. uint8_t logLevelMqtt;
  110. uint8_t logLevelSyslog;
  111. bool logWebRequests;
  112. } confLog;
  113. bool confLog_wasChanged;
  114. // confDisplay
  115. struct confDataDisplay
  116. {
  117. uint16_t displayInterval; // interval for display updates (if out-temp is
  118. // active, display will toggle in this interval)
  119. uint16_t displayTimeout; // display timeout after keypress (illumination)
  120. bool PIRenablesDisplay = false;
  121. } confDisplay;
  122. bool confDisplay_wasChanged;
  123. // confSens
  124. struct confDataSens
  125. {
  126. uint16_t measureInterval; // interval for temp/hum measurement
  127. uint8_t oneWireDevAddress[4][8]; // reserve space for up to 4 onewire addresses
  128. float DHT_tempCorrVal; // correction value for
  129. // temperature sensor reading
  130. int DHT_humCorrVal; // correction value for humidity sensor reading
  131. bool DHT_enable;
  132. } confSens;
  133. bool confSens_wasChanged = false;