Skip to content

Commit

Permalink
Merge branch 'dev_no_master_thermostat' into idf4_no_master
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed May 6, 2022
2 parents 5917238 + f9207ec commit d075ee3
Show file tree
Hide file tree
Showing 27 changed files with 477 additions and 643 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_LATEST.md
Expand Up @@ -74,6 +74,7 @@
- Wired renamed to Ethernet
- removed system/pin command, new commands in analogsensors
- system/info device-info split to name/version/brand
- remove master-thermostat
- exclude list uses short-names, possible flags for web/api/mqtt excludes, readonly and favorite (selection not yet implemented)
- thermostat clock formate date-time: dd.mm.yyyy hh:mm
- RC300 summermode as other thermostats `winter/summer` instead of `off/on`
Expand Down
1 change: 0 additions & 1 deletion interface/src/project/types.ts
Expand Up @@ -6,7 +6,6 @@ export interface Settings {
syslog_mark_interval: number;
syslog_host: string;
syslog_port: number;
master_thermostat: number;
shower_timer: boolean;
shower_alert: boolean;
shower_alert_coldshot: number;
Expand Down
1 change: 0 additions & 1 deletion lib_standalone/ESP8266React.h
Expand Up @@ -26,7 +26,6 @@ class DummySettings {
uint32_t syslog_mark_interval = 0;
String syslog_host = "192.168.1.4";
uint16_t syslog_port = 514;
uint8_t master_thermostat = 0;
bool shower_timer = true;
bool shower_alert = false;
uint8_t shower_alert_coldshot = 10;
Expand Down
1 change: 0 additions & 1 deletion mock-api/server.js
Expand Up @@ -314,7 +314,6 @@ settings = {
syslog_mark_interval: 0,
syslog_host: '192.168.1.4',
syslog_port: 514,
master_thermostat: 0,
shower_timer: true,
shower_alert: true,
shower_alert_trigger: 7,
Expand Down
21 changes: 0 additions & 21 deletions src/console.cpp
Expand Up @@ -227,10 +227,6 @@ void EMSESPShell::add_console_commands() {
EMSESP::webSettingsService.read([&](WebSettings & settings) {
shell.printfln(F_(tx_mode_fmt), settings.tx_mode);
shell.printfln(F_(bus_id_fmt), settings.ems_bus_id);
char buffer[4];
shell.printfln(F_(master_thermostat_fmt),
settings.master_thermostat == 0 ? read_flash_string(F_(auto)).c_str()
: Helpers::hextoa(buffer, settings.master_thermostat));
shell.printfln(F_(board_profile_fmt), settings.board_profile.c_str());
});
});
Expand Down Expand Up @@ -261,23 +257,6 @@ void EMSESPShell::add_console_commands() {
}
});

commands->add_command(ShellContext::MAIN,
CommandFlags::ADMIN,
flash_string_vector{F_(set), F_(master), F_(thermostat)},
flash_string_vector{F_(deviceid_mandatory)},
[](Shell & shell, const std::vector<std::string> & arguments) {
uint8_t value = Helpers::hextoint(arguments.front().c_str());
EMSESP::webSettingsService.update(
[&](WebSettings & settings) {
settings.master_thermostat = value;
EMSESP::actual_master_thermostat(value); // set the internal value too
char buffer[5];
shell.printfln(F_(master_thermostat_fmt), !value ? read_flash_string(F_(auto)).c_str() : Helpers::hextoa(buffer, value));
return StateUpdateResult::CHANGED;
},
"local");
});

#ifndef EMSESP_STANDALONE
commands->add_command(ShellContext::MAIN,
CommandFlags::USER,
Expand Down
4 changes: 0 additions & 4 deletions src/default_settings.h
Expand Up @@ -52,10 +52,6 @@
#define EMSESP_DEFAULT_TRACELOG_RAW false
#endif

#ifndef EMSESP_DEFAULT_MASTER_THERMOSTAT
#define EMSESP_DEFAULT_MASTER_THERMOSTAT 0 // not set
#endif

#ifndef EMSESP_DEFAULT_SHOWER_TIMER
#define EMSESP_DEFAULT_SHOWER_TIMER false
#endif
Expand Down
281 changes: 140 additions & 141 deletions src/devices/boiler.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/devices/generic.cpp
Expand Up @@ -29,7 +29,7 @@ Generic::Generic(uint8_t device_type, uint8_t device_id, uint8_t product_id, con
// RF-Sensor 0x40 sending temperature in telegram 0x435, see https://github.com/emsesp/EMS-ESP32/issues/103
if (device_id == 0x40) {
register_telegram_type(0x435, F("RFSensorMessage"), false, MAKE_PF_CB(process_RFSensorMessage));
register_device_value(DeviceValueTAG::TAG_NONE, &rfTemp_, DeviceValueType::SHORT, FL_(div10), FL_(RFTemp), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &rfTemp_, DeviceValueType::SHORT, FL_(div10), FL_(RFTemp), DeviceValueUOM::DEGREES);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/devices/heatpump.cpp
Expand Up @@ -29,8 +29,8 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
register_telegram_type(0x047B, F("HP2"), true, MAKE_PF_CB(process_HPMonitor2));

// device values
register_device_value(DeviceValueTAG::TAG_NONE, &airHumidity_, DeviceValueType::UINT, FL_(div2), FL_(airHumidity), DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_NONE, &dewTemperature_, DeviceValueType::UINT, nullptr, FL_(dewTemperature), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &airHumidity_, DeviceValueType::UINT, FL_(div2), FL_(airHumidity), DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &dewTemperature_, DeviceValueType::UINT, nullptr, FL_(dewTemperature), DeviceValueUOM::DEGREES);
}

/*
Expand Down
6 changes: 3 additions & 3 deletions src/devices/mixer.cpp
Expand Up @@ -30,9 +30,9 @@ Mixer::Mixer(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c
if (flags == EMSdevice::EMS_DEVICE_FLAG_MP) {
register_telegram_type(0x5BA, F("HpPoolStatus"), true, MAKE_PF_CB(process_HpPoolStatus));
type_ = Type::MP;
register_device_value(DeviceValueTAG::TAG_NONE, &poolTemp_, DeviceValueType::SHORT, FL_(div10), FL_(poolTemp), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_NONE, &poolShuntStatus_, DeviceValueType::ENUM, FL_(enum_shunt), FL_(poolShuntStatus), DeviceValueUOM::NONE);
register_device_value(DeviceValueTAG::TAG_NONE, &poolShunt_, DeviceValueType::UINT, nullptr, FL_(poolShunt), DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &poolTemp_, DeviceValueType::SHORT, FL_(div10), FL_(poolTemp), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &poolShuntStatus_, DeviceValueType::ENUM, FL_(enum_shunt), FL_(poolShuntStatus), DeviceValueUOM::NONE);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &poolShunt_, DeviceValueType::UINT, nullptr, FL_(poolShunt), DeviceValueUOM::PERCENT);
}

// EMS+
Expand Down

0 comments on commit d075ee3

Please sign in to comment.