mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 18:54:28 +05:00
feat: added more info about the build to the portal
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
extra_configs = secrets.default.ini
|
extra_configs = secrets.default.ini
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
|
version = 1.4.1
|
||||||
framework = arduino
|
framework = arduino
|
||||||
lib_deps =
|
lib_deps =
|
||||||
bblanchon/ArduinoJson@^7.0.4
|
bblanchon/ArduinoJson@^7.0.4
|
||||||
@@ -33,6 +34,8 @@ build_flags =
|
|||||||
-mtext-section-literals
|
-mtext-section-literals
|
||||||
-D MQTT_CLIENT_STD_FUNCTION_CALLBACK=1
|
-D MQTT_CLIENT_STD_FUNCTION_CALLBACK=1
|
||||||
;-D DEBUG_ESP_CORE -D DEBUG_ESP_WIFI -D DEBUG_ESP_HTTP_SERVER -D DEBUG_ESP_PORT=Serial
|
;-D DEBUG_ESP_CORE -D DEBUG_ESP_WIFI -D DEBUG_ESP_HTTP_SERVER -D DEBUG_ESP_PORT=Serial
|
||||||
|
-D BUILD_VERSION='"${this.version}"'
|
||||||
|
-D BUILD_ENV='"$PIOENV"'
|
||||||
-D USE_SERIAL=${secrets.use_serial}
|
-D USE_SERIAL=${secrets.use_serial}
|
||||||
-D USE_TELNET=${secrets.use_telnet}
|
-D USE_TELNET=${secrets.use_telnet}
|
||||||
-D DEBUG_BY_DEFAULT=${secrets.debug}
|
-D DEBUG_BY_DEFAULT=${secrets.debug}
|
||||||
@@ -53,7 +56,6 @@ monitor_speed = 115200
|
|||||||
monitor_filters = direct
|
monitor_filters = direct
|
||||||
board_build.flash_mode = dio
|
board_build.flash_mode = dio
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
version = 1.4.1
|
|
||||||
|
|
||||||
; Defaults
|
; Defaults
|
||||||
[esp8266_defaults]
|
[esp8266_defaults]
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ protected:
|
|||||||
|
|
||||||
// ha helper settings
|
// ha helper settings
|
||||||
this->haHelper->setDevicePrefix(settings.mqtt.prefix);
|
this->haHelper->setDevicePrefix(settings.mqtt.prefix);
|
||||||
this->haHelper->setDeviceVersion(PROJECT_VERSION);
|
this->haHelper->setDeviceVersion(BUILD_VERSION);
|
||||||
this->haHelper->setDeviceModel(PROJECT_NAME);
|
this->haHelper->setDeviceModel(PROJECT_NAME);
|
||||||
this->haHelper->setDeviceName(PROJECT_NAME);
|
this->haHelper->setDeviceName(PROJECT_NAME);
|
||||||
this->haHelper->setWriter(this->writer);
|
this->haHelper->setWriter(this->writer);
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ protected:
|
|||||||
String result;
|
String result;
|
||||||
|
|
||||||
if (strcmp(var, "ver") == 0) {
|
if (strcmp(var, "ver") == 0) {
|
||||||
result = PROJECT_VERSION;
|
result = BUILD_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -513,8 +513,9 @@ protected:
|
|||||||
doc["network"]["gateway"] = isConnected ? network->getStaGateway().toString() : "";
|
doc["network"]["gateway"] = isConnected ? network->getStaGateway().toString() : "";
|
||||||
doc["network"]["dns"] = isConnected ? network->getStaDns().toString() : "";
|
doc["network"]["dns"] = isConnected ? network->getStaDns().toString() : "";
|
||||||
|
|
||||||
doc["system"]["version"] = PROJECT_VERSION;
|
doc["system"]["buildVersion"] = BUILD_VERSION;
|
||||||
doc["system"]["buildDate"] = __DATE__ " " __TIME__;
|
doc["system"]["buildDate"] = __DATE__ " " __TIME__;
|
||||||
|
doc["system"]["buildEnv"] = BUILD_ENV;
|
||||||
doc["system"]["uptime"] = millis() / 1000ul;
|
doc["system"]["uptime"] = millis() / 1000ul;
|
||||||
doc["system"]["totalHeap"] = getTotalHeap();
|
doc["system"]["totalHeap"] = getTotalHeap();
|
||||||
doc["system"]["freeHeap"] = getFreeHeap();
|
doc["system"]["freeHeap"] = getFreeHeap();
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#define PROJECT_NAME "OpenTherm Gateway"
|
#define PROJECT_NAME "OpenTherm Gateway"
|
||||||
#define PROJECT_VERSION "1.4.1"
|
|
||||||
#define PROJECT_REPO "https://github.com/Laxilef/OTGateway"
|
#define PROJECT_REPO "https://github.com/Laxilef/OTGateway"
|
||||||
|
|
||||||
#define MQTT_RECONNECT_INTERVAL 15000
|
#define MQTT_RECONNECT_INTERVAL 15000
|
||||||
@@ -23,6 +22,14 @@
|
|||||||
#define THERMOSTAT_INDOOR_MIN_TEMP 5
|
#define THERMOSTAT_INDOOR_MIN_TEMP 5
|
||||||
#define THERMOSTAT_INDOOR_MAX_TEMP 30
|
#define THERMOSTAT_INDOOR_MAX_TEMP 30
|
||||||
|
|
||||||
|
#ifndef BUILD_VERSION
|
||||||
|
#define BUILD_VERSION "0.0.0"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BUILD_ENV
|
||||||
|
#define BUILD_ENV "undefined"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef USE_SERIAL
|
#ifndef USE_SERIAL
|
||||||
#define USE_SERIAL true
|
#define USE_SERIAL true
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -87,11 +87,11 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Version:</th>
|
<th scope="row">Version:</th>
|
||||||
<td><b id="version"></b>, core/sdk: <b id="core-version"></b></td>
|
<td><b id="build-version"></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Build date:</th>
|
<th scope="row">Build:</th>
|
||||||
<td><b id="build-date"></b></td>
|
<td>Env: <b id="build-env"></b><br />Date: <b id="build-date"></b><br />Core/SDK: <b id="core-version"></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Uptime:</th>
|
<th scope="row">Uptime:</th>
|
||||||
@@ -155,8 +155,9 @@
|
|||||||
setValue('#network-dns', result.network.dns);
|
setValue('#network-dns', result.network.dns);
|
||||||
setBusy('#main-busy', '#main-table', false);
|
setBusy('#main-busy', '#main-table', false);
|
||||||
|
|
||||||
setValue('#version', result.system.version);
|
setValue('#build-version', result.system.buildVersion);
|
||||||
setValue('#build-date', result.system.buildDate);
|
setValue('#build-date', result.system.buildDate);
|
||||||
|
setValue('#build-env', result.system.buildEnv);
|
||||||
setValue('#uptime', result.system.uptime);
|
setValue('#uptime', result.system.uptime);
|
||||||
setValue('#uptime-days', Math.floor(result.system.uptime / 86400));
|
setValue('#uptime-days', Math.floor(result.system.uptime / 86400));
|
||||||
setValue('#uptime-hours', Math.floor(result.system.uptime % 86400 / 3600));
|
setValue('#uptime-hours', Math.floor(result.system.uptime % 86400 / 3600));
|
||||||
|
|||||||
Reference in New Issue
Block a user