Show latest version on WebCfg
This commit is contained in:
@@ -663,6 +663,11 @@ int Network::mqttConnectionState()
|
|||||||
return _mqttConnectionState;
|
return _mqttConnectionState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String Network::latestHubVersion()
|
||||||
|
{
|
||||||
|
return _latestVersion;
|
||||||
|
}
|
||||||
|
|
||||||
bool Network::encryptionSupported()
|
bool Network::encryptionSupported()
|
||||||
{
|
{
|
||||||
return _device->supportsEncryption();
|
return _device->supportsEncryption();
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ public:
|
|||||||
void publishPresenceDetection(char* csv);
|
void publishPresenceDetection(char* csv);
|
||||||
|
|
||||||
int mqttConnectionState(); // 0 = not connected; 1 = connected; 2 = connected and mqtt processed
|
int mqttConnectionState(); // 0 = not connected; 1 = connected; 2 = connected and mqtt processed
|
||||||
|
String latestHubVersion();
|
||||||
bool encryptionSupported();
|
bool encryptionSupported();
|
||||||
const String networkDeviceName() const;
|
const String networkDeviceName() const;
|
||||||
|
|
||||||
|
|||||||
@@ -612,6 +612,13 @@ void WebCfgServer::buildHtml(String& response)
|
|||||||
printParameter(response, "NUKI Opener state", lockstateArr);
|
printParameter(response, "NUKI Opener state", lockstateArr);
|
||||||
}
|
}
|
||||||
printParameter(response, "Firmware", version.c_str(), "/info");
|
printParameter(response, "Firmware", version.c_str(), "/info");
|
||||||
|
|
||||||
|
String _latestVersion = _network->latestHubVersion();
|
||||||
|
|
||||||
|
//if (_latestVersion.toFloat() > atof(NUKI_HUB_VERSION) || (_latestVersion.toFloat() == atof(NUKI_HUB_VERSION) && _latestVersion.c_str() != NUKI_HUB_VERSION)) {
|
||||||
|
printParameter(response, "Latest Firmware", _latestVersion.c_str(), GITHUB_LATEST_RELEASE_URL);
|
||||||
|
//}
|
||||||
|
|
||||||
response.concat("</table><br><br>");
|
response.concat("</table><br><br>");
|
||||||
|
|
||||||
response.concat("<h3>MQTT and Network Configuration</h3>");
|
response.concat("<h3>MQTT and Network Configuration</h3>");
|
||||||
|
|||||||
Reference in New Issue
Block a user