feat: added more info about the build to the portal

This commit is contained in:
Yurii
2024-06-15 03:03:31 +03:00
parent 7779076498
commit 76979531b8
5 changed files with 20 additions and 9 deletions

View File

@@ -163,7 +163,7 @@ protected:
// ha helper settings
this->haHelper->setDevicePrefix(settings.mqtt.prefix);
this->haHelper->setDeviceVersion(PROJECT_VERSION);
this->haHelper->setDeviceVersion(BUILD_VERSION);
this->haHelper->setDeviceModel(PROJECT_NAME);
this->haHelper->setDeviceName(PROJECT_NAME);
this->haHelper->setWriter(this->writer);

View File

@@ -82,7 +82,7 @@ protected:
String result;
if (strcmp(var, "ver") == 0) {
result = PROJECT_VERSION;
result = BUILD_VERSION;
}
return result;
@@ -513,8 +513,9 @@ protected:
doc["network"]["gateway"] = isConnected ? network->getStaGateway().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"]["buildEnv"] = BUILD_ENV;
doc["system"]["uptime"] = millis() / 1000ul;
doc["system"]["totalHeap"] = getTotalHeap();
doc["system"]["freeHeap"] = getFreeHeap();

View File

@@ -1,5 +1,4 @@
#define PROJECT_NAME "OpenTherm Gateway"
#define PROJECT_VERSION "1.4.1"
#define PROJECT_REPO "https://github.com/Laxilef/OTGateway"
#define MQTT_RECONNECT_INTERVAL 15000
@@ -23,6 +22,14 @@
#define THERMOSTAT_INDOOR_MIN_TEMP 5
#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
#define USE_SERIAL true
#endif