mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-28 17:56:21 +02:00
0.7.23
* merge PR #1056, visualization html * update MqTT library to 1.4.4 * update RF24 library to 1.4.7 * update ArduinoJson library to 6.21.3 * set minimum invervall for `/live` to 5 seconds
This commit is contained in:
parent
fc32ba38a4
commit
3a944d182b
7 changed files with 61 additions and 53 deletions
|
@ -1,5 +1,12 @@
|
|||
# Development Changes
|
||||
|
||||
## 0.7.23 - 2023-08-04
|
||||
* merge PR #1056, visualization html
|
||||
* update MqTT library to 1.4.4
|
||||
* update RF24 library to 1.4.7
|
||||
* update ArduinoJson library to 6.21.3
|
||||
* set minimum invervall for `/live` to 5 seconds
|
||||
|
||||
## 0.7.22 - 2023-08-04
|
||||
* attempt to fix homeassistant auto discovery #1066
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include <Arduino.h>
|
||||
#include <ArduinoJson.h>
|
||||
#include <RF24.h>
|
||||
|
||||
#include "appInterface.h"
|
||||
#include "config/settings.h"
|
||||
|
@ -30,6 +29,8 @@
|
|||
#include "web/web.h"
|
||||
#include "wifi/ahoywifi.h"
|
||||
|
||||
#include <RF24.h> // position is relevant since version 1.4.7 of this library
|
||||
|
||||
// convert degrees and radians for sun calculation
|
||||
#define SIN(x) (sin(radians(x)))
|
||||
#define COS(x) (cos(radians(x)))
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 7
|
||||
#define VERSION_PATCH 22
|
||||
#define VERSION_PATCH 23
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -92,7 +92,7 @@ class HmPayload {
|
|||
yield();
|
||||
}
|
||||
iv->doCalculations();
|
||||
notify(0x0b);
|
||||
notify(0x0b, iv);
|
||||
}*/
|
||||
|
||||
void ivSendHighPrio(Inverter<> *iv) {
|
||||
|
|
|
@ -24,10 +24,10 @@ extra_scripts =
|
|||
|
||||
lib_deps =
|
||||
https://github.com/yubox-node-org/ESPAsyncWebServer
|
||||
nrf24/RF24 @ 1.4.5
|
||||
nrf24/RF24 @ 1.4.7
|
||||
paulstoffregen/Time @ ^1.6.1
|
||||
https://github.com/bertmelis/espMqttClient#v1.4.2
|
||||
bblanchon/ArduinoJson @ ^6.21.2
|
||||
https://github.com/bertmelis/espMqttClient#v1.4.4
|
||||
bblanchon/ArduinoJson @ ^6.21.3
|
||||
https://github.com/JChristensen/Timezone @ ^1.2.4
|
||||
olikraus/U8g2 @ ^2.34.17
|
||||
zinggjm/GxEPD2 @ ^1.5.2
|
||||
|
@ -37,12 +37,12 @@ lib_deps =
|
|||
platform = espressif8266
|
||||
board = esp12e
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags = -D RELEASE -std=gnu++17
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
-DEMC_MIN_FREE_MEMORY=4096
|
||||
;-Wl,-Map,output.map
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
;time ; Add timestamp with milliseconds for each new line
|
||||
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
esp8266_exception_decoder
|
||||
|
||||
|
||||
|
@ -50,21 +50,31 @@ monitor_filters =
|
|||
platform = espressif8266
|
||||
board = esp12e
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags = -D RELEASE -std=gnu++17 -DENABLE_PROMETHEUS_EP
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
-DENABLE_PROMETHEUS_EP
|
||||
-DEMC_MIN_FREE_MEMORY=4096
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
;time ; Add timestamp with milliseconds for each new line
|
||||
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
esp8266_exception_decoder
|
||||
|
||||
[env:esp8266-debug]
|
||||
platform = espressif8266
|
||||
board = esp12e
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags = -DDEBUG_LEVEL=DBG_DEBUG -std=gnu++17 -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_OOM -DDEBUG_ESP_PORT=Serial -DPIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48
|
||||
build_flags =
|
||||
-DDEBUG_LEVEL=DBG_DEBUG
|
||||
-std=gnu++17
|
||||
-DEMC_MIN_FREE_MEMORY=4096
|
||||
-DDEBUG_ESP_CORE
|
||||
-DDEBUG_ESP_WIFI
|
||||
-DDEBUG_ESP_HTTP_CLIENT
|
||||
-DDEBUG_ESP_HTTP_SERVER
|
||||
-DDEBUG_ESP_OOM
|
||||
-DDEBUG_ESP_PORT=Serial
|
||||
-DPIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48
|
||||
build_type = debug
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
|
||||
|
@ -73,18 +83,21 @@ platform = espressif8266
|
|||
board = esp8285
|
||||
board_build.ldscript = eagle.flash.1m64.ld
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags = -D RELEASE -std=gnu++17
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
-DEMC_MIN_FREE_MEMORY=4096
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
|
||||
[env:esp8285-debug]
|
||||
platform = espressif8266
|
||||
board = esp8285
|
||||
board_build.ldscript = eagle.flash.1m64.ld
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags = -DDEBUG_LEVEL=DBG_DEBUG
|
||||
build_flags =
|
||||
-DDEBUG_LEVEL=DBG_DEBUG
|
||||
-DEMC_MIN_FREE_MEMORY=4096
|
||||
-DDEBUG_ESP_CORE
|
||||
-DDEBUG_ESP_WIFI
|
||||
-DDEBUG_ESP_HTTP_CLIENT
|
||||
|
@ -93,38 +106,35 @@ build_flags = -DDEBUG_LEVEL=DBG_DEBUG
|
|||
-DDEBUG_ESP_PORT=Serial
|
||||
build_type = debug
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
|
||||
[env:esp32-wroom32-release]
|
||||
platform = espressif32@6.1.0
|
||||
board = lolin_d32
|
||||
build_flags = -D RELEASE -std=gnu++17
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
build_unflags = -std=gnu++11
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
;time ; Add timestamp with milliseconds for each new line
|
||||
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
esp32_exception_decoder
|
||||
|
||||
[env:esp32-wroom32-release-prometheus]
|
||||
platform = espressif32@6.1.0
|
||||
board = lolin_d32
|
||||
build_flags = -D RELEASE
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
-DENABLE_PROMETHEUS_EP
|
||||
build_unflags = -std=gnu++11
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
;time ; Add timestamp with milliseconds for each new line
|
||||
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
esp32_exception_decoder
|
||||
|
||||
[env:esp32-wroom32-debug]
|
||||
platform = espressif32@6.1.0
|
||||
board = lolin_d32
|
||||
build_flags = -DDEBUG_LEVEL=DBG_DEBUG
|
||||
build_flags =
|
||||
-DDEBUG_LEVEL=DBG_DEBUG
|
||||
-DDEBUG_ESP_CORE
|
||||
-DDEBUG_ESP_WIFI
|
||||
-DDEBUG_ESP_HTTP_CLIENT
|
||||
|
@ -135,7 +145,6 @@ build_flags = -DDEBUG_LEVEL=DBG_DEBUG
|
|||
build_unflags = -std=gnu++11
|
||||
build_type = debug
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
|
||||
|
@ -143,12 +152,11 @@ monitor_filters =
|
|||
platform = espressif32@6.1.0
|
||||
board = esp32-s3-devkitc-1
|
||||
upload_protocol = esp-builtin
|
||||
upload_speed = 115200
|
||||
debug_tool = esp-builtin
|
||||
debug_speed = 12000
|
||||
build_flags = -D RELEASE -std=gnu++17
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
build_unflags = -std=gnu++11
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
time ; Add timestamp with milliseconds for each new line
|
|
@ -184,23 +184,13 @@ class PubMqtt {
|
|||
if(!mClient.connected())
|
||||
return;
|
||||
|
||||
if(addTopic){
|
||||
if(addTopic)
|
||||
snprintf(mTopic, MQTT_TOPIC_LEN + 32 + MAX_NAME_LENGTH + 1, "%s/%s", mCfgMqtt->topic, subTopic);
|
||||
} else {
|
||||
else
|
||||
snprintf(mTopic, MQTT_TOPIC_LEN + 32 + MAX_NAME_LENGTH + 1, "%s", subTopic);
|
||||
}
|
||||
|
||||
do {
|
||||
if(0 != mClient.publish(mTopic, QOS_0, retained, payload))
|
||||
break;
|
||||
if(!mClient.connected())
|
||||
break;
|
||||
#if defined(ESP8266)
|
||||
mClient.loop();
|
||||
#endif
|
||||
yield();
|
||||
} while(1);
|
||||
|
||||
mClient.publish(mTopic, QOS_0, retained, payload);
|
||||
yield();
|
||||
mTxCnt++;
|
||||
}
|
||||
|
||||
|
@ -391,7 +381,7 @@ class PubMqtt {
|
|||
const char *devCls, *stateCls;
|
||||
if (!total) {
|
||||
if (rec->assign[mDiscovery.sub].ch == CH0)
|
||||
snprintf(name, 32, "%s %s", iv->getFieldName(mDiscovery.sub, rec));
|
||||
snprintf(name, 32, "%s", iv->getFieldName(mDiscovery.sub, rec));
|
||||
else
|
||||
snprintf(name, 32, "CH%d_%s", rec->assign[mDiscovery.sub].ch, iv->getFieldName(mDiscovery.sub, rec));
|
||||
snprintf(topic, 64, "/ch%d/%s", rec->assign[mDiscovery.sub].ch, iv->getFieldName(mDiscovery.sub, rec));
|
||||
|
|
|
@ -221,9 +221,11 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
document.getElementById("refresh").innerHTML = obj["refresh"];
|
||||
if(obj.refresh < 5)
|
||||
obj.refresh = 5;
|
||||
document.getElementById("refresh").innerHTML = obj.refresh;
|
||||
if(true == exeOnce) {
|
||||
window.setInterval("getAjax('/api/live', parse)", obj["refresh"] * 1000);
|
||||
window.setInterval("getAjax('/api/live', parse)", obj.refresh * 1000);
|
||||
exeOnce = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue