Merge pull request #2666 from MichaelDvP/dev

some small fixes
This commit is contained in:
Proddy
2025-10-20 17:49:41 +02:00
committed by GitHub
12 changed files with 100 additions and 78 deletions

View File

@@ -49,14 +49,14 @@
"@preact/compat": "^18.3.1",
"@preact/preset-vite": "^2.10.2",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/node": "^24.7.2",
"@types/node": "^24.8.1",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"concurrently": "^9.2.1",
"eslint": "^9.37.0",
"eslint-config-prettier": "^10.1.8",
"prettier": "^3.6.2",
"rollup-plugin-visualizer": "^6.0.4",
"rollup-plugin-visualizer": "^6.0.5",
"terser": "^5.44.0",
"typescript-eslint": "^8.46.1",
"vite": "^7.1.10",

View File

@@ -80,13 +80,13 @@ importers:
version: 18.3.1(preact@10.27.2)
'@preact/preset-vite':
specifier: ^2.10.2
version: 2.10.2(@babel/core@7.28.4)(preact@10.27.2)(vite@7.1.10(@types/node@24.7.2)(terser@5.44.0))
version: 2.10.2(@babel/core@7.28.4)(preact@10.27.2)(vite@7.1.10(@types/node@24.8.1)(terser@5.44.0))
'@trivago/prettier-plugin-sort-imports':
specifier: ^5.2.2
version: 5.2.2(prettier@3.6.2)
'@types/node':
specifier: ^24.7.2
version: 24.7.2
specifier: ^24.8.1
version: 24.8.1
'@types/react':
specifier: ^19.2.2
version: 19.2.2
@@ -106,8 +106,8 @@ importers:
specifier: ^3.6.2
version: 3.6.2
rollup-plugin-visualizer:
specifier: ^6.0.4
version: 6.0.4(rollup@4.52.4)
specifier: ^6.0.5
version: 6.0.5(rollup@4.52.4)
terser:
specifier: ^5.44.0
version: 5.44.0
@@ -116,13 +116,13 @@ importers:
version: 8.46.1(eslint@9.37.0)(typescript@5.9.3)
vite:
specifier: ^7.1.10
version: 7.1.10(@types/node@24.7.2)(terser@5.44.0)
version: 7.1.10(@types/node@24.8.1)(terser@5.44.0)
vite-plugin-imagemin:
specifier: ^0.6.1
version: 0.6.1(vite@7.1.10(@types/node@24.7.2)(terser@5.44.0))
version: 0.6.1(vite@7.1.10(@types/node@24.8.1)(terser@5.44.0))
vite-tsconfig-paths:
specifier: ^5.1.4
version: 5.1.4(typescript@5.9.3)(vite@7.1.10(@types/node@24.7.2)(terser@5.44.0))
version: 5.1.4(typescript@5.9.3)(vite@7.1.10(@types/node@24.8.1)(terser@5.44.0))
packages:
@@ -851,8 +851,8 @@ packages:
resolution: {integrity: sha512-zmPitbQ8+6zNutpwgcQuLcsEpn/Cj54Kbn7L5pX0Os5kdWplB7xPgEh/g+SWOB/qmows2gpuCaPyduq8ZZRnxA==}
deprecated: This is a stub types definition. minimatch provides its own type definitions, so you do not need this installed.
'@types/node@24.7.2':
resolution: {integrity: sha512-/NbVmcGTP+lj5oa4yiYxxeBjRivKQ5Ns1eSZeB99ExsEQ6rX5XYU1Zy/gGxY/ilqtD4Etx9mKyrPxZRetiahhA==}
'@types/node@24.8.1':
resolution: {integrity: sha512-alv65KGRadQVfVcG69MuB4IzdYVpRwMG/mq8KWOaoOdyY617P5ivaDiMCGOFDWD2sAn5Q0mR3mRtUOgm99hL9Q==}
'@types/parse-json@4.0.2':
resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==}
@@ -1014,8 +1014,8 @@ packages:
base64-js@1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
baseline-browser-mapping@2.8.16:
resolution: {integrity: sha512-OMu3BGQ4E7P1ErFsIPpbJh0qvDudM/UuJeHgkAvfWe+0HFJCXh+t/l8L6fVLR55RI/UbKrVLnAXZSVwd9ysWYw==}
baseline-browser-mapping@2.8.17:
resolution: {integrity: sha512-j5zJcx6golJYTG6c05LUZ3Z8Gi+M62zRT/ycz4Xq4iCOdpcxwg7ngEYD4KA0eWZC7U17qh/Smq8bYbACJ0ipBA==}
hasBin: true
bin-build@3.0.0:
@@ -1104,8 +1104,8 @@ packages:
resolution: {integrity: sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==}
engines: {node: '>=0.10.0'}
caniuse-lite@1.0.30001750:
resolution: {integrity: sha512-cuom0g5sdX6rw00qOoLNSFCJ9/mYIsuSOA+yzpDw8eopiFqcVwQvZHqov0vmEighRxX++cfC0Vg1G+1Iy/mSpQ==}
caniuse-lite@1.0.30001751:
resolution: {integrity: sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==}
caw@2.0.1:
resolution: {integrity: sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==}
@@ -2238,8 +2238,8 @@ packages:
node-html-parser@6.1.13:
resolution: {integrity: sha512-qIsTMOY4C/dAa5Q5vsobRpOOvPfC4pB61UVW2uSwZNUp0QU/jCekTal1vMmbO0DgdHeLUJpv/ARmDqErVxA3Sg==}
node-releases@2.0.23:
resolution: {integrity: sha512-cCmFDMSm26S6tQSDpBCg/NR8NENrVPhAJSf+XbxBG4rPFaaonlEoE9wHQmun+cls499TQGSb7ZyPBRlzgKfpeg==}
node-releases@2.0.25:
resolution: {integrity: sha512-4auku8B/vw5psvTiiN9j1dAOsXvMoGqJuKJcR+dTdqiXEK20mMTk1UEo3HS16LeGQsVG6+qKTPM9u/qQ2LqATA==}
normalize-package-data@2.5.0:
resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==}
@@ -2592,8 +2592,8 @@ packages:
deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
rollup-plugin-visualizer@6.0.4:
resolution: {integrity: sha512-q8Q7J/6YofkmaGW1sH/fPRAz37x/+pd7VBuaUU7lwvOS/YikuiiEU9jeb9PH8XHiq50XFrUsBbOxeAMYQ7KZkg==}
rollup-plugin-visualizer@6.0.5:
resolution: {integrity: sha512-9+HlNgKCVbJDs8tVtjQ43US12eqaiHyyiLMdBwQ7vSZPiHMysGNo2E88TAp1si5wx8NAoYriI2A5kuKfIakmJg==}
engines: {node: '>=18'}
hasBin: true
peerDependencies:
@@ -3575,18 +3575,18 @@ snapshots:
dependencies:
preact: 10.27.2
'@preact/preset-vite@2.10.2(@babel/core@7.28.4)(preact@10.27.2)(vite@7.1.10(@types/node@24.7.2)(terser@5.44.0))':
'@preact/preset-vite@2.10.2(@babel/core@7.28.4)(preact@10.27.2)(vite@7.1.10(@types/node@24.8.1)(terser@5.44.0))':
dependencies:
'@babel/core': 7.28.4
'@babel/plugin-transform-react-jsx': 7.27.1(@babel/core@7.28.4)
'@babel/plugin-transform-react-jsx-development': 7.27.1(@babel/core@7.28.4)
'@prefresh/vite': 2.4.10(preact@10.27.2)(vite@7.1.10(@types/node@24.7.2)(terser@5.44.0))
'@prefresh/vite': 2.4.10(preact@10.27.2)(vite@7.1.10(@types/node@24.8.1)(terser@5.44.0))
'@rollup/pluginutils': 4.2.1
babel-plugin-transform-hook-names: 1.0.2(@babel/core@7.28.4)
debug: 4.4.3
picocolors: 1.1.1
vite: 7.1.10(@types/node@24.7.2)(terser@5.44.0)
vite-prerender-plugin: 0.5.12(vite@7.1.10(@types/node@24.7.2)(terser@5.44.0))
vite: 7.1.10(@types/node@24.8.1)(terser@5.44.0)
vite-prerender-plugin: 0.5.12(vite@7.1.10(@types/node@24.8.1)(terser@5.44.0))
transitivePeerDependencies:
- preact
- supports-color
@@ -3599,7 +3599,7 @@ snapshots:
'@prefresh/utils@1.2.1': {}
'@prefresh/vite@2.4.10(preact@10.27.2)(vite@7.1.10(@types/node@24.7.2)(terser@5.44.0))':
'@prefresh/vite@2.4.10(preact@10.27.2)(vite@7.1.10(@types/node@24.8.1)(terser@5.44.0))':
dependencies:
'@babel/core': 7.28.4
'@prefresh/babel-plugin': 0.5.2
@@ -3607,7 +3607,7 @@ snapshots:
'@prefresh/utils': 1.2.1
'@rollup/pluginutils': 4.2.1
preact: 10.27.2
vite: 7.1.10(@types/node@24.7.2)(terser@5.44.0)
vite: 7.1.10(@types/node@24.8.1)(terser@5.44.0)
transitivePeerDependencies:
- supports-color
@@ -3712,7 +3712,7 @@ snapshots:
'@types/glob@7.2.0':
dependencies:
'@types/minimatch': 6.0.0
'@types/node': 24.7.2
'@types/node': 24.8.1
'@types/imagemin-gifsicle@7.0.4':
dependencies:
@@ -3741,19 +3741,19 @@ snapshots:
'@types/imagemin@7.0.1':
dependencies:
'@types/node': 24.7.2
'@types/node': 24.8.1
'@types/json-schema@7.0.15': {}
'@types/keyv@3.1.4':
dependencies:
'@types/node': 24.7.2
'@types/node': 24.8.1
'@types/minimatch@6.0.0':
dependencies:
minimatch: 10.0.3
'@types/node@24.7.2':
'@types/node@24.8.1':
dependencies:
undici-types: 7.14.0
@@ -3775,11 +3775,11 @@ snapshots:
'@types/responselike@1.0.3':
dependencies:
'@types/node': 24.7.2
'@types/node': 24.8.1
'@types/svgo@2.6.4':
dependencies:
'@types/node': 24.7.2
'@types/node': 24.8.1
'@typescript-eslint/eslint-plugin@8.46.1(@typescript-eslint/parser@8.46.1(eslint@9.37.0)(typescript@5.9.3))(eslint@9.37.0)(typescript@5.9.3)':
dependencies:
@@ -3936,7 +3936,7 @@ snapshots:
base64-js@1.5.1: {}
baseline-browser-mapping@2.8.16: {}
baseline-browser-mapping@2.8.17: {}
bin-build@3.0.0:
dependencies:
@@ -3993,10 +3993,10 @@ snapshots:
browserslist@4.26.3:
dependencies:
baseline-browser-mapping: 2.8.16
caniuse-lite: 1.0.30001750
baseline-browser-mapping: 2.8.17
caniuse-lite: 1.0.30001751
electron-to-chromium: 1.5.237
node-releases: 2.0.23
node-releases: 2.0.25
update-browserslist-db: 1.1.3(browserslist@4.26.3)
buffer-alloc-unsafe@1.1.0: {}
@@ -4053,7 +4053,7 @@ snapshots:
camelcase@2.1.1: {}
caniuse-lite@1.0.30001750: {}
caniuse-lite@1.0.30001751: {}
caw@2.0.1:
dependencies:
@@ -5263,7 +5263,7 @@ snapshots:
css-select: 5.2.2
he: 1.2.0
node-releases@2.0.23: {}
node-releases@2.0.25: {}
normalize-package-data@2.5.0:
dependencies:
@@ -5587,7 +5587,7 @@ snapshots:
dependencies:
glob: 7.2.3
rollup-plugin-visualizer@6.0.4(rollup@4.52.4):
rollup-plugin-visualizer@6.0.5(rollup@4.52.4):
dependencies:
open: 8.4.2
picomatch: 4.0.3
@@ -5936,7 +5936,7 @@ snapshots:
spdx-correct: 3.2.0
spdx-expression-parse: 3.0.1
vite-plugin-imagemin@0.6.1(vite@7.1.10(@types/node@24.7.2)(terser@5.44.0)):
vite-plugin-imagemin@0.6.1(vite@7.1.10(@types/node@24.8.1)(terser@5.44.0)):
dependencies:
'@types/imagemin': 7.0.1
'@types/imagemin-gifsicle': 7.0.4
@@ -5961,11 +5961,11 @@ snapshots:
imagemin-webp: 6.1.0
jpegtran-bin: 6.0.1
pathe: 0.2.0
vite: 7.1.10(@types/node@24.7.2)(terser@5.44.0)
vite: 7.1.10(@types/node@24.8.1)(terser@5.44.0)
transitivePeerDependencies:
- supports-color
vite-prerender-plugin@0.5.12(vite@7.1.10(@types/node@24.7.2)(terser@5.44.0)):
vite-prerender-plugin@0.5.12(vite@7.1.10(@types/node@24.8.1)(terser@5.44.0)):
dependencies:
kolorist: 1.8.0
magic-string: 0.30.19
@@ -5973,20 +5973,20 @@ snapshots:
simple-code-frame: 1.3.0
source-map: 0.7.6
stack-trace: 1.0.0-pre2
vite: 7.1.10(@types/node@24.7.2)(terser@5.44.0)
vite: 7.1.10(@types/node@24.8.1)(terser@5.44.0)
vite-tsconfig-paths@5.1.4(typescript@5.9.3)(vite@7.1.10(@types/node@24.7.2)(terser@5.44.0)):
vite-tsconfig-paths@5.1.4(typescript@5.9.3)(vite@7.1.10(@types/node@24.8.1)(terser@5.44.0)):
dependencies:
debug: 4.4.3
globrex: 0.1.2
tsconfck: 3.1.6(typescript@5.9.3)
optionalDependencies:
vite: 7.1.10(@types/node@24.7.2)(terser@5.44.0)
vite: 7.1.10(@types/node@24.8.1)(terser@5.44.0)
transitivePeerDependencies:
- supports-color
- typescript
vite@7.1.10(@types/node@24.7.2)(terser@5.44.0):
vite@7.1.10(@types/node@24.8.1)(terser@5.44.0):
dependencies:
esbuild: 0.25.11
fdir: 6.5.0(picomatch@4.0.3)
@@ -5995,7 +5995,7 @@ snapshots:
rollup: 4.52.4
tinyglobby: 0.2.15
optionalDependencies:
'@types/node': 24.7.2
'@types/node': 24.8.1
fsevents: 2.3.3
terser: 5.44.0

