fix(midea): MSmartHome login numeric types (value is illegal) - #198
Merged
Conversation
… (value is illegal)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Midea: MSmartHome-Cloud-Login „value is illegal" beheben
Befund (real, gemeldet): MSmartHome-Login wird von der Midea-Cloud mit „value is illegal" abgelehnt.
Ursache (byte-genauer Abgleich gegen
msmart-ng/cloud.py): Wir sendetenformat/clientType(Common-Request-Body) undplatform/clientType(Login-data/iotData) als Strings ("2"/"1"). Die Referenz nutzt Zahlen (BaseCloud.FORMAT = 2,CLIENT_TYPE = 1). Die Midea-Cloud validiert diese Felder typstreng und antwortet bei"2"/"1"mit „value is illegal".Fix:
format: 2,clientType: 1(numerisch) im MSmartHome-Common-Body.data.platform: 2,iotData.clientType: 1(numerisch) im/mj/user/login-Body.… (Midea-Code <n>)), damit ein etwaiger Rest-Fehler ohne Live-Zugang weiter diagnostiziert werden kann.Tests: Neuer deterministischer Test stubt
fetchund prüft, dass der MSmartHome-Requestformat/clientTypeals number (nicht string) sendet, inkl. Common-Felder + Passthrough. Volle midea-Suite grün (42 Tests, 40 pass / 2 Live-Skip / 0 fail).Wichtig — Live-Verifikation steht aus: Der eigentliche Cloud-Login lässt sich nur gegen die echte Midea-Cloud beweisen (kein CI-Zugang). Wenn nach Deploy weiterhin ein Fehler kommt, zeigt die Meldung jetzt den Midea-Code → nächster gezielter Schritt. Andernfalls bleibt NetHome Plus der dokumentierte Fallback.
🤖 Generated with Claude Code