Align app version and os - #84
Merged
Merged
Conversation
The version string sent with every cloud HTTP request was stale for all three brands. The login response carries forceUpdate and lastAppVersion, so the server has version-gating machinery, and claiming a years-old client version is a standing risk of being refused. Each brand is a separate white-label build of the same Android codebase, where AppConstants.apiVersion tracks that app's own versionName: IntesisHome 1.2.2 -> 3.3.3 (AC Cloud APK, confirmed live) airconwithme 1.6.2 -> 2.3.3 (APK) anywair 2.9 -> 1.7.3 (current Play release) The anywair value is the notable one: 2.9 matched no release that app has ever shipped. Its APK line runs 1.6.4 -> 1.7.3, and the 1.6.4 build confirms apiVersion tracks versionName there too. Also send "os": "android", which the official apps include alongside the version on every request. Separately, add get_tank_water_temperature(). The app applies two's complement to uid 10, 37 and 45; the first two already had it via get_temperature() and get_outdoor_temperature(), but uid 45 had no accessor at all, so reading it returned the raw unsigned word and any sub-zero tank temperature came back as a large positive number. Done as a new accessor rather than converting at ingest, since twos_complement_16bit is not idempotent and _update_device_state is shared with the local API, which reports these already signed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The app builds its frames with String.format, so they contain no
whitespace:
{"command":"connect_req","data":{"token":123}}
{"command":"set","data":{"deviceId":1,"uid":9,"value":205,"seqNo":7}}
json.dumps defaults to ", " and ": " separators, which is equivalent to
any JSON parser but a different byte sequence on the wire. Pass
separators=(",", ":") so connect_req and set are byte-identical to the
app's templates.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Align API version with the latest official mobile app versions.
Adds 'get_tank_water_temperature' property.