View File

@@ -42,7 +42,9 @@ string_sizes = {
"thermostat/switchtime2": 16,
"thermostat/switchtime": 16,
"thermostat/switchtimeww": 21,
"controller/datetime": 25
"controller/datetime": 25,
"connect/datetime": 25,
"connect/name": 51
}
tag_to_tagtype = {
@@ -82,7 +84,23 @@ tag_to_tagtype = {
32: "TAG_TYPE_HS",
33: "TAG_TYPE_HS",
34: "TAG_TYPE_HS",
35: "TAG_TYPE_HS"
35: "TAG_TYPE_HS",
36: "TAG_TYPE_SRC",
37: "TAG_TYPE_SRC",
38: "TAG_TYPE_SRC",
39: "TAG_TYPE_SRC",
40: "TAG_TYPE_SRC",
41: "TAG_TYPE_SRC",
42: "TAG_TYPE_SRC",
43: "TAG_TYPE_SRC",
44: "TAG_TYPE_SRC",
45: "TAG_TYPE_SRC",
46: "TAG_TYPE_SRC",
47: "TAG_TYPE_SRC",
48: "TAG_TYPE_SRC",
49: "TAG_TYPE_SRC",
50: "TAG_TYPE_SRC",
50: "TAG_TYPE_SRC"
}
device_type_names = [

View File

@@ -52,9 +52,6 @@ uint8_t Command::process(const char * path, const bool is_admin, const JsonObjec
return json_message(CommandRet::ERROR, "missing command in path", output);
}
std::string cmd_s;
int8_t id_n = -1; // default hc
// check for a device as first item in the path
const char * device_s = nullptr;
if (!num_paths) {
@@ -79,16 +76,15 @@ uint8_t Command::process(const char * path, const bool is_admin, const JsonObjec
// the next value on the path should be the command or entity name
const char * command_p = nullptr;
char command[COMMAND_MAX_LENGTH];
if (num_paths == 2) {
command_p = p.paths()[1].c_str();
} else if (num_paths == 3) {
// concatenate the path into one string as it could be in the format 'hc/XXX'
char command[COMMAND_MAX_LENGTH];
snprintf(command, sizeof(command), "%s/%s", p.paths()[1].c_str(), p.paths()[2].c_str());
command_p = command;
} else if (num_paths > 3) {
// concatenate the path into one string as it could be in the format 'hc/XXX/attribute'
char command[COMMAND_MAX_LENGTH];
snprintf(command, sizeof(command), "%s/%s/%s", p.paths()[1].c_str(), p.paths()[2].c_str(), p.paths()[3].c_str());
command_p = command;
} else {
@@ -100,6 +96,7 @@ uint8_t Command::process(const char * path, const bool is_admin, const JsonObjec
}
}
int8_t id_n = -1; // default hc
// some commands may be prefixed with hc. dhw. or hc/ or dhw/ so extract these if they exist
// parse_command_string returns the extracted command
if (device_type >= EMSdevice::DeviceType::BOILER) {

View File

@@ -698,9 +698,9 @@ void EMSESP::publish_other_values() {
publish_device_values(EMSdevice::DeviceType::EXTENSION);
publish_device_values(EMSdevice::DeviceType::ALERT);
publish_device_values(EMSdevice::DeviceType::POOL);
publish_device_values(EMSdevice::DeviceType::CONNECT);
// other EMS devices without values yet
// publish_device_values(EMSdevice::DeviceType::GATEWAY);
// publish_device_values(EMSdevice::DeviceType::CONNECT);
// publish_device_values(EMSdevice::DeviceType::GENERIC);
webSchedulerService.publish();

View File

@@ -455,12 +455,10 @@ int Modbus::getRegisterCount(const DeviceValue & dv) {
uint32_t num_values = std::max(dv.max, (uint32_t)abs(dv.min));
int num_registers = 0;
if (num_values <= (1L << 8))
if (num_values < (1L << 16))
num_registers = 1;
else if (num_values <= (1L << 16))
else if (num_values <= (0xFFFFFFFF))
num_registers = 2;
else if (num_values <= (1L << 32))
num_registers = 4;
else
LOG_ERROR("num_registers is too big to be encoded with modbus registers");

View File

@@ -941,9 +941,9 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
48,
63);
register_device_value(
DeviceValueTAG::TAG_DHW1, &wwComfDiffTemp_, DeviceValueType::UINT8, FL_(wwComfDiffTemp), DeviceValueUOM::K, MAKE_CF_CB(set_wwComfDiffTemp), 6, 12);
DeviceValueTAG::TAG_DHW1, &wwComfDiffTemp_, DeviceValueType::UINT8, FL_(wwComfDiffTemp), DeviceValueUOM::K, MAKE_CF_CB(set_wwComfDiffTemp), 4, 12);
register_device_value(
DeviceValueTAG::TAG_DHW1, &wwEcoDiffTemp_, DeviceValueType::UINT8, FL_(wwEcoDiffTemp), DeviceValueUOM::K, MAKE_CF_CB(set_wwEcoDiffTemp), 6, 12);
DeviceValueTAG::TAG_DHW1, &wwEcoDiffTemp_, DeviceValueType::UINT8, FL_(wwEcoDiffTemp), DeviceValueUOM::K, MAKE_CF_CB(set_wwEcoDiffTemp), 4, 12);
register_device_value(DeviceValueTAG::TAG_DHW1,
&wwEcoPlusDiffTemp_,
DeviceValueType::UINT8,

View File

@@ -87,7 +87,7 @@ void Connect::register_device_values_room(std::shared_ptr<Connect::RoomCircuit>
register_device_value(tag, &room->dewtemp_, DeviceValueType::INT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(dewTemperature), DeviceValueUOM::DEGREES);
register_device_value(
tag, &room->seltemp_, DeviceValueType::UINT8, DeviceValueNumOp::DV_NUMOP_DIV2, FL_(selRoomTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_seltemp), 5, 30);
register_device_value(tag, &room->mode_, DeviceValueType::ENUM, FL_(enum_mode8), FL_(mode), DeviceValueUOM::NONE, MAKE_CF_CB(set_mode));
register_device_value(tag, &room->mode_, DeviceValueType::ENUM, FL_(enum_mode2), FL_(mode), DeviceValueUOM::NONE, MAKE_CF_CB(set_mode));
register_device_value(tag, &room->name_, DeviceValueType::STRING, FL_(name), DeviceValueUOM::NONE, MAKE_CF_CB(set_name));
register_device_value(tag, &room->childlock_, DeviceValueType::BOOL, FL_(childlock), DeviceValueUOM::NONE, MAKE_CF_CB(set_childlock));
register_device_value(tag, &room->icon_, DeviceValueType::ENUM, FL_(enum_icons), FL_(icon), DeviceValueUOM::NONE, MAKE_CF_CB(set_icon));
@@ -145,7 +145,8 @@ void Connect::process_roomThermostatName(std::shared_ptr<const Telegram> telegra
has_update(telegram, rc->icon_, 0);
for (uint8_t i = telegram->offset; i < telegram->message_length + telegram->offset && i < 100; i++) {
if ((i > 1) && (i % 2) == 0) {
rc->name_[(i - 2) / 2] = telegram->message_data[i - telegram->offset];
// replace ISOLatin1 characters with questionmark
rc->name_[(i - 2) / 2] = telegram->message_data[i - telegram->offset] & 0x80 ? '?' : telegram->message_data[i - telegram->offset];
}
}
rc->name_[50] = '\0'; // make sure name is terminated
@@ -158,8 +159,8 @@ void Connect::process_roomThermostatSettings(std::shared_ptr<const Telegram> tel
if (rc == nullptr) {
return;
}
// has_enumupdate(telegram, rc->mode_, 0, {3, 1, 0}); // modes off, manual auto
has_update(telegram, rc->mode_, 0);
has_enumupdate(telegram, rc->mode_, 0, {3, 1, 0}); // modes off, manual auto
// has_update(telegram, rc->mode_, 0); // modes: auto, heat, cool, off
// has_update(telegram, rc->tempautotemp_, 1); // FF means off
// has_update(telegram, rc->manualtemp_, 3);
has_update(telegram, rc->childlock_, 7);
@@ -183,9 +184,14 @@ void Connect::process_roomThermostatData(std::shared_ptr<const Telegram> telegra
// schedule for all thermostats
void Connect::process_roomSchedule(std::shared_ptr<const Telegram> telegram) {
toggle_fetch(telegram->type_id, false); // fetch only once
auto length = ((telegram->offset + telegram->message_length) > 126) ? 126 - telegram->offset : telegram->message_length;
uint8_t length = ((telegram->offset + telegram->message_length) > 126) ? 126 - telegram->offset : telegram->message_length;
memcpy(&schedule_[telegram->offset], telegram->message_data, length);
for (uint8_t c : schedule_) {
if (c == 0xFE) {
return;
}
}
toggle_fetch(telegram->type_id, false); // fetch only once if all is initialized
}
// Settings:
@@ -196,8 +202,8 @@ bool Connect::set_mode(const char * value, const int8_t id) {
return false;
}
uint8_t v;
// if (Helpers::value2enum(value, v, FL_(enum_mode2), {3, 1, 0})) {
if (Helpers::value2enum(value, v, FL_(enum_mode8))) {
if (Helpers::value2enum(value, v, FL_(enum_mode2), {3, 1, 0})) {
// if (Helpers::value2enum(value, v, FL_(enum_mode8))) {
write_command(0xBB5 + rc->room(), 0, v); // no validate, mode change is broadcasted
return true;
}
@@ -228,6 +234,9 @@ bool Connect::set_name(const char * value, const int8_t id) {
for (uint8_t i = 0; i < strlen(value) + 1; i++) { // include terminating '\0'
data[2 * i] = 0;
data[2 * i + 1] = value[i];
if (value[i] & 0x80) { // accept only ascii names
return false;
}
}
uint8_t ofs = 0;
while (len > 0) {

View File

@@ -73,7 +73,7 @@ class Connect : public EMSdevice {
void process_OutdoorTemp(std::shared_ptr<const Telegram> telegram);
void process_RCTime(std::shared_ptr<const Telegram> telegram);
int16_t outdoorTemp_;
char dateTime_[30]; // date and time stamp
char dateTime_[25]; // date and time stamp
uint8_t schedule_[126]; // telegram copy
};

View File

@@ -1070,7 +1070,7 @@ void Thermostat::process_JunkersWW(std::shared_ptr<const Telegram> telegram) {
// 0x11E
void Thermostat::process_JunkersDisp(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, ibaMainDisplay_, 1);
has_enumupdate(telegram, ibaMainDisplay_, 1, 1);
has_update(telegram, ibaLanguage_, 3);
}
@@ -2029,7 +2029,7 @@ bool Thermostat::set_display(const char * value, const int8_t id) {
uint8_t ds;
if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) {
if (Helpers::value2enum(value, ds, FL_(enum_ibaMainDisplayJ))) {
write_command(0x11E, 1, ds, 0x11E);
write_command(0x11E, 1, ds + 1, 0x11E);
return true;
}
} else {

View File

@@ -318,7 +318,7 @@ const char * run_console_command(const char * command) {
}
void console_test1() {
auto expected_response = "Log level: DEBUG";
auto expected_response = "Log level: DEBUG\n";
TEST_ASSERT_EQUAL_STRING(expected_response, run_console_command("log"));
}
@@ -329,7 +329,7 @@ void console_test2() {
void console_test3() {
// test bad command
auto expected_response = "Bad syntax. Check arguments.";
auto expected_response = "Bad syntax. Check arguments.\n";
TEST_ASSERT_EQUAL_STRING(expected_response, run_console_command("call thermostat mode bad"));
}

View File

@@ -176,8 +176,8 @@ void test_21() {
"\"maxWebLogBuffer\":25,\"modbusEnabled\":false,\"forceHeatingOff\":false,\"developerMode\":false},\"devices\":[{\"type\":\"boiler\",\"name\":\"My "
"Custom "
"Boiler\",\"deviceID\":\"0x08\",\"productID\":123,\"brand\":\"\",\"version\":\"01.00\",\"entities\":38,\"handlersReceived\":\"0x18\","
"\"handlersFetched\":\"0x14 0x33\",\"handlersPending\":\"0xBF 0x10 0x11 0xC2 0xC6 0x15 0x1C 0x19 0x1A 0x35 0x34 0x2A 0xD1 0xE3 0xE4 0xE5 0xE9 0x2E "
"0x3B\"},{\"type\":\"thermostat\",\"name\":\"FW120\",\"deviceID\":\"0x10\",\"productID\":192,\"brand\":\"\",\"version\":\"01.00\",\"entities\":15,"
"\"handlersFetched\":\"0x14 0x33\",\"handlersPending\":\"0xBF 0x10 0x11 0xC2 0xC6 0x15 0x1C 0x19 0x1A 0x35 0x34 0x2A 0xD1 0xE3 0xE4 0xE5 0xE9 0x02E0 "
"0x2E 0x3B\"},{\"type\":\"thermostat\",\"name\":\"FW120\",\"deviceID\":\"0x10\",\"productID\":192,\"brand\":\"\",\"version\":\"01.00\",\"entities\":15,"
"\"handlersReceived\":\"0x016F\",\"handlersFetched\":\"0x0170 0x0171\",\"handlersPending\":\"0xA3 0x06 0xA2 0x12 0x13 0x0172 0x0165 "
"0x0168\"},{\"type\":\"temperaturesensor\",\"name\":\"temperaturesensor\",\"entities\":2},{\"type\":\"analogsensor\",\"name\":\"analogsensor\","
"\"entities\":4},{\"type\":\"scheduler\",\"name\":\"scheduler\",\"entities\":2},{\"type\":\"custom\",\"name\":\"custom\",\"entities\":4}]}]";
@@ -202,8 +202,8 @@ void test_22() {
"\"maxWebLogBuffer\":25,\"modbusEnabled\":false,\"forceHeatingOff\":false,\"developerMode\":false},\"devices\":[{\"type\":\"boiler\",\"name\":\"My "
"Custom "
"Boiler\",\"deviceID\":\"0x08\",\"productID\":123,\"brand\":\"\",\"version\":\"01.00\",\"entities\":38,\"handlersReceived\":\"0x18\","
"\"handlersFetched\":\"0x14 0x33\",\"handlersPending\":\"0xBF 0x10 0x11 0xC2 0xC6 0x15 0x1C 0x19 0x1A 0x35 0x34 0x2A 0xD1 0xE3 0xE4 0xE5 0xE9 0x2E "
"0x3B\"},{\"type\":\"thermostat\",\"name\":\"FW120\",\"deviceID\":\"0x10\",\"productID\":192,\"brand\":\"\",\"version\":\"01.00\",\"entities\":15,"
"\"handlersFetched\":\"0x14 0x33\",\"handlersPending\":\"0xBF 0x10 0x11 0xC2 0xC6 0x15 0x1C 0x19 0x1A 0x35 0x34 0x2A 0xD1 0xE3 0xE4 0xE5 0xE9 0x02E0 "
"0x2E 0x3B\"},{\"type\":\"thermostat\",\"name\":\"FW120\",\"deviceID\":\"0x10\",\"productID\":192,\"brand\":\"\",\"version\":\"01.00\",\"entities\":15,"
"\"handlersReceived\":\"0x016F\",\"handlersFetched\":\"0x0170 0x0171\",\"handlersPending\":\"0xA3 0x06 0xA2 0x12 0x13 0x0172 0x0165 "
"0x0168\"},{\"type\":\"temperaturesensor\",\"name\":\"temperaturesensor\",\"entities\":2},{\"type\":\"analogsensor\",\"name\":\"analogsensor\","
"\"entities\":4},{\"type\":\"scheduler\",\"name\":\"scheduler\",\"entities\":2},{\"type\":\"custom\",\"name\":\"custom\",\"entities\":4}]}]";