10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -33,6 +33,11 @@ jobs:
|
|||||||
run: pip install --upgrade platformio
|
run: pip install --upgrade platformio
|
||||||
- name: Install ESPTool
|
- name: Install ESPTool
|
||||||
run: pip install --upgrade esptool
|
run: pip install --upgrade esptool
|
||||||
|
- name: Add version info
|
||||||
|
env:
|
||||||
|
Version: ${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}
|
||||||
|
run: |
|
||||||
|
sed -i "s/unknownbuildnr/$Version (release)/g" src/Config.h
|
||||||
- name: Build PlatformIO Project esp32dev
|
- name: Build PlatformIO Project esp32dev
|
||||||
run: |
|
run: |
|
||||||
pio run --environment esp32dev
|
pio run --environment esp32dev
|
||||||
@@ -96,6 +101,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: esp32solo1-assets
|
name: esp32solo1-assets
|
||||||
path: release/esp32solo1
|
path: release/esp32solo1
|
||||||
|
- name: Add version info
|
||||||
|
env:
|
||||||
|
Version: ${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}
|
||||||
|
run: |
|
||||||
|
sed -i "s/$Version (release)/$Version (debug)/g" src/Config.h
|
||||||
- name: Build PlatformIO Project esp32dev_dbg
|
- name: Build PlatformIO Project esp32dev_dbg
|
||||||
run: |
|
run: |
|
||||||
pio run --environment esp32dev_dbg
|
pio run --environment esp32dev_dbg
|
||||||
|
|||||||
@@ -23,3 +23,5 @@
|
|||||||
#define MQTT_CLEAN_SESSIONS false
|
#define MQTT_CLEAN_SESSIONS false
|
||||||
|
|
||||||
#define GPIO_DEBOUNCE_TIME 200
|
#define GPIO_DEBOUNCE_TIME 200
|
||||||
|
|
||||||
|
#define NUKI_HUB_BUILD "unknownbuildnr"
|
||||||
@@ -66,6 +66,7 @@
|
|||||||
#define mqtt_topic_info_hardware_version "/info/hardwareVersion"
|
#define mqtt_topic_info_hardware_version "/info/hardwareVersion"
|
||||||
#define mqtt_topic_info_firmware_version "/info/firmwareVersion"
|
#define mqtt_topic_info_firmware_version "/info/firmwareVersion"
|
||||||
#define mqtt_topic_info_nuki_hub_version "/info/nukiHubVersion"
|
#define mqtt_topic_info_nuki_hub_version "/info/nukiHubVersion"
|
||||||
|
#define mqtt_topic_info_nuki_hub_build "/info/nukiHubBuild"
|
||||||
#define mqtt_topic_info_nuki_hub_latest "/info/nukiHubLatest"
|
#define mqtt_topic_info_nuki_hub_latest "/info/nukiHubLatest"
|
||||||
#define mqtt_topic_info_nuki_hub_ip "/info/nukiHubIp"
|
#define mqtt_topic_info_nuki_hub_ip "/info/nukiHubIp"
|
||||||
|
|
||||||
|
|||||||
@@ -353,6 +353,7 @@ bool Network::update()
|
|||||||
}
|
}
|
||||||
if (!_versionPublished) {
|
if (!_versionPublished) {
|
||||||
publishString(_maintenancePathPrefix, mqtt_topic_info_nuki_hub_version, NUKI_HUB_VERSION);
|
publishString(_maintenancePathPrefix, mqtt_topic_info_nuki_hub_version, NUKI_HUB_VERSION);
|
||||||
|
publishString(_maintenancePathPrefix, mqtt_topic_info_nuki_hub_build, NUKI_HUB_BUILD);
|
||||||
_versionPublished = true;
|
_versionPublished = true;
|
||||||
}
|
}
|
||||||
_lastMaintenanceTs = ts;
|
_lastMaintenanceTs = ts;
|
||||||
@@ -929,6 +930,23 @@ void Network::publishHASSConfig(char* deviceType, const char* baseTopic, char* n
|
|||||||
{ { (char*)"en", (char*)"true" },
|
{ { (char*)"en", (char*)"true" },
|
||||||
{(char*)"ic", (char*)"mdi:counter"}});
|
{(char*)"ic", (char*)"mdi:counter"}});
|
||||||
|
|
||||||
|
// Nuki Hub build
|
||||||
|
publishHassTopic("sensor",
|
||||||
|
"nuki_hub_build",
|
||||||
|
uidString,
|
||||||
|
"_nuki_hub_build",
|
||||||
|
"Nuki Hub build",
|
||||||
|
name,
|
||||||
|
baseTopic,
|
||||||
|
_lockPath + mqtt_topic_info_nuki_hub_build,
|
||||||
|
deviceType,
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"diagnostic",
|
||||||
|
"",
|
||||||
|
{ { (char*)"en", (char*)"true" },
|
||||||
|
{(char*)"ic", (char*)"mdi:counter"}});
|
||||||
|
|
||||||
if(_preferences->getBool(preference_check_updates))
|
if(_preferences->getBool(preference_check_updates))
|
||||||
{
|
{
|
||||||
// NUKI Hub latest
|
// NUKI Hub latest
|
||||||
@@ -3141,6 +3159,7 @@ void Network::removeHASSConfig(char* uidString)
|
|||||||
removeHassTopic((char*)"sensor", (char*)"firmware_version", uidString);
|
removeHassTopic((char*)"sensor", (char*)"firmware_version", uidString);
|
||||||
removeHassTopic((char*)"sensor", (char*)"hardware_version", uidString);
|
removeHassTopic((char*)"sensor", (char*)"hardware_version", uidString);
|
||||||
removeHassTopic((char*)"sensor", (char*)"nuki_hub_version", uidString);
|
removeHassTopic((char*)"sensor", (char*)"nuki_hub_version", uidString);
|
||||||
|
removeHassTopic((char*)"sensor", (char*)"nuki_hub_build", uidString);
|
||||||
removeHassTopic((char*)"sensor", (char*)"nuki_hub_latest", uidString);
|
removeHassTopic((char*)"sensor", (char*)"nuki_hub_latest", uidString);
|
||||||
removeHassTopic((char*)"update", (char*)"nuki_hub_update", uidString);
|
removeHassTopic((char*)"update", (char*)"nuki_hub_update", uidString);
|
||||||
removeHassTopic((char*)"sensor", (char*)"nuki_hub_ip", uidString);
|
removeHassTopic((char*)"sensor", (char*)"nuki_hub_ip", uidString);
|
||||||
|
|||||||
@@ -1003,9 +1003,6 @@ void WebCfgServer::buildHtml(String& response)
|
|||||||
buildHtmlHeader(response);
|
buildHtmlHeader(response);
|
||||||
|
|
||||||
response.concat("<br><h3>Info</h3>\n");
|
response.concat("<br><h3>Info</h3>\n");
|
||||||
|
|
||||||
String version = NUKI_HUB_VERSION;
|
|
||||||
|
|
||||||
response.concat("<table>");
|
response.concat("<table>");
|
||||||
|
|
||||||
printParameter(response, "Hostname", _hostname.c_str());
|
printParameter(response, "Hostname", _hostname.c_str());
|
||||||
@@ -1071,7 +1068,7 @@ void WebCfgServer::buildHtml(String& response)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printParameter(response, "Firmware", version.c_str(), "/info");
|
printParameter(response, "Firmware", NUKI_HUB_VERSION, "/info");
|
||||||
|
|
||||||
if(_preferences->getBool(preference_check_updates)) printParameter(response, "Latest Firmware", _preferences->getString(preference_latest_version).c_str(), "/ota");
|
if(_preferences->getBool(preference_check_updates)) printParameter(response, "Latest Firmware", _preferences->getString(preference_latest_version).c_str(), "/ota");
|
||||||
|
|
||||||
@@ -1533,6 +1530,9 @@ void WebCfgServer::buildInfoHtml(String &response)
|
|||||||
response.concat("Nuki Hub version: ");
|
response.concat("Nuki Hub version: ");
|
||||||
response.concat(NUKI_HUB_VERSION);
|
response.concat(NUKI_HUB_VERSION);
|
||||||
response.concat("\n");
|
response.concat("\n");
|
||||||
|
response.concat("Nuki Hub build: ");
|
||||||
|
response.concat(NUKI_HUB_BUILD);
|
||||||
|
response.concat("\n");
|
||||||
|
|
||||||
response.concat(debugPreferences.preferencesToString(_preferences));
|
response.concat(debugPreferences.preferencesToString(_preferences));
|
||||||
|
|
||||||
|
|||||||
@@ -253,6 +253,8 @@ void setup()
|
|||||||
|
|
||||||
Log->print(F("Nuki Hub version ")); Log->println(NUKI_HUB_VERSION);
|
Log->print(F("Nuki Hub version ")); Log->println(NUKI_HUB_VERSION);
|
||||||
|
|
||||||
|
Log->print(F("Nuki Hub build ")); Log->println(NUKI_HUB_BUILD);
|
||||||
|
|
||||||
bool firstStart = initPreferences();
|
bool firstStart = initPreferences();
|
||||||
|
|
||||||
initializeRestartReason();
|
initializeRestartReason();
|
||||||
|
|||||||
Reference in New Issue
Block a user