feat: implement reliable event counting via 1E/1F chain and update device info
This commit is contained in:
@@ -264,7 +264,11 @@ def device_info(
|
||||
try:
|
||||
def _do():
|
||||
with _build_client(port, baud, host, tcp_port) as client:
|
||||
return client.connect()
|
||||
info = client.connect()
|
||||
# SUB 08 event_count is unreliable (always returns 1 regardless of
|
||||
# actual storage). Count via 1E/1F chain instead.
|
||||
info.event_count = client.count_events()
|
||||
return info
|
||||
info = _run_with_retry(_do, is_tcp=_is_tcp(host))
|
||||
except HTTPException:
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user