Skip to content

Commit

Permalink
Merge pull request #2139 from MichaelDvP/dev
Browse files Browse the repository at this point in the history
cz translation #2096, MH210 mapping #2138
  • Loading branch information
proddy authored Oct 25, 2024
2 parents b2c5a38 + 108f91b commit 76af1b7
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 61 deletions.
4 changes: 2 additions & 2 deletions interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
"typescript": "^5.6.3"
},
"devDependencies": {
"@babel/core": "^7.25.9",
"@babel/core": "^7.26.0",
"@eslint/js": "^9.13.0",
"@preact/compat": "^18.3.1",
"@preact/preset-vite": "^2.9.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/formidable": "^3",
"@types/node": "^22.7.9",
"@types/node": "^22.8.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react-router-dom": "^5.3.3",
Expand Down
110 changes: 72 additions & 38 deletions interface/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ __metadata:
languageName: node
linkType: hard

"@babel/code-frame@npm:^7.26.0":
version: 7.26.0
resolution: "@babel/code-frame@npm:7.26.0"
dependencies:
"@babel/helper-validator-identifier": "npm:^7.25.9"
js-tokens: "npm:^4.0.0"
picocolors: "npm:^1.0.0"
checksum: 10c0/46f7e367714be736b52ea3c01b24f47e2102e210fb83021d1c8237d8fc511b9538909e16e2fcdbb5cb6173e0794e28624309a59014e52fcfb7bde908f5284388
languageName: node
linkType: hard

"@babel/compat-data@npm:^7.25.2":
version: 7.25.4
resolution: "@babel/compat-data@npm:7.25.4"
Expand Down Expand Up @@ -90,26 +101,26 @@ __metadata:
languageName: node
linkType: hard

"@babel/core@npm:^7.25.9":
version: 7.25.9
resolution: "@babel/core@npm:7.25.9"
"@babel/core@npm:^7.26.0":
version: 7.26.0
resolution: "@babel/core@npm:7.26.0"
dependencies:
"@ampproject/remapping": "npm:^2.2.0"
"@babel/code-frame": "npm:^7.25.9"
"@babel/generator": "npm:^7.25.9"
"@babel/code-frame": "npm:^7.26.0"
"@babel/generator": "npm:^7.26.0"
"@babel/helper-compilation-targets": "npm:^7.25.9"
"@babel/helper-module-transforms": "npm:^7.25.9"
"@babel/helpers": "npm:^7.25.9"
"@babel/parser": "npm:^7.25.9"
"@babel/helper-module-transforms": "npm:^7.26.0"
"@babel/helpers": "npm:^7.26.0"
"@babel/parser": "npm:^7.26.0"
"@babel/template": "npm:^7.25.9"
"@babel/traverse": "npm:^7.25.9"
"@babel/types": "npm:^7.25.9"
"@babel/types": "npm:^7.26.0"
convert-source-map: "npm:^2.0.0"
debug: "npm:^4.1.0"
gensync: "npm:^1.0.0-beta.2"
json5: "npm:^2.2.3"
semver: "npm:^6.3.1"
checksum: 10c0/40d3064ebe906f65ed4153a0f4d75c679a19e4d71e425035b7bbe2d292a9167274f1a0d908d4d6c8f484fcddeb10bd91e0c7878fdb3dfad1bb00f6a319ce431d
checksum: 10c0/91de73a7ff5c4049fbc747930aa039300e4d2670c2a91f5aa622f1b4868600fc89b01b6278385fbcd46f9574186fa3d9b376a9e7538e50f8d118ec13cfbcb63e
languageName: node
linkType: hard

Expand Down Expand Up @@ -148,6 +159,19 @@ __metadata:
languageName: node
linkType: hard

"@babel/generator@npm:^7.26.0":
version: 7.26.0
resolution: "@babel/generator@npm:7.26.0"
dependencies:
"@babel/parser": "npm:^7.26.0"
"@babel/types": "npm:^7.26.0"
"@jridgewell/gen-mapping": "npm:^0.3.5"
"@jridgewell/trace-mapping": "npm:^0.3.25"
jsesc: "npm:^3.0.2"
checksum: 10c0/b6bb9185f19a97eaf58e04a6d39a13237076678e7ed16b6321dea914535d4bf6a8d7727c9dcb65539845aa0096b326eb67be4bab764bd74bcfd848e2eda68609
languageName: node
linkType: hard

"@babel/helper-annotate-as-pure@npm:^7.24.7":
version: 7.24.7
resolution: "@babel/helper-annotate-as-pure@npm:7.24.7"
Expand Down Expand Up @@ -245,17 +269,16 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-module-transforms@npm:^7.25.9":
version: 7.25.9
resolution: "@babel/helper-module-transforms@npm:7.25.9"
"@babel/helper-module-transforms@npm:^7.26.0":
version: 7.26.0
resolution: "@babel/helper-module-transforms@npm:7.26.0"
dependencies:
"@babel/helper-module-imports": "npm:^7.25.9"
"@babel/helper-simple-access": "npm:^7.25.9"
"@babel/helper-validator-identifier": "npm:^7.25.9"
"@babel/traverse": "npm:^7.25.9"
peerDependencies:
"@babel/core": ^7.0.0
checksum: 10c0/cd005e7585806845d79c5c0ca9e8926f186b430b0a558dad08a3611365eaad3ac587672b0d903530117dec454f48b6bdc3d164b19ea1b71ca1b4eb3be7b452ef
checksum: 10c0/ee111b68a5933481d76633dad9cdab30c41df4479f0e5e1cc4756dc9447c1afd2c9473b5ba006362e35b17f4ebddd5fca090233bef8dfc84dca9d9127e56ec3a
languageName: node
linkType: hard

Expand All @@ -276,16 +299,6 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-simple-access@npm:^7.25.9":
version: 7.25.9
resolution: "@babel/helper-simple-access@npm:7.25.9"
dependencies:
"@babel/traverse": "npm:^7.25.9"
"@babel/types": "npm:^7.25.9"
checksum: 10c0/3f1bcdb88ee3883ccf86959869a867f6bbf8c4737cd44fb9f799c38e54f67474590bc66802500ae9fe18161792875b2cfb7ec15673f48ed6c8663f6d09686ca8
languageName: node
linkType: hard

"@babel/helper-split-export-declaration@npm:^7.22.6":
version: 7.24.7
resolution: "@babel/helper-split-export-declaration@npm:7.24.7"
Expand Down Expand Up @@ -347,13 +360,13 @@ __metadata:
languageName: node
linkType: hard

"@babel/helpers@npm:^7.25.9":
version: 7.25.9
resolution: "@babel/helpers@npm:7.25.9"
"@babel/helpers@npm:^7.26.0":
version: 7.26.0
resolution: "@babel/helpers@npm:7.26.0"
dependencies:
"@babel/template": "npm:^7.25.9"
"@babel/types": "npm:^7.25.9"
checksum: 10c0/4354fbf050291937d0f127f6f927a0c471b604524e0767516fefb91dc36427f25904dd0d2b2b3bbc66bce1894c680cc37eac9ab46970d70f24bf3e53375612de
"@babel/types": "npm:^7.26.0"
checksum: 10c0/343333cced6946fe46617690a1d0789346960910225ce359021a88a60a65bc0d791f0c5d240c0ed46cf8cc63b5fd7df52734ff14e43b9c32feae2b61b1647097
languageName: node
linkType: hard

Expand Down Expand Up @@ -403,6 +416,17 @@ __metadata:
languageName: node
linkType: hard

"@babel/parser@npm:^7.26.0":
version: 7.26.0
resolution: "@babel/parser@npm:7.26.0"
dependencies:
"@babel/types": "npm:^7.26.0"
bin:
parser: ./bin/babel-parser.js
checksum: 10c0/05619e239be811f4d8a9f471534c0d7dbc44faf38f6a6445663710982d2f9b057be43b4d18906d4e28830958752bdadbf88903abf687304a2bda86c4b3489455
languageName: node
linkType: hard

"@babel/plugin-syntax-jsx@npm:^7.24.7":
version: 7.24.7
resolution: "@babel/plugin-syntax-jsx@npm:7.24.7"
Expand Down Expand Up @@ -559,6 +583,16 @@ __metadata:
languageName: node
linkType: hard

"@babel/types@npm:^7.26.0":
version: 7.26.0
resolution: "@babel/types@npm:7.26.0"
dependencies:
"@babel/helper-string-parser": "npm:^7.25.9"
"@babel/helper-validator-identifier": "npm:^7.25.9"
checksum: 10c0/b694f41ad1597127e16024d766c33a641508aad037abd08d0d1f73af753e1119fa03b4a107d04b5f92cc19c095a594660547ae9bead1db2299212d644b0a5cb8
languageName: node
linkType: hard

"@emotion/babel-plugin@npm:^11.12.0":
version: 11.12.0
resolution: "@emotion/babel-plugin@npm:11.12.0"
Expand Down Expand Up @@ -1662,12 +1696,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^22.7.9":
version: 22.7.9
resolution: "@types/node@npm:22.7.9"
"@types/node@npm:^22.8.0":
version: 22.8.0
resolution: "@types/node@npm:22.8.0"
dependencies:
undici-types: "npm:~6.19.2"
checksum: 10c0/2d1917702b9d9ede8e4d8151cd8b1af8bc147d543486474ffbe0742e38764ea73105939e6a767addf7a4c39e842e16eae762bff90617d7b7f9ee3fbbb2d23bfa
undici-types: "npm:~6.19.8"
checksum: 10c0/21eb10cee768d32e965d095415a4c6a7752f26bfcc34a8c1d7ab3989a6ab13a51761cc245909570d59c6bdacbdfd055d307dc6b201ac04305c57e65c1e7bf5be
languageName: node
linkType: hard

Expand Down Expand Up @@ -1883,7 +1917,7 @@ __metadata:
resolution: "EMS-ESP@workspace:."
dependencies:
"@alova/adapter-xhr": "npm:2.0.9"
"@babel/core": "npm:^7.25.9"
"@babel/core": "npm:^7.26.0"
"@emotion/react": "npm:^11.13.3"
"@emotion/styled": "npm:^11.13.0"
"@eslint/js": "npm:^9.13.0"
Expand All @@ -1894,7 +1928,7 @@ __metadata:
"@table-library/react-table-library": "npm:4.1.7"
"@trivago/prettier-plugin-sort-imports": "npm:^4.3.0"
"@types/formidable": "npm:^3"
"@types/node": "npm:^22.7.9"
"@types/node": "npm:^22.8.0"
"@types/react": "npm:^18.3.12"
"@types/react-dom": "npm:^18.3.1"
"@types/react-router-dom": "npm:^5.3.3"
Expand Down Expand Up @@ -7063,7 +7097,7 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.19.2":
"undici-types@npm:~6.19.2, undici-types@npm:~6.19.8":
version: 6.19.8
resolution: "undici-types@npm:6.19.8"
checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344
Expand Down
2 changes: 2 additions & 0 deletions src/emsdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ class EMSdevice {
static constexpr uint8_t EMS_DEVICE_ID_RFBASE = 0x50;
static constexpr uint8_t EMS_DEVICE_ID_ROOMTHERMOSTAT = 0x17; // TADO using this with no version reply #174
static constexpr uint8_t EMS_DEVICE_ID_TADO_OLD = 0x19; // older TADO using this with no version reply, #1031
static constexpr uint8_t EMS_DEVICE_ID_MIXER1 = 0x20; // e.g MH210 module as mixer
static constexpr uint8_t EMS_DEVICE_ID_MIXER8 = 0x27;
static constexpr uint8_t EMS_DEVICE_ID_DHW1 = 0x28; // MM100 module as water station
static constexpr uint8_t EMS_DEVICE_ID_DHW2 = 0x29; // MM100 module as water station
static constexpr uint8_t EMS_DEVICE_ID_DHW8 = 0x2F; // last DHW module id?
Expand Down
7 changes: 7 additions & 0 deletions src/emsesp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,13 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
device_type = DeviceType::WATER;
}

// set MH210 with id 0x20 as mixer, see https://github.com/emsesp/EMS-ESP32/discussions/2138
if (product_id == 248 && device_id >= EMSdevice::EMS_DEVICE_ID_MIXER1 && device_id <= EMSdevice::EMS_DEVICE_ID_MIXER8) {
default_name = "MH210";
device_type = DeviceType::MIXER;
flags = DeviceFlags::EMS_DEVICE_FLAG_MMPLUS;
}

// CR120 have version 22.xx, RC400/CW100 uses version 42.xx, see https://github.com/emsesp/EMS-ESP32/discussions/1779
if (product_id == 157 && version[0] == '2') {
flags = DeviceFlags::EMS_DEVICE_FLAG_CR120;
Expand Down
Loading

0 comments on commit 76af1b7

Please sign in to comment.