feature/InfluxDB-Connection-Update #1

Merged
klaute merged 39 commits from feature/InfluxDB-Connection-Update into master 2022-05-23 17:36:59 +02:00
3 changed files with 8 additions and 7 deletions
Showing only changes of commit e13d72fa2c - Show all commits

View file

@ -20,7 +20,7 @@
#define WIFI_CONFIG_PORTAL_TIMEOUT_S 120
#define UPDATE_SENSOR_INTERVAL_S 300
#define UPDATE_WEBSERVER_INTVERVAL_S 1
#define DELAY_LOOP_MS 50
#define DELAY_LOOP_MS 60
#define POWERSAVING_SLEEP_S 600
#define EMERGENCY_SLEEP_S 172800 // Sleep for 2 days to recover
#define ENERGY_SAVING_ITERATIONS 30

View file

@ -165,7 +165,8 @@ void setup()
//*************************************************************************//
#ifdef BATTERY_POWERED
void criticalBatCheck() {
void criticalBatCheck()
{
float volt = battery_voltage();
if (volt <= BAT_EMERGENCY_DEEPSLEEP_VOLTAGE) {
debug("Bat Voltage: " + String(volt) + " V");
@ -178,7 +179,8 @@ void criticalBatCheck() {
#endif
void loop() {
void loop()
{
#ifdef BATTERY_POWERED
delay(50);
return;
@ -191,7 +193,6 @@ void loop() {
}
#endif
_loop();
//Needed to give WIFI time to function properly

View file

@ -85,11 +85,11 @@ void hb_webstat_send(void)
{
httpServer.send(200, "text/html", hb_ws_msg_start +
hb_ws_msg_temp +
String(_webUpdater_sensValues[SENSOR_TEMPERATURE], 2) +
String(_webUpdater_sensValues[SENSOR_TEMPERATURE], 2) + ", " +
hb_ws_msg_humi +
String(_webUpdater_sensValues[SENSOR_HUMIDITY], 2) +
String(_webUpdater_sensValues[SENSOR_HUMIDITY], 2) + ", " +
hb_ws_msg_light +
String(_webUpdater_sensValues[SENSOR_LIGHT], 2) +
String(_webUpdater_sensValues[SENSOR_LIGHT], 2) + ", " +
hb_ws_msg_windspeed +
String(_webUpdater_sensValues[SENSOR_WINDSPEED], 2) +
hb_ws_msg_end);