Compare commits

..
Author SHA1 Message Date
rootandClaude Opus 5.5 458472ff76 docs(energy): note the meter converter's stray ACKs and Deye resets
CI / Check (gateway, backend, frontend) (push) Successful in 1m9s
Both show up in the Pi's journal and look like faults: packets from a
public address on port 502, and Deye going down every 3 hours. Neither
loses readings, so record them where the next reader looks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015x6FWeKCY59JfFJmzAm4TL
2026-10-25 14:30:53 +01:00
3 changed files with 10 additions and 8 deletions

No files matched your search

@@ -133,7 +133,7 @@ class GatewayEndToEndTest {
waitFor(() -> controllerWrites().size() == 2);
assertEquals(List.of(1, 4143, 38), controllerWrites().get(1));
assertEquals(1, controller.peakOpenConnections(), "the MK01 drops a client when a second one connects");
assertEquals(1, controller.connections(), "the MK01 drops a client when a second one connects");
gateway.close(); // flushes the audit lines, which otherwise wait for the next flush period
var audit = auditLines().toList();
@@ -30,7 +30,6 @@ public final class MockModbusServer implements Closeable {
private final Map<Integer, Integer> input = new ConcurrentHashMap<>();
private final AtomicInteger connections = new AtomicInteger();
private final AtomicInteger open = new AtomicInteger();
private final AtomicInteger peakOpen = new AtomicInteger();
private final List<int[]> writes = new CopyOnWriteArrayList<>();
private final List<int[]> multipleWrites = new CopyOnWriteArrayList<>();
private volatile Duration responseDelay = Duration.ZERO;
@@ -69,11 +68,6 @@ public final class MockModbusServer implements Closeable {
return open.get();
}
/** The most connections that were open at the same time. */
public int peakOpenConnections() {
return peakOpen.get();
}
public void holding(int address, int value) {
holding.put(address, value);
}
@@ -141,7 +135,7 @@ public final class MockModbusServer implements Closeable {
try {
Socket client = server.accept();
connections.incrementAndGet();
peakOpen.accumulateAndGet(open.incrementAndGet(), Math::max);
open.incrementAndGet();
Thread.ofVirtual().start(() -> serve(client));
} catch (IOException e) {
return;
+8
View File
@@ -93,6 +93,14 @@ House meter SDM630 (`electricity.PRAD2`): `total_power_active` is **+ import /
Deye grid registers. Checked 2026-10-23 in InfluxDB: −2.5 to −5.5 kW between 11:00 and 15:00 local
while PV exported, +645 W at night matching Deye's 640 W import.
Link quirks seen from the gateway on the Pi (2026-10-24/25), both harmless to the readings:
- The meter's RS485 converter (`192.168.0.10`, MAC `d8:b0:4c:bc:7a:8e`) sends late TCP ACKs from
port 502 with the source address `76.85.0.32` (TTL 255, so from the LAN, not the internet).
ufw drops them, about 1800 `[UFW BLOCK]` journal lines a day; the polls themselves succeed.
- The Solarman logger resets our connection about every 3 h, always near :12
(`deye is down: Connection reset`); the next poll a minute later works again.
Considered and rejected (2026-10-23): pointing the logger's second server ("Server B") at our
backend. Push frames are poorly documented binary data every ~5 min, need a TCP server with
acks, and a wrong setting could cut off the Solarman cloud my father uses. Local FC3 polling