diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 142464e6e..6c21ec375 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -4,47 +4,48 @@ ## Added -- Add system commands for syslog level and watch [#98] -- Added pool data to telegrams 0x494 & 0x495 [#102] -- Add RC300 second summermode telegram [#108] -- Add support for the RC25 thermostat [#106] -- Add new command 'entities' for a device, e.g. http://ems-esp/api/boiler/entities to show the shortname, description and HA Entity name (if HA enabled) [#116] +- Add system commands for syslog level and watch [#98](https://github.com/emsesp/EMS-ESP32/issues/98) +- Added pool data to telegrams 0x494 & 0x495 [#102](https://github.com/emsesp/EMS-ESP32/issues/102) +- Add RC300 second summermode telegram [#108](https://github.com/emsesp/EMS-ESP32/issues/108) +- Add support for the RC25 thermostat [#106](https://github.com/emsesp/EMS-ESP32/issues/106) +- Add new command 'entities' for a device, e.g. http://ems-esp/api/boiler/entities to show the shortname, description and HA Entity name (if HA enabled) [#116](https://github.com/emsesp/EMS-ESP32/issues/116) - Support for Junkers program and remote (fb10/fb110) temperature -- Home Assistant `state_class` attribute for Wh, kWh, W and KW [#129] -- Add current room influence for RC300 [#136] +- Home Assistant `state_class` attribute for Wh, kWh, W and KW [#129](https://github.com/emsesp/EMS-ESP32/issues/129) +- Add current room influence for RC300 [#136](https://github.com/emsesp/EMS-ESP32/issues/136) - Added Home Assistant device_class to sensor entities -- Added another Buderus RC10 thermostat with Product ID 65 [#160] -- Added support for mDNS [#161] +- Added another Buderus RC10 thermostat with Product ID 65 [#160](https://github.com/emsesp/EMS-ESP32/issues/160) +- Added support for mDNS [#161](https://github.com/emsesp/EMS-ESP32/issues/161) - Added last system ESP32 reset code to log (and `system info` output) -- Firmware Checker in WebUI [#168] +- Firmware Checker in WebUI [#168](https://github.com/emsesp/EMS-ESP32/issues/168) - Added new MQTT setting for enabling 'response' topic -- Support for non-standard Thermostats like Tado [#174] +- Support for non-standard Thermostats like Tado [#174](https://github.com/emsesp/EMS-ESP32/issues/174) - Include MQTT connection status in 'api/system/info' +- Include Network status in 'api/system/info' and also the MQTT topic `info` [#202](https://github.com/emsesp/EMS-ESP32/issues/202) ## Fixed -- MQTT reconnecting after WiFi reconnect [#99] -- Manually Controlling Solar Circuit [#107] -- Fix thermostat commands not defaulting to the master thermostat [#110] +- MQTT reconnecting after WiFi reconnect [#99](https://github.com/emsesp/EMS-ESP32/issues/99) +- Manually Controlling Solar Circuit [#107](https://github.com/emsesp/EMS-ESP32/issues/107) +- Fix thermostat commands not defaulting to the master thermostat [#110](https://github.com/emsesp/EMS-ESP32/issues/110) - Enlarge parse-buffer for long names like `cylinderpumpmodulation` -- MQTT not subscribing to all device entities [#166] -- Help fix issues with WebUI unable to fully load UI over Ethernet [#177] +- MQTT not subscribing to all device entities [#166](https://github.com/emsesp/EMS-ESP32/issues/166) +- Help fix issues with WebUI unable to fully load UI over Ethernet [#177](https://github.com/emsesp/EMS-ESP32/issues/177) - Shower alert never reset after limit reached when enabled [(PR #185)] -- Remove HA entity entries when a device value goes dormant [#196] +- Remove HA entity entries when a device value goes dormant [#196](https://github.com/emsesp/EMS-ESP32/issues/196) ## Changed -- Syslog BOM only for utf-8 messages [#91] -- Check for KM200 by device-id 0x48, remove tx-delay [#90] -- rename `fastheatupfactor` to `fastheatup` and add percent [#122] +- Syslog BOM only for utf-8 messages [#91](https://github.com/emsesp/EMS-ESP32/issues/91) +- Check for KM200 by device-id 0x48, remove tx-delay [#90](https://github.com/emsesp/EMS-ESP32/issues/90) +- rename `fastheatupfactor` to `fastheatup` and add percent [#122](https://github.com/emsesp/EMS-ESP32/issues/122) - "unit" renamed to "uom" in API call to recall a Device Value - initial backend React changes to replace the class components (HOCs) with React Hooks - Use program-names instead of numbers - Boiler's maintenancemessage always published in MQTT (to prevent HA missing entity) - Unit of Measure 'times' added to MQTT Fails, Rx fails, Rx received, Tx fails, Tx reads & Tx writes - Improved API. Restful HTTP API works in the same way as MQTT calls -- Removed settings for MQTT subscribe format [#173] -- Improve moduline 200 functionality [#183] +- Removed settings for MQTT subscribe format [#173](https://github.com/emsesp/EMS-ESP32/issues/173) +- Improve Nefit Moduline 200 functionality [#183](https://github.com/emsesp/EMS-ESP32/issues/183) ## **BREAKING CHANGES** diff --git a/src/device_library.h b/src/device_library.h index 11884f4e8..3b4ab0b60 100644 --- a/src/device_library.h +++ b/src/device_library.h @@ -69,7 +69,7 @@ {202, DeviceType::THERMOSTAT, F("Logamatic TC100/Moduline Easy"), DeviceFlags::EMS_DEVICE_FLAG_EASY | DeviceFlags::EMS_DEVICE_FLAG_NO_WRITE}, // 0x18, cannot write {203, DeviceType::THERMOSTAT, F("EasyControl CT200"), DeviceFlags::EMS_DEVICE_FLAG_EASY | DeviceFlags::EMS_DEVICE_FLAG_NO_WRITE}, // 0x18, cannot write -// Thermostat - Buderus/Nefit/Bosch specific - 0x17 / 0x10 / 0x18 / 0x19 / 0x38 +// Thermostat - Buderus/Nefit/Bosch specific - 0x17 / 0x10 / 0x18 / 0x19-0x1B for hc2-4 / 0x38 { 65, DeviceType::THERMOSTAT, F("RC10"), DeviceFlags::EMS_DEVICE_FLAG_RC20_N},// 0x17 { 67, DeviceType::THERMOSTAT, F("RC30"), DeviceFlags::EMS_DEVICE_FLAG_RC30_N},// 0x10 - based on RC35 { 77, DeviceType::THERMOSTAT, F("RC20/Moduline 300"), DeviceFlags::EMS_DEVICE_FLAG_RC20},// 0x17 diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 5bfcfa2a0..741256cb8 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -34,11 +34,11 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i uint8_t model = this->model(); - // if we're on auto mode, register this thermostat if it has a device id of 0x10, 0x17 or 0x18 + // if we're on auto mode, register this thermostat if it has a device id of 0x10, 0x17 or 0x18->0x1A // or if its the master thermostat we defined // see https://github.com/emsesp/EMS-ESP/issues/362#issuecomment-629628161 if ((master_thermostat == device_id) - || ((master_thermostat == EMSESP_DEFAULT_MASTER_THERMOSTAT) && (device_id < 0x19) + || ((master_thermostat == EMSESP_DEFAULT_MASTER_THERMOSTAT) && (device_id <= 0x1A) // https://github.com/emsesp/EMS-ESP32/issues/200 && ((actual_master_thermostat == EMSESP_DEFAULT_MASTER_THERMOSTAT) || (device_id < actual_master_thermostat)))) { EMSESP::actual_master_thermostat(device_id); actual_master_thermostat = device_id; diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 4bb54fc54..7ac599ec5 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -502,7 +502,7 @@ void Mqtt::on_connect() { load_settings(); // reload MQTT settings - in case they have changes // send info topic appended with the version information as JSON - StaticJsonDocument doc; + StaticJsonDocument doc; // first time to connect if (connectcount_ == 1) { doc["event"] = FJSON("start"); @@ -512,15 +512,28 @@ void Mqtt::on_connect() { doc["version"] = EMSESP_APP_VERSION; #ifndef EMSESP_STANDALONE - if (EMSESP::system_.ethernet_connected()) { - doc["ip"] = ETH.localIP().toString(); - if (ETH.localIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000") { - doc["ipv6"] = ETH.localIPv6().toString(); - } - } else { - doc["ip"] = WiFi.localIP().toString(); + if (WiFi.status() == WL_CONNECTED) { + doc["connection"] = F("WiFi"); + doc["hostname"] = WiFi.getHostname(); + doc["SSID"] = WiFi.SSID(); + doc["BSSID"] = WiFi.BSSIDstr(); + doc["RSSI"] = WiFi.RSSI(); + doc["MAC"] = WiFi.macAddress(); + doc["IPv4 address"] = uuid::printable_to_string(WiFi.localIP()) + "/" + uuid::printable_to_string(WiFi.subnetMask()); + doc["IPv4 gateway"] = uuid::printable_to_string(WiFi.gatewayIP()); + doc["IPv4 nameserver"] = uuid::printable_to_string(WiFi.dnsIP()); if (WiFi.localIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000") { - doc["ipv6"] = WiFi.localIPv6().toString(); + doc["IPv6 address"] = uuid::printable_to_string(WiFi.localIPv6()); + } + } else if (EMSESP::system_.ethernet_connected()) { + doc["connection"] = F("Ethernet"); + doc["hostname"] = ETH.getHostname(); + doc["MAC"] = ETH.macAddress(); + doc["IPv4 address"] = uuid::printable_to_string(ETH.localIP()) + "/" + uuid::printable_to_string(ETH.subnetMask()); + doc["IPv4 gateway"] = uuid::printable_to_string(ETH.gatewayIP()); + doc["IPv4 nameserver"] = uuid::printable_to_string(ETH.dnsIP()); + if (ETH.localIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000") { + doc["IPv6 address"] = uuid::printable_to_string(ETH.localIPv6()); } } #endif diff --git a/src/system.cpp b/src/system.cpp index cf1ee79a7..b27a2ea3e 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -979,6 +979,35 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp node["Dallas sensors"] = EMSESP::sensor_devices().size(); } +#ifndef EMSESP_STANDALONE + // Network + node = output.createNestedObject("Network"); + if (WiFi.status() == WL_CONNECTED) { + node["connection"] = F("WiFi"); + node["hostname"] = WiFi.getHostname(); + node["SSID"] = WiFi.SSID(); + node["BSSID"] = WiFi.BSSIDstr(); + node["RSSI"] = WiFi.RSSI(); + node["MAC"] = WiFi.macAddress(); + node["IPv4 address"] = uuid::printable_to_string(WiFi.localIP()) + "/" + uuid::printable_to_string(WiFi.subnetMask()); + node["IPv4 gateway"] = uuid::printable_to_string(WiFi.gatewayIP()); + node["IPv4 nameserver"] = uuid::printable_to_string(WiFi.dnsIP()); + if (WiFi.localIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000") { + node["IPv6 address"] = uuid::printable_to_string(WiFi.localIPv6()); + } + } else if (EMSESP::system_.ethernet_connected()) { + node["connection"] = F("Ethernet"); + node["hostname"] = ETH.getHostname(); + node["MAC"] = ETH.macAddress(); + node["IPv4 address"] = uuid::printable_to_string(ETH.localIP()) + "/" + uuid::printable_to_string(ETH.subnetMask()); + node["IPv4 gateway"] = uuid::printable_to_string(ETH.gatewayIP()); + node["IPv4 nameserver"] = uuid::printable_to_string(ETH.dnsIP()); + if (ETH.localIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000") { + node["IPv6 address"] = uuid::printable_to_string(ETH.localIPv6()); + } + } +#endif + // Status node = output.createNestedObject("Status"); diff --git a/src/system.h b/src/system.h index 4e512daf1..b05a551fe 100644 --- a/src/system.h +++ b/src/system.h @@ -125,6 +125,7 @@ class System { return true; #endif } + void show_system(uuid::console::Shell & shell); void wifi_reconnect(); void show_users(uuid::console::Shell & shell); diff --git a/src/version.h b/src/version.h index 46c699777..215017a09 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.3.0b7" +#define EMSESP_APP_VERSION "3.3.0b8"