The charger was never asked what it is set to

The trigger buys telemetry and only telemetry, so a charger that has been
read a hundred times and commanded none reports amps, volts and nothing
else: no schedule, no balancing, no Modbus server, not even its firmware.
The message that asks for that half is 0040, and the reference keeps it
commented out because the app sends its timestamp without a value type.
The app is what the charger answers, so the oddity is reproduced rather
than corrected — sent when the settings half is missing or older than ten
minutes, waited four seconds for, and after three unanswered requests
still sent but no longer waited on.

The three settings the panel has and the writer did not — swipe up, swipe
down, smart touch — are writable now, which is all eleven of the 0100
commands. Nothing else in the map was missing: every named field of every
message was already decoded, and the raw keys the card shows are fields
the reference does not name either.

Both cards drop a row with nothing in it, which turned a charger that
reports only its ceiling into a charger that reports no current range at
all. Half a range is still a bound.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
tajniak81andClaude Opus 5 committed 2026-09-02 23:05:40 +02:00
1 parent 3f9d5b943f
commit b2d333a63f
13 files changed
+171 -4

No files matched your search

@@ -42,6 +42,35 @@ func TestEncodeFrameMatchesTheDocumentedTrigger(t *testing.T) {
}
}
// The status request is the one command whose timestamp travels without a value
// type — the app sends it that way, and the charger answers what the app sends.
func TestStatusRequestSendsItsClockWithoutAValueType(t *testing.T) {
got, err := encodeFrame(msgEVStatusReq, []cmdField{bareTimestampField(time.Unix(1756813256, 0))})
if err != nil {
t.Fatalf("encodeFrame: %v", err)
}
want := "ff09100003000f0040" + // header: marker, length 16, send pattern, type 0040
"fe04c8d7b668" // fe: four clock bytes, no value type between the length and them
if h := encodeHex(got); h[:len(want)] != want {
t.Fatalf("frame = %s\nwant %s + checksum", h, want)
}
if len(got) != 16 {
t.Errorf("frame is %d bytes, want 16", len(got))
}
// The field's length byte counts the value alone, since there is no type byte
// to count — the whole point of the oddity.
if got[10] != 4 {
t.Errorf("fe length byte is %d, want 4", got[10])
}
var sum byte
for _, b := range got {
sum ^= b
}
if sum != 0 {
t.Errorf("checksum does not close the frame: %02x", sum)
}
}
// A frame is only self-consistent if XORing every byte, checksum included,
// comes to zero — which is exactly what the decoder checks.
func TestEncodeFrameChecksumClosesToZero(t *testing.T) {