mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-26 08:39:09 +03:00
Compare commits
14 Commits
6204b9acc7
...
56b2c111b8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56b2c111b8 | ||
|
|
12ce736580 | ||
|
|
debe90eb8d | ||
|
|
8d318143a4 | ||
|
|
59f90f5d1c | ||
|
|
0efbd0528e | ||
|
|
3218620a0e | ||
|
|
a93921c875 | ||
|
|
fb77b455be | ||
|
|
b64c392c58 | ||
|
|
7bc6cf3910 | ||
|
|
e19e76546e | ||
|
|
b9aaaae90a | ||
|
|
86b395d612 |
@@ -8,6 +8,7 @@ For more details go to [emsesp.org](https://emsesp.org/).
|
|||||||
|
|
||||||
- update time saved in nvs
|
- update time saved in nvs
|
||||||
- heatpump entities [#2883](https://github.com/emsesp/EMS-ESP32/issues/2883)
|
- heatpump entities [#2883](https://github.com/emsesp/EMS-ESP32/issues/2883)
|
||||||
|
- HA number mode selectable box/slider (slider for max range 100) [#2900](https://github.com/emsesp/EMS-ESP32/discussions/2900)
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
@@ -25,3 +26,6 @@ For more details go to [emsesp.org](https://emsesp.org/).
|
|||||||
- GPIOs stored along with the name and reported in log if conflicting
|
- GPIOs stored along with the name and reported in log if conflicting
|
||||||
- free GPIOs depend on board profile [#2901](https://github.com/emsesp/EMS-ESP32/issues/2901)
|
- free GPIOs depend on board profile [#2901](https://github.com/emsesp/EMS-ESP32/issues/2901)
|
||||||
- prefer PSram for mqtt queue [#2889](https://github.com/emsesp/EMS-ESP32/issues/2889)
|
- prefer PSram for mqtt queue [#2889](https://github.com/emsesp/EMS-ESP32/issues/2889)
|
||||||
|
- day schedule defult to all days, no day selected is not allowed
|
||||||
|
- board profile `CUSTOM` can only be selected in developer mode
|
||||||
|
- mqtt sends round values without decimals (`28` instead of `28.0`)
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const MIN_ID = -100;
|
|||||||
const MAX_ID = 100;
|
const MAX_ID = 100;
|
||||||
const ICON_SIZE = 16;
|
const ICON_SIZE = 16;
|
||||||
const SCHEDULE_FLAG_THRESHOLD = 127;
|
const SCHEDULE_FLAG_THRESHOLD = 127;
|
||||||
|
const FLAG_ALL_DAYS = 127;
|
||||||
const REFERENCE_YEAR = 2017;
|
const REFERENCE_YEAR = 2017;
|
||||||
const REFERENCE_MONTH = '01';
|
const REFERENCE_MONTH = '01';
|
||||||
const LOG_2 = Math.log(2);
|
const LOG_2 = Math.log(2);
|
||||||
@@ -51,7 +52,7 @@ const WEEK_DAYS = [1, 2, 3, 4, 5, 6, 7] as const;
|
|||||||
const DEFAULT_SCHEDULE_ITEM: Omit<ScheduleItem, 'id' | 'o_id'> = {
|
const DEFAULT_SCHEDULE_ITEM: Omit<ScheduleItem, 'id' | 'o_id'> = {
|
||||||
active: false,
|
active: false,
|
||||||
deleted: false,
|
deleted: false,
|
||||||
flags: ScheduleFlag.SCHEDULE_DAY,
|
flags: FLAG_ALL_DAYS,
|
||||||
time: '',
|
time: '',
|
||||||
cmd: '',
|
cmd: '',
|
||||||
value: '',
|
value: '',
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ import type { ScheduleItem } from './types';
|
|||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const FLAG_MASK_127 = 127;
|
const FLAG_MASK_127 = 127;
|
||||||
const SCHEDULE_TYPE_THRESHOLD = 128;
|
const SCHEDULE_TYPE_THRESHOLD = 127;
|
||||||
|
const FLAG_ALL_DAYS = 127;
|
||||||
const DEFAULT_TIME = '00:00';
|
const DEFAULT_TIME = '00:00';
|
||||||
const TYPOGRAPHY_FONT_SIZE = 10;
|
const TYPOGRAPHY_FONT_SIZE = 10;
|
||||||
|
|
||||||
@@ -104,7 +105,7 @@ const SchedulerDialog = ({
|
|||||||
// 130 is on condition
|
// 130 is on condition
|
||||||
// 132 is immediate
|
// 132 is immediate
|
||||||
setScheduleType(
|
setScheduleType(
|
||||||
selectedItem.flags < SCHEDULE_TYPE_THRESHOLD
|
selectedItem.flags <= SCHEDULE_TYPE_THRESHOLD
|
||||||
? ScheduleFlag.SCHEDULE_DAY
|
? ScheduleFlag.SCHEDULE_DAY
|
||||||
: selectedItem.flags
|
: selectedItem.flags
|
||||||
);
|
);
|
||||||
@@ -181,7 +182,7 @@ const SchedulerDialog = ({
|
|||||||
setScheduleType(flag);
|
setScheduleType(flag);
|
||||||
// wipe the time field when changing the schedule type
|
// wipe the time field when changing the schedule type
|
||||||
// set the flags based on type
|
// set the flags based on type
|
||||||
const newFlags = flag === ScheduleFlag.SCHEDULE_DAY ? 0 : flag;
|
const newFlags = flag === ScheduleFlag.SCHEDULE_DAY ? FLAG_ALL_DAYS : flag;
|
||||||
setEditItem((prev) => ({ ...prev, time: '', flags: newFlags }));
|
setEditItem((prev) => ({ ...prev, time: '', flags: newFlags }));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,7 +191,7 @@ const SchedulerDialog = ({
|
|||||||
|
|
||||||
const handleDOWChange = useCallback(
|
const handleDOWChange = useCallback(
|
||||||
(_event: React.SyntheticEvent<HTMLElement>, flags: string[]) => {
|
(_event: React.SyntheticEvent<HTMLElement>, flags: string[]) => {
|
||||||
const newFlags = getFlagDOWnumber(flags);
|
const newFlags = getFlagDOWnumber(flags) === 0 ? FLAG_ALL_DAYS : getFlagDOWnumber(flags);
|
||||||
setEditItem((prev) => ({ ...prev, flags: newFlags }));
|
setEditItem((prev) => ({ ...prev, flags: newFlags }));
|
||||||
},
|
},
|
||||||
[getFlagDOWnumber]
|
[getFlagDOWnumber]
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ export enum DeviceValueUOM {
|
|||||||
MBAR,
|
MBAR,
|
||||||
LH,
|
LH,
|
||||||
CTKWH,
|
CTKWH,
|
||||||
HZ
|
HERTZ
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DeviceValueUOM_s = [
|
export const DeviceValueUOM_s = [
|
||||||
|
|||||||
@@ -130,7 +130,9 @@ let system_status = {
|
|||||||
// partitions: [],
|
// partitions: [],
|
||||||
developer_mode: true,
|
developer_mode: true,
|
||||||
model: '',
|
model: '',
|
||||||
|
board: '',
|
||||||
// model: 'BBQKees Electronics EMS Gateway E32 V2 (E32 V2.0 P3/2024011)',
|
// model: 'BBQKees Electronics EMS Gateway E32 V2 (E32 V2.0 P3/2024011)',
|
||||||
|
// board: 'E32V2',
|
||||||
// status: 0,
|
// status: 0,
|
||||||
status: 3
|
status: 3
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1446,3 +1446,5 @@ vchip
|
|||||||
SPIIO
|
SPIIO
|
||||||
SPIDQS
|
SPIDQS
|
||||||
txpause
|
txpause
|
||||||
|
relais
|
||||||
|
pinout
|
||||||
@@ -76,7 +76,7 @@ class DeviceValue {
|
|||||||
MBAR, // 24 - mbar - atmospheric pressure
|
MBAR, // 24 - mbar - atmospheric pressure
|
||||||
LH, // 25 - l/h - volume flow rate
|
LH, // 25 - l/h - volume flow rate
|
||||||
CTKWH, // 26 - ct/kWh - monetary
|
CTKWH, // 26 - ct/kWh - monetary
|
||||||
HZ, // 27 - Hz - frequency
|
HERTZ, // 27 - Hz - frequency
|
||||||
CONNECTIVITY // 28 - used in HA - connectivity
|
CONNECTIVITY // 28 - used in HA - connectivity
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1268,7 +1268,7 @@ void Mqtt::add_ha_classes(JsonObject doc, const uint8_t device_type, const uint8
|
|||||||
doc[sc_ha] = sc_ha_total_increasing;
|
doc[sc_ha] = sc_ha_total_increasing;
|
||||||
doc[dc_ha] = "monetary";
|
doc[dc_ha] = "monetary";
|
||||||
break;
|
break;
|
||||||
case DeviceValueUOM::HZ:
|
case DeviceValueUOM::HERTZ:
|
||||||
doc[sc_ha] = sc_ha_measurement;
|
doc[sc_ha] = sc_ha_measurement;
|
||||||
doc[dc_ha] = "frequency";
|
doc[dc_ha] = "frequency";
|
||||||
break;
|
break;
|
||||||
@@ -1425,10 +1425,12 @@ bool Mqtt::publish_ha_climate_config(const DeviceValue & dv, const bool has_room
|
|||||||
|
|
||||||
// add hvac_action - https://github.com/emsesp/EMS-ESP32/discussions/2562
|
// add hvac_action - https://github.com/emsesp/EMS-ESP32/discussions/2562
|
||||||
doc["act_t"] = "~/boiler_data";
|
doc["act_t"] = "~/boiler_data";
|
||||||
doc["act_tpl"] = "{% if value_json.hpactivity=='cooling'%}cooling{%elif value_json.heatingactive=='on'%}heating{%else%}idle{%endif%}";
|
char on_string[12];
|
||||||
|
doc["act_tpl"] = "{% if value_json.hpactivity=='cooling'%}cooling{%elif value_json.heatingactive=='" + std::string(Helpers::render_boolean(on_string, true))
|
||||||
|
+ "'%}heating{%else%}idle{%endif%}"; // uses boolean translation for on/true
|
||||||
|
|
||||||
// map EMS modes to HA climate modes
|
// map EMS modes to HA climate modes
|
||||||
// EMS modes: auto, manual, heat, off, night, day, nofrost, eco, comfort, cool)
|
// EMS modes: auto, manual, heat, off, night, day, nofrost, eco, comfort, cool
|
||||||
// HA supports: auto, off, cool, heat, dry, fan_only
|
// HA supports: auto, off, cool, heat, dry, fan_only
|
||||||
bool found_auto = false;
|
bool found_auto = false;
|
||||||
bool found_heat = false;
|
bool found_heat = false;
|
||||||
|
|||||||
@@ -2442,10 +2442,14 @@ bool System::load_board_profile(std::vector<int8_t> & data, const std::string &
|
|||||||
#else
|
#else
|
||||||
data = {7, 1, 4, 5, 9, PHY_type::PHY_TYPE_NONE, 0, 0, 0, 1}; // Lolin C3 Mini with RGB Led
|
data = {7, 1, 4, 5, 9, PHY_type::PHY_TYPE_NONE, 0, 0, 0, 1}; // Lolin C3 Mini with RGB Led
|
||||||
#endif
|
#endif
|
||||||
|
// https://www.wemos.cc/en/latest/c3/c3_mini.html
|
||||||
|
valid_system_gpios_ = {0, 1, 3, 4, 5, 6, 7, 9, 10, 20, 21};
|
||||||
} else if (board_profile == "S2MINI") {
|
} else if (board_profile == "S2MINI") {
|
||||||
data = {15, 7, 11, 12, 0, PHY_type::PHY_TYPE_NONE, 0, 0, 0, 0}; // Lolin S2 Mini
|
data = {15, 7, 11, 12, 0, PHY_type::PHY_TYPE_NONE, 0, 0, 0, 0}; // Lolin S2 Mini
|
||||||
|
// https://www.wemos.cc/en/latest/s2/s2_mini.html
|
||||||
} else if (board_profile == "S3MINI") {
|
} else if (board_profile == "S3MINI") {
|
||||||
data = {17, 18, 8, 5, 0, PHY_type::PHY_TYPE_NONE, 0, 0, 0, 0}; // Liligo S3
|
data = {17, 18, 8, 5, 0, PHY_type::PHY_TYPE_NONE, 0, 0, 0, 0}; // Liligo S3
|
||||||
|
// https://lilygo.cc/products/t7-s3
|
||||||
} else if (board_profile == "S32S3") {
|
} else if (board_profile == "S32S3") {
|
||||||
data = {2, 18, 5, 17, 0, PHY_type::PHY_TYPE_NONE, 0, 0, 0, 0}; // BBQKees Gateway S3
|
data = {2, 18, 5, 17, 0, PHY_type::PHY_TYPE_NONE, 0, 0, 0, 0}; // BBQKees Gateway S3
|
||||||
valid_system_gpios_ = {0, 2, 5, 17, 18};
|
valid_system_gpios_ = {0, 2, 5, 17, 18};
|
||||||
@@ -2924,8 +2928,9 @@ void System::set_valid_system_gpios() {
|
|||||||
// GPIO18 - GPIO19 = USB-JTAG
|
// GPIO18 - GPIO19 = USB-JTAG
|
||||||
//
|
//
|
||||||
// notes on what is allowed:
|
// notes on what is allowed:
|
||||||
// GPIO10 = button on BOARD_C3_MINI_V1
|
// GPIO09 = button on BOARD_C3_MINI_V1
|
||||||
valid_system_gpios_ = string_range_to_vector("0-21", "2, 8-9, 12-17, 18-19");
|
// GPIO20 - GPIO21 = UART0, , no chip connected because native USB
|
||||||
|
valid_system_gpios_ = string_range_to_vector("0-21", "2, 8, 12-17, 18-19");
|
||||||
|
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||||
// https://docs.espressif.com/projects/esp-idf/en/stable/esp32s2/api-reference/peripherals/gpio.html
|
// https://docs.espressif.com/projects/esp-idf/en/stable/esp32s2/api-reference/peripherals/gpio.html
|
||||||
@@ -2934,9 +2939,11 @@ void System::set_valid_system_gpios() {
|
|||||||
// GPIO45 - GPIO46 = strapping pins
|
// GPIO45 - GPIO46 = strapping pins
|
||||||
// GPIO39 - GPIO42 = USB-JTAG
|
// GPIO39 - GPIO42 = USB-JTAG
|
||||||
// GPIO22 - GPIO25 = don't exist
|
// GPIO22 - GPIO25 = don't exist
|
||||||
|
// GPIO19 - GPIO20 = USB
|
||||||
//
|
//
|
||||||
// notes on what is allowed:
|
// notes on what is allowed:
|
||||||
valid_system_gpios_ = string_range_to_vector("0-46", "26-32, 45-46, 39-42, 22-25");
|
// GPIO43, GPIO44 = UART0, no chip connected because native USB
|
||||||
|
valid_system_gpios_ = string_range_to_vector("0-46", "19, 20, 26-32, 45-46, 39-42, 22-25");
|
||||||
|
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S3
|
#elif CONFIG_IDF_TARGET_ESP32S3
|
||||||
// https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-reference/peripherals/gpio.html
|
// https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-reference/peripherals/gpio.html
|
||||||
@@ -2976,7 +2983,7 @@ void System::set_valid_system_gpios() {
|
|||||||
// GPIO12 - GPIO15 = JTAG, normally not used
|
// GPIO12 - GPIO15 = JTAG, normally not used
|
||||||
// GPIO00, GPIO05, GPIO12, GPIO15 = strapping pins, can be used with care
|
// GPIO00, GPIO05, GPIO12, GPIO15 = strapping pins, can be used with care
|
||||||
// GPIO34, GPIO35, GPIO37 = input only
|
// GPIO34, GPIO35, GPIO37 = input only
|
||||||
// GPIO23 and GPIO18 are used by Ethernet, excuded later by eth config
|
// GPIO23 and GPIO18 are used by Ethernet, excluded later by eth config
|
||||||
// GPIO00, GPIO02, GPIO04, GPIO12 - GPIO15, GPIO25 - GPIO27 = ADC2 (10 ch), used by WiFI-driver
|
// GPIO00, GPIO02, GPIO04, GPIO12 - GPIO15, GPIO25 - GPIO27 = ADC2 (10 ch), used by WiFI-driver
|
||||||
// GPIO32 - GPIO39 = ADC1 (8 ch), can always be used
|
// GPIO32 - GPIO39 = ADC1 (8 ch), can always be used
|
||||||
if (ESP.getPsramSize() > 0) {
|
if (ESP.getPsramSize() > 0) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.8.1-dev.6"
|
#define EMSESP_APP_VERSION "3.8.1-dev.7"
|
||||||
|
|||||||
@@ -133,6 +133,13 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
|
|||||||
// remove the ethernet pins from valid list, regardless of whether the GPIOs are valid or not
|
// remove the ethernet pins from valid list, regardless of whether the GPIOs are valid or not
|
||||||
EMSESP::system_.remove_gpio(23, true); // MDC
|
EMSESP::system_.remove_gpio(23, true); // MDC
|
||||||
EMSESP::system_.remove_gpio(18, true); // MDIO
|
EMSESP::system_.remove_gpio(18, true); // MDIO
|
||||||
|
EMSESP::system_.remove_gpio(19, true); // TXD0
|
||||||
|
EMSESP::system_.remove_gpio(22, true); // TXD1
|
||||||
|
EMSESP::system_.remove_gpio(21, true); // TXEN
|
||||||
|
EMSESP::system_.remove_gpio(25, true); // RXD0
|
||||||
|
EMSESP::system_.remove_gpio(26, true); // RXD1
|
||||||
|
EMSESP::system_.remove_gpio(27, true); // CRS
|
||||||
|
|
||||||
if (settings.eth_clock_mode < 2) {
|
if (settings.eth_clock_mode < 2) {
|
||||||
EMSESP::system_.remove_gpio(0, true); // ETH.clock input
|
EMSESP::system_.remove_gpio(0, true); // ETH.clock input
|
||||||
} else if (settings.eth_clock_mode == 2) {
|
} else if (settings.eth_clock_mode == 2) {
|
||||||
@@ -141,11 +148,6 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
|
|||||||
EMSESP::system_.remove_gpio(17, true); // ETH.clock output
|
EMSESP::system_.remove_gpio(17, true); // ETH.clock output
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if CONFIG_IDF_TARGET_ESP32
|
|
||||||
// Uart0 pins not allowed for all other gpio
|
|
||||||
EMSESP::system_.remove_gpio(1, true);
|
|
||||||
EMSESP::system_.remove_gpio(3, true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// free old gpios from used list to allow remapping
|
// free old gpios from used list to allow remapping
|
||||||
EMSESP::system_.remove_gpio(original_settings.led_gpio);
|
EMSESP::system_.remove_gpio(original_settings.led_gpio);
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ void test_1() {
|
|||||||
"[{\"reset\":\"\",\"chimneysweeper\":\"\",\"heatingoff\":\"off\",\"heatingactive\":\"off\",\"tapwateractive\":\"on\",\"selflowtemp\":0,\"curflowtemp\":"
|
"[{\"reset\":\"\",\"chimneysweeper\":\"\",\"heatingoff\":\"off\",\"heatingactive\":\"off\",\"tapwateractive\":\"on\",\"selflowtemp\":0,\"curflowtemp\":"
|
||||||
"60.2,\"rettemp\":48.1,\"syspress\":1.4,\"burngas\":\"on\",\"burngas2\":\"off\",\"flamecurr\":37.4,\"fanwork\":\"on\",\"ignwork\":\"off\","
|
"60.2,\"rettemp\":48.1,\"syspress\":1.4,\"burngas\":\"on\",\"burngas2\":\"off\",\"flamecurr\":37.4,\"fanwork\":\"on\",\"ignwork\":\"off\","
|
||||||
"\"oilpreheat\":\"off\",\"heatingpump\":\"on\",\"selburnpow\":115,\"curburnpow\":61,\"ubauptime\":3940268,\"servicecode\":\"=H\",\"servicecodenumber\":"
|
"\"oilpreheat\":\"off\",\"heatingpump\":\"on\",\"selburnpow\":115,\"curburnpow\":61,\"ubauptime\":3940268,\"servicecode\":\"=H\",\"servicecodenumber\":"
|
||||||
"201,\"nompower\":0,\"nrgtotal\":0.0,\"nrgheat\":0.0,\"dhw\":{\"seltemp\":52,\"comfort\":\"hot\",\"flowtempoffset\":40,\"chargeoptimization\":\"off\","
|
"201,\"nompower\":0,\"nrgtotal\":0,\"nrgheat\":0,\"dhw\":{\"seltemp\":52,\"comfort\":\"hot\",\"flowtempoffset\":40,\"chargeoptimization\":\"off\","
|
||||||
"\"circpump\":\"off\",\"chargetype\":\"3-way "
|
"\"circpump\":\"off\",\"chargetype\":\"3-way "
|
||||||
"valve\",\"hyston\":-5,\"disinfectiontemp\":70,\"circmode\":\"off\",\"circ\":\"off\",\"storagetemp1\":53.8,\"activated\":\"on\",\"3wayvalve\":\"on\","
|
"valve\",\"hyston\":-5,\"disinfectiontemp\":70,\"circmode\":\"off\",\"circ\":\"off\",\"storagetemp1\":53.8,\"activated\":\"on\",\"3wayvalve\":\"on\","
|
||||||
"\"chargepump\":\"off\",\"nrg\":0.0}}]";
|
"\"chargepump\":\"off\",\"nrg\":0}}]";
|
||||||
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/boiler"));
|
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/boiler"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,10 +42,10 @@ void test_3() {
|
|||||||
"[{\"reset\":\"\",\"chimneysweeper\":\"\",\"heatingoff\":\"off\",\"heatingactive\":\"off\",\"tapwateractive\":\"on\",\"selflowtemp\":0,\"curflowtemp\":"
|
"[{\"reset\":\"\",\"chimneysweeper\":\"\",\"heatingoff\":\"off\",\"heatingactive\":\"off\",\"tapwateractive\":\"on\",\"selflowtemp\":0,\"curflowtemp\":"
|
||||||
"60.2,\"rettemp\":48.1,\"syspress\":1.4,\"burngas\":\"on\",\"burngas2\":\"off\",\"flamecurr\":37.4,\"fanwork\":\"on\",\"ignwork\":\"off\","
|
"60.2,\"rettemp\":48.1,\"syspress\":1.4,\"burngas\":\"on\",\"burngas2\":\"off\",\"flamecurr\":37.4,\"fanwork\":\"on\",\"ignwork\":\"off\","
|
||||||
"\"oilpreheat\":\"off\",\"heatingpump\":\"on\",\"selburnpow\":115,\"curburnpow\":61,\"ubauptime\":3940268,\"servicecode\":\"=H\",\"servicecodenumber\":"
|
"\"oilpreheat\":\"off\",\"heatingpump\":\"on\",\"selburnpow\":115,\"curburnpow\":61,\"ubauptime\":3940268,\"servicecode\":\"=H\",\"servicecodenumber\":"
|
||||||
"201,\"nompower\":0,\"nrgtotal\":0.0,\"nrgheat\":0.0,\"dhw\":{\"seltemp\":52,\"comfort\":\"hot\",\"flowtempoffset\":40,\"chargeoptimization\":\"off\","
|
"201,\"nompower\":0,\"nrgtotal\":0,\"nrgheat\":0,\"dhw\":{\"seltemp\":52,\"comfort\":\"hot\",\"flowtempoffset\":40,\"chargeoptimization\":\"off\","
|
||||||
"\"circpump\":\"off\",\"chargetype\":\"3-way "
|
"\"circpump\":\"off\",\"chargetype\":\"3-way "
|
||||||
"valve\",\"hyston\":-5,\"disinfectiontemp\":70,\"circmode\":\"off\",\"circ\":\"off\",\"storagetemp1\":53.8,\"activated\":\"on\",\"3wayvalve\":\"on\","
|
"valve\",\"hyston\":-5,\"disinfectiontemp\":70,\"circmode\":\"off\",\"circ\":\"off\",\"storagetemp1\":53.8,\"activated\":\"on\",\"3wayvalve\":\"on\","
|
||||||
"\"chargepump\":\"off\",\"nrg\":0.0}}]";
|
"\"chargepump\":\"off\",\"nrg\":0}}]";
|
||||||
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/boiler/values"));
|
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/boiler/values"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ void test_4() {
|
|||||||
"type (chargetype)\":\"3-way valve\",\"dhw hysteresis on temperature (hyston)\":-5,\"dhw disinfection temperature (disinfectiontemp)\":70,\"dhw "
|
"type (chargetype)\":\"3-way valve\",\"dhw hysteresis on temperature (hyston)\":-5,\"dhw disinfection temperature (disinfectiontemp)\":70,\"dhw "
|
||||||
"circulation pump mode (circmode)\":\"off\",\"dhw circulation active (circ)\":\"off\",\"dhw storage intern temperature (storagetemp1)\":53.8,\"dhw "
|
"circulation pump mode (circmode)\":\"off\",\"dhw circulation active (circ)\":\"off\",\"dhw storage intern temperature (storagetemp1)\":53.8,\"dhw "
|
||||||
"activated (activated)\":\"on\",\"dhw 3-way valve active (3wayvalve)\":\"on\",\"dhw charge pump (chargepump)\":\"off\",\"nominal Power "
|
"activated (activated)\":\"on\",\"dhw 3-way valve active (3wayvalve)\":\"on\",\"dhw charge pump (chargepump)\":\"off\",\"nominal Power "
|
||||||
"(nompower)\":0,\"total energy (nrgtotal)\":0.0,\"energy heating (nrgheat)\":0.0,\"dhw energy (nrg)\":0.0}]";
|
"(nompower)\":0,\"total energy (nrgtotal)\":0,\"energy heating (nrgheat)\":0,\"dhw energy (nrg)\":0}]";
|
||||||
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/boiler/info"));
|
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/boiler/info"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ void test_12() {
|
|||||||
void test_13() {
|
void test_13() {
|
||||||
auto expected_response = "[{\"hc1\":{\"seltemp\":20.5,\"currtemp\":22.8,\"haclimate\":\"roomTemp\",\"modetype\":\"heat\",\"remotetemp\":null},\"hc2\":{"
|
auto expected_response = "[{\"hc1\":{\"seltemp\":20.5,\"currtemp\":22.8,\"haclimate\":\"roomTemp\",\"modetype\":\"heat\",\"remotetemp\":null},\"hc2\":{"
|
||||||
"\"seltemp\":20.6,\"currtemp\":22.9,\"haclimate\":\"roomTemp\",\"modetype\":\"eco\",\"remotetemp\":null},\"hc3\":{\"seltemp\":20."
|
"\"seltemp\":20.6,\"currtemp\":22.9,\"haclimate\":\"roomTemp\",\"modetype\":\"eco\",\"remotetemp\":null},\"hc3\":{\"seltemp\":20."
|
||||||
"7,\"currtemp\":23.0,\"haclimate\":\"roomTemp\",\"modetype\":\"nofrost\",\"remotetemp\":null},\"dhw\":{}}]";
|
"7,\"currtemp\":23,\"haclimate\":\"roomTemp\",\"modetype\":\"nofrost\",\"remotetemp\":null},\"dhw\":{}}]";
|
||||||
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/thermostat"));
|
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/thermostat"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,12 +187,12 @@ void test_17() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void test_18() {
|
void test_18() {
|
||||||
auto expected_response = "[{\"test_custom\":0.00,\"test_read_only\":70.00,\"test_ram\":\"14\",\"test_seltemp\":\"14\"}]";
|
auto expected_response = "[{\"test_custom\":0,\"test_read_only\":70,\"test_ram\":\"14\",\"test_seltemp\":\"14\"}]";
|
||||||
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/custom"));
|
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/custom"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_19() {
|
void test_19() {
|
||||||
auto expected_response = "[{\"test_custom\":0.00,\"test_read_only\":70.00,\"test_ram\":\"14\",\"test_seltemp\":\"14\"}]";
|
auto expected_response = "[{\"test_custom\":0,\"test_read_only\":70,\"test_ram\":\"14\",\"test_seltemp\":\"14\"}]";
|
||||||
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/custom/info"));
|
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/custom/info"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ void test_21() {
|
|||||||
void test_22() {
|
void test_22() {
|
||||||
auto expected_response = "[{\"name\":\"test_custom\",\"fullname\":\"test_custom\",\"storage\":\"ems\",\"type\":\"number\",\"readable\":true,\"writeable\":"
|
auto expected_response = "[{\"name\":\"test_custom\",\"fullname\":\"test_custom\",\"storage\":\"ems\",\"type\":\"number\",\"readable\":true,\"writeable\":"
|
||||||
"true,\"visible\":true,\"device_id\":\"0x08\",\"type_id\":\"0x18\",\"offset\":0,\"factor\":1,\"ent_cat\":\"diagnostic\",\"uom\":"
|
"true,\"visible\":true,\"device_id\":\"0x08\",\"type_id\":\"0x18\",\"offset\":0,\"factor\":1,\"ent_cat\":\"diagnostic\",\"uom\":"
|
||||||
"\"°C\",\"state_class\":\"measurement\",\"device_class\":\"temperature\",\"value\":0.00}]";
|
"\"°C\",\"state_class\":\"measurement\",\"device_class\":\"temperature\",\"value\":0}]";
|
||||||
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/custom/test_custom"));
|
TEST_ASSERT_EQUAL_STRING(expected_response, call_url("/api/custom/test_custom"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user