Fix T0xE1 dishwasher programs falling back to ECO - #229
Conversation
|
@phntom Thanks for this PR – fixing the program selection and adding native delayed start for T0xE1 dishwashers is very valuable, and the hardware verification you've done is impressive! 🚀 Before we can merge this, I need to bring your attention to PR #226, which also targets T0xE1 devices with a broader auto‑adaptation approach. Both PRs modify overlapping parts of the codebase (especially Could you please take a look at #226 and coordinate with @noisi‑x? Ideally, you two can discuss the best way to combine or reconcile your changes – perhaps merging the delayed‑start service from your PR into the auto‑adaptation framework, or aligning the program‑selection fixes with the cloud‑config logic in #226. Once you've reached an agreement on a unified approach, feel free to update this PR or close it in favor of a combined solution. I'm happy to review and merge the final result. Let me know if you need any help facilitating the discussion. Thanks again for your contribution! 🙏 |
The explicit T0xE1 profiles pass *_wash names to a Lua encoder that only accepts values such as normal, eco, glass, and rapid. Unknown values fall back to ECO, so selecting most programs starts the wrong cycle. Keep the existing Home Assistant option keys, map their payloads to the codec vocabulary across all affected explicit profiles, and remove options the codec cannot encode.
f7b58e9 to
74294f4
Compare
|
Thanks, @sususweet. I reviewed #226 and applied a scope split to this PR:
Both HACS and hassfest pass on the rewritten PR. @NOisi-x: the remaining fix is independent of cloud auto-adaptation—it only corrects invalid static payload values that the current Lua codec otherwise converts to ECO. I preserved the delayed-start work separately and will coordinate that proposal with the general design in #226 before asking for it to be merged. |
|
@phntom Sorry for the late reply, and thank you very much for your work. I would like to ask a favor. Are you logged in using an MSmartHome account? Could you please help confirm whether there is a consistent or similar API endpoint to getAppModelConfig under MSmartHome? Its function is to return the front-end rendering specifications for the APP according to the SN8 encoding. I would like to know if its return data is consistent with that of Meidimeiju. Thank you very much! |
|
Yes, I use an MSmartHome account. I tested |
|
@phntom Thank you for your efforts! I also tested the Meiju ( I verified the api call with SN8 SN8
|
| key | count | example SN8s |
|---|---|---|
withoutLockOnStart |
76 | 76006485, 760RX10P, 7600JV20, ... |
keepOffOnPowerOff |
4 | 000000X4, 000000Y1, ... |
deviceUploadFaltDataOnPower |
3 | 000000K2, 000000K1, ... |
doorOff |
1 | 00003906 |
diffBrand |
16 | 7600001Z, 760Y0016, ... |
devOffKeep |
70+ | 0000D25A, 760P40T1, ... |
Request Format
POST https://mp-prod.smartmidea.net/mas/v5/app/proxy?alias=/cfhrs/common/v1/api
Headers
content-type: application/json; charset=utf-8
secretVersion: 1
accesstoken: <Meiju access token from /mj/user/login>
random: <unix timestamp as string>
sign: HMAC-SHA256(iot_key + json_body + random, hmac_key)
Body
{
"msg": "getAppModelConfig",
"params": {
"protype": "e1",
"sn8": "<SN8>"
},
"reqId": "<hex16>",
"stamp": "<YYYYMMDDHHmmss>"
}Working Device Config Example: 760Y0026 (T0xE1 dishwasher)
For comparison, this is what a non-empty config looks like. SN8 760Y0026 returns a ~7KB
config with one top-level key version_0:
Response (outer envelope)
{
"retCode": "0",
"desc": "success",
"result": {
"config": "<escaped JSON string — see below for decoded contents>"
}
}Decoded config structure (inside result.config, after JSON.parse)
{
"version_0": {
"setting": {
"keepTimeType": 0,
"keepStartNow": 1,
"keepSetTime": 1
},
"text": {
"keep": {
"name": "烘干储存",
"desc": "可设置抑菌储存时间"
}
},
"more": {
"ota": 1,
"strainer": 1,
"waterEl": { "el": 1, "water": 1 },
"salt": { "enable": 1 },
"bright": { "enable": 1 },
"lock": 1
},
"modeList": { ... }
}
}Response Schema (on success)
{
"retCode": "0",
"desc": "success",
"result": {
"config": "<JSON string or object>"
}
}Note: the config field may be a JSON string (needs JSON.parse / json.loads) or a nested object, depending on the device.
If you're willing to keep exploring this API under the MSmartHome account, I'd be very happy to compare notes if you dig up anything else!
T0xE1 dishwasher programs fall back to ECO
Summary
default,76006481,7600649Q, and7600V1E7T0xE1 profiles.sending the codec-native mode values expected by the appliance.
classes, cloud adaptation, command building, or services.
Root cause
The downloaded E1 Lua encoder accepts mode values such as
auto,intensive,normal,eco,glass, andrapid. The mappings instead sent values such asauto_wash,strong_wash, andglass_wash. The encoder does not recognizethose values and silently falls back to ECO (
0x04), so selecting most programsstarts an ECO cycle.
For example, the public select option remains
glass_wash, preserving existingtranslations and automations, but its payload changes from:
{"work_status":"work","mode":"glass_wash"}to:
{"work_status":"work","mode":"glass"}The same correction is applied to all affected explicit profiles. Options that
the codec cannot encode are removed instead of allowing them to start ECO.
Relationship to #226
Following the maintainer feedback, this PR has been split down to the minimal,
independent program-selection bugfix. It neither competes with nor depends on
the cloud-config auto-adaptation proposed in #226.
The native delayed-start/raw-command work previously included here has been
removed from this PR and preserved separately. I will coordinate that proposal
with @NOisi-x and the general design in #226 before asking for it to be merged.
Validation
sn8 7600020L) confirmed distinctmode bytes and correct durations for all 13 exposed programs: soak, rapid,
1hour, 90min, glass, self-clean, auto, normal, hygiene, intensive, eco, fruit,
and quiet.
confirmed every emitted mode is accepted by the downloaded E1 Lua encoder.
git diff --checkpass.