docs(gateway): update diagrams following review feedback

- Simplify class diagram: remove KEY_* constants, add is_duplicate
  and on_disconnect, keep only behavior-relevant elements
- Update sequence diagram: replace repeated conditions with else,
  add deduplication step, update payload size to 14 bytes
This commit is contained in:
DjeAvd authored and Klagarge committed 2026-06-04 12:32:48 +02:00
1 parent 081f0200c3
commit ddcdb32e4e
2 files changed
+21 -14

No files matched your search

@@ -11,7 +11,7 @@ thingy -> gw : BLE advertising packet
alt company_id != 0xffff
gw -> gw : discard packet
else company_id == 0xffff
else
gw -> gw : check payload size
alt payload size != 14 bytes
@@ -21,15 +21,19 @@ else company_id == 0xffff
alt unknown key in payload
gw -> gw : discard packet\nlog debug
else valid keys
else
alt CO2 == 0xFFFFFFFF
gw -> gw : discard CO2 value\n(sensor not ready)
end
gw -> gw : add UTC timestamp
gw -> broker : publish JSON\n{gateway_id}/{mac}/update
broker --> gw : on_publish confirmed
broker -> db : store measurement
alt duplicate within 10 seconds
gw -> gw : discard packet\n(deduplication)
else
gw -> gw : add UTC timestamp
gw -> broker : publish JSON\n{gateway_id}/{mac}/update
broker --> gw : on_publish confirmed
broker -> db : store measurement
end
end
end
end