Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
auto formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Dec 28, 2020
1 parent 200e206 commit 19c547e
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 62 deletions.
47 changes: 46 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,51 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.0] December 28 2020

### Added
- function keys in editor: cursor, del, home, end. F1=help, F2=show, and other shortcuts
- SM100 pump working time and energy units
- heating curve parameters and commands for RC300
- `wwonetime` for RC300 thermostat
- expose test framework via api (#611)
- SysLog has enable/disable flag in WebUI
- Add solar configuration telegrams (#616) [thanks @hpanther]
- `log trace` shows decoded or optional raw telegrams, `watch unknown` for only unknown telegrams
- WM10 switch telegrams
- boiler information (#633), pumpmod min/max commands
- maintenance message and command
- thermostat program, reducemode, controlmode
- optional delayed start for sending tx-telegrams to prevent conflicts with KM200
- RC35 holiday setting with `+` for 'at home'

### Fixed
- mixer IPM pumpstatus
- mixer devices in HA were incorrectly named
- Prevent HA MQTT config messages for thermostat that has no 'currtemp' (#582)
- serviceCodeNumber, 3-char serviceCode, exhausttemp and heating_active for newer ems+ boilers
- prevent MQTT publish messages from sending twice
- repeated output on read commands
- heating_active for ems+

### Changed
- optimized MQTT for HA to reduce heap fragmentation issues
- change syslog settings without reboot
- HA-config split in smaller blocks
- commands `fetch` and `publish [ha]` as call
- mqtt json package sizes
- renamed the command system info (which showed settings) to `settings`
- renamed the command system report (Which dumped debug info) to `info`
- Changing settings via web restarts only selected services
- renamed pio targets (esp8266-ci and esp32-ci for GitHub CI)
- telnet default settings `log info`, timeout 60 min
- `log debug` not showing telegram names, use `log trace` or `watch on` to show the telegrams
- optimized how console and web display device data ([#632](https://github.com/proddy/EMS-ESP/issues/632))

### Removed
- old shell and python build scripts


## [2.1.0] October 31 2020

### Added
Expand Down Expand Up @@ -39,7 +84,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix writing to the Junkers FR120 thermostat
- support for changing summermode
- added missing `heatingtype` to thermostat data
- handle incomming ems+ read requests, ignore F7 telegrams with 3byte-id
- handle incoming ems+ read requests, ignore F7 telegrams with 3byte-id
- fix month for setting clock from NTP

### Changed
Expand Down
34 changes: 0 additions & 34 deletions CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,9 @@
# Changelog

### Added
- function keys in editor: cursor, del, home, end. F1=help, F2=show, and other shortcuts
- SM100 pump working time and energy units
- heating curve parameters and commands for RC300
- `wwonetime` for RC300 thermostat
- expose test framework via api (#611)
- SysLog has enable/disable flag in WebUI
- Add solar configuration telegrams (#616) [thanks @hpanther]
- `log trace` shows decoded or optional raw telegrams, `watch unknown` for only unknown telegrams
- WM10 switch telegrams
- boiler information (#633), pumpmod min/max commands
- maintenance message and command
- thermostat program, reducemode, controlmode
- optional delayed start for sending tx-telegrams to prevent conflicts with KM200
- RC35 holiday setting with `+` for 'at home'

### Fixed
- mixer IPM pumpstatus
- mixer devices in HA were incorrectly named
- Prevent HA MQTT config messages for thermostat that has no 'currtemp' (#582)
- serviceCodeNumber, 3-char serviceCode, exhausttemp and heating_active for newer ems+ boilers
- prevent MQTT publish messages from sending twice
- repeated output on read commands
- heating_active for ems+

### Changed
- optimized MQTT for HA to reduce heap fragmentation issues
- change syslog settings without reboot
- HA-config split in smaller blocks
- commands `fetch` and `publish [ha]` as call
- mqtt json package sizes
- renamed the command system info (which showed settings) to `settings`
- renamed the command system report (Which dumped debug info) to `info`
- Changing settings via web restarts only selected services
- renamed pio targets (esp8266-ci and esp32-ci for GitHub CI)
- telnet default settings `log info`, timeout 60 min
- `log debug` not showing telegram names, use `log trace` or `watch on` to show the telegrams
- optimized how console and web display device data ([#632](https://github.com/proddy/EMS-ESP/issues/632))

### Removed
- old shell and python build scripts
2 changes: 1 addition & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

# Firmware Installation

Follow the instructions in the [documentation](https://emsesp.github.io/docs) on how to install the firmware binaries in the Assets below.
Follow the instructions in the [documentation](https://emsesp.github.io/docs) on how to install the firmware binaries from the Assets below.

2 changes: 1 addition & 1 deletion RELEASENOTES_DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ This is a snapshot of the current "beta" development code and firmware binaries

# Firmware Installation

Follow the instructions in the [documentation](https://emsesp.github.io/docs) on how to install the firmware binaries in the Assets below.
Follow the instructions in the [documentation](https://emsesp.github.io/docs) on how to install the firmware binaries from the Assets below.

2 changes: 1 addition & 1 deletion src/WebSettingsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ StateUpdateResult WebSettings::update(JsonObject & root, WebSettings & settings)
settings.syslog_level = root["syslog_level"] | EMSESP_DEFAULT_SYSLOG_LEVEL;
settings.syslog_mark_interval = root["syslog_mark_interval"] | EMSESP_DEFAULT_SYSLOG_MARK_INTERVAL;
settings.syslog_host = root["syslog_host"] | EMSESP_DEFAULT_SYSLOG_HOST;
settings.trace_raw = root["trace_raw"] | EMSESP_DEFAULT_TRACELOG_RAW ;
settings.trace_raw = root["trace_raw"] | EMSESP_DEFAULT_TRACELOG_RAW;
EMSESP::trace_raw(settings.trace_raw);

snprintf_P(&crc_after[0],
Expand Down
2 changes: 1 addition & 1 deletion src/WebSettingsService.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#define EMSESP_DEFAULT_HIDE_LED false
#define EMSESP_DEFAULT_DALLAS_PARASITE false
#define EMSESP_DEFAULT_API_ENABLED false // turn off, because its insecure
#define EMSESP_DEFAULT_BOOL_FORMAT 1 // on/off
#define EMSESP_DEFAULT_BOOL_FORMAT 1 // on/off
#define EMSESP_DEFAULT_ANALOG_ENABLED false

// Default GPIO PIN definitions
Expand Down
26 changes: 13 additions & 13 deletions src/devices/boiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,8 @@ void Boiler::process_UBAMonitorFastPlus(std::shared_ptr<const Telegram> telegram
changed_ |= telegram->read_value(retTemp_, 17); // can be 0 if no sensor, handled in export_values
changed_ |= telegram->read_value(sysPress_, 21);

//changed_ |= telegram->read_value(temperatur_, 13); // unknown temperature
//changed_ |= telegram->read_value(temperatur_, 27); // unknown temperature
//changed_ |= telegram->read_value(temperature_, 13); // unknown temperature
//changed_ |= telegram->read_value(temperature_, 27); // unknown temperature

// read 3 char service code / installation status as appears on the display
if ((telegram->message_length > 3) && (telegram->offset == 0)) {
Expand Down Expand Up @@ -1231,9 +1231,9 @@ void Boiler::process_UBAFlags(std::shared_ptr<const Telegram> telegram) {
// 0x1C
// 08 00 1C 94 0B 0A 1D 31 08 00 80 00 00 00 -> message for 29.11.2020
// 08 00 1C 94 0B 0A 1D 31 00 00 00 00 00 00 -> message reset
void Boiler::process_UBAMaintenanceStatus(std::shared_ptr<const Telegram> telegram) {
void Boiler::process_UBAMaintenanceStatus(std::shared_ptr<const Telegram> telegram) {
// 5. byte: Maintenance due (0 = no, 3 = yes, due to operating hours, 8 = yes, due to date)
changed_ |= telegram->read_value(maintenanceMessage_,5);
changed_ |= telegram->read_value(maintenanceMessage_, 5);
}

// 0x10, 0x11
Expand Down Expand Up @@ -1271,11 +1271,11 @@ void Boiler::process_UBAMaintenanceData(std::shared_ptr<const Telegram> telegram
// first byte: Maintenance messages (0 = none, 1 = by operating hours, 2 = by date)
telegram->read_value(maintenanceType_, 0);
telegram->read_value(maintenanceTime_, 1);
uint8_t day = telegram->message_data[2];
uint8_t month = telegram->message_data[3];
uint8_t year = telegram->message_data[4];
uint8_t day = telegram->message_data[2];
uint8_t month = telegram->message_data[3];
uint8_t year = telegram->message_data[4];
if (day > 0 && month > 0 && year > 0) {
snprintf_P(maintenanceDate_,sizeof(maintenanceDate_),PSTR("%02d.%02d.%04d"),day,month,year + 2000);
snprintf_P(maintenanceDate_, sizeof(maintenanceDate_), PSTR("%02d.%02d.%04d"), day, month, year + 2000);
}
}

Expand Down Expand Up @@ -1715,15 +1715,15 @@ bool Boiler::set_maintenance(const char * value, const int8_t id) {
return true;
}

int hrs;
if (!Helpers::value2number(value, hrs)) {
LOG_WARNING(F("Setting maintenance: wrong format"));
return false;
int hrs;
if (!Helpers::value2number(value, hrs)) {
LOG_WARNING(F("Setting maintenance: wrong format"));
return false;
}

if (hrs == 0) {
LOG_INFO(F("Setting maintenance off"));
write_command(0x15, 0, 0, 0x15); // off
write_command(0x15, 0, 0, 0x15); // off
} else {
LOG_INFO(F("Setting maintenance in %d hours"), hrs);
write_command(0x15, 1, (uint8_t)(hrs / 100));
Expand Down
2 changes: 1 addition & 1 deletion src/devices/solar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ void Solar::process_SM100Monitor2(std::shared_ptr<const Telegram> telegram) {
// not implemented yet
}

// SM100wwTemperatur - 0x07D6
// SM100wwTemperature - 0x07D6
// Solar Module(0x2A) -> (0x00), (0x7D6), data: 01 C1 00 00 02 5B 01 AF 01 AD 80 00 01 90
void Solar::process_SM100wwTemperature(std::shared_ptr<const Telegram> telegram) {
// changed_ |= telegram->read_value(wwTemp_1_, 0);
Expand Down
5 changes: 3 additions & 2 deletions src/devices/thermostat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,8 @@ bool Thermostat::export_values_hc(uint8_t mqtt_format, JsonObject & rootThermost
if (model == EMS_DEVICE_FLAG_RC35 || model == EMS_DEVICE_FLAG_RC30_1) {
dataThermostat["controlmode"] = Helpers::render_enum(s, {F("outdoor"), F("room")}, hc->controlmode);
} else if (model == EMS_DEVICE_FLAG_RC300 || model == EMS_DEVICE_FLAG_RC100) {
dataThermostat["controlmode"] = Helpers::render_enum(s, {F("off"), F("outdoor"), F("simple"), F("MPC"), F("room"), F("power"), F("const.")}, hc->controlmode);
dataThermostat["controlmode"] =
Helpers::render_enum(s, {F("off"), F("outdoor"), F("simple"), F("MPC"), F("room"), F("power"), F("const.")}, hc->controlmode);
}
}

Expand Down Expand Up @@ -1565,7 +1566,7 @@ void Thermostat::process_RCTime(std::shared_ptr<const Telegram> telegram) {
}
}

// process_RCError - type 0xA2 - error maeesage - 14 bytes long
// process_RCError - type 0xA2 - error message - 14 bytes long
// 10 00 A2 00 41 32 32 03 30 00 02 00 00 00 00 00 00 02 CRC
// A 2 2 816
void Thermostat::process_RCError(std::shared_ptr<const Telegram> telegram) {
Expand Down
2 changes: 1 addition & 1 deletion src/emsesp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ bool EMSESP::process_telegram(std::shared_ptr<const Telegram> telegram) {
} else if (!trace_raw_) {
LOG_TRACE(pretty_telegram(telegram).c_str());
}
} else if (!trace_raw_){
} else if (!trace_raw_) {
LOG_TRACE(pretty_telegram(telegram).c_str());
}

Expand Down
6 changes: 3 additions & 3 deletions src/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,9 @@ void Mqtt::on_connect() {
void Mqtt::ha_status() {
StaticJsonDocument<EMSESP_MAX_JSON_SIZE_HA_CONFIG> doc;

doc["name"] = FJSON("EMS-ESP status");
doc["uniq_id"] = FJSON("status");
doc["~"] = System::hostname(); // ems-esp
doc["name"] = FJSON("EMS-ESP status");
doc["uniq_id"] = FJSON("status");
doc["~"] = System::hostname(); // ems-esp
// doc["avty_t"] = FJSON("~/status");
doc["json_attr_t"] = FJSON("~/heartbeat");
doc["stat_t"] = FJSON("~/heartbeat");
Expand Down
4 changes: 2 additions & 2 deletions src/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd) {
EMSESP::mqtt_.incoming(system_topic, "{\"cmd\":\"pin\",\"id\":12,\"data\":\"1\"}");

EMSESP::mqtt_.incoming(thermostat_topic, "{\"cmd\":\"wwmode\",\"data\":\"auto\"}");
EMSESP::mqtt_.incoming(thermostat_topic, "{\"cmd\":\"control\",\"data\":\"1\"}"); // RC35 only, should error
EMSESP::mqtt_.incoming(thermostat_topic, "{\"cmd\":\"mode\",\"data\":\"poep\",\"id\":2}"); // invalid mode
EMSESP::mqtt_.incoming(thermostat_topic, "{\"cmd\":\"control\",\"data\":\"1\"}"); // RC35 only, should error
EMSESP::mqtt_.incoming(thermostat_topic, "{\"cmd\":\"mode\",\"data\":\"bad\",\"id\":2}"); // invalid mode
EMSESP::mqtt_.incoming(thermostat_topic, "{\"cmd\":\"mode\",\"data\":\"auto\",\"id\":2}");
EMSESP::mqtt_.incoming(thermostat_topic, "{\"cmd\":\"mode\",\"data\":\"auto\",\"hc\":2}"); // hc as number
EMSESP::mqtt_.incoming(thermostat_topic, "{\"cmd\":\"temp\",\"data\":19.5,\"hc\":1}"); // data as number
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define EMSESP_APP_VERSION "2.1.1b7"
#define EMSESP_APP_VERSION "2.2.0"

0 comments on commit 19c547e

Please sign in to comment.