Checklist: verify that sensor data reaches InfluxDB
New guided check "Sensor data in the database (InfluxDB)", also the last step of the Quick check on the green path. It queries InfluxDB (read token) for the newest point per measurement of the box and tells apart: sensor data arrives / status arrives without sensor data / offline now / never seen / check not possible. Polls every 30 s for up to 4 minutes. With a stopped RTC in the log it concludes that sensor readings are lost (stamped 1 Jan 2000): box A4:CB:8F:C9:47:3C sent only device_status and microphone. - service/influx.py: query, CSV parsing, classification (no new deps) - guides: new step type "influx" (host answers via influx_result) - Settings > InfluxDB access (or KOTA_INFLUX_TOKEN); token never logged - service status mapping for tech.influx.* findings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2b6d43eb45
commit
66cb804102
11 files changed
+676
-15
No files matched your search
@@ -16,6 +16,9 @@
|
||||
# counts as ok (used for "watch for N seconds").
|
||||
# route automatic: first current root finding whose rule id is in
|
||||
# `routes` decides; otherwise `default`.
|
||||
# influx the tool asks InfluxDB (online) whether this box's data arrives,
|
||||
# again every `poll_s` until "ok" or `timeout_s`; `outcomes` maps
|
||||
# ok / sensors_missing / silent / never / unavailable -> target.
|
||||
# Targets: "<step id>", "end:<end id>", "guide:<guide id>".
|
||||
# Optional on any step: skip_if_finding / skip_unless_feature (+ skip_to).
|
||||
# Text placeholders: {expected_led} {failing_sensors} {top_finding}
|
||||
@@ -48,14 +51,7 @@ options = [
|
||||
id = "green_route"
|
||||
type = "route"
|
||||
routes = { "rtc.clock_not_running" = "guide:clock", "mic.silent" = "guide:mic", "mic.disabled" = "guide:mic", "matter.not_commissioned" = "guide:network", "net.dns_fail" = "guide:network" }
|
||||
default = "end:healthy"
|
||||
|
||||
[[guide.end]]
|
||||
id = "healthy"
|
||||
severity = "ok"
|
||||
title = "Box looks healthy"
|
||||
text = "Green LED, firmware running and no problems in the log."
|
||||
actions = ["If the customer still reports missing data, keep the tool connected for 5 minutes and check that 'Data uploaded to InfluxDB' gets ticked."]
|
||||
default = "guide:influx"
|
||||
|
||||
[[guide.end]]
|
||||
id = "hung"
|
||||
@@ -169,6 +165,7 @@ text = "Pairing, Internet time and the first upload all worked."
|
||||
actions = [
|
||||
"The box may now download a firmware update (yellow, then orange LED, a few minutes). Do not switch it off.",
|
||||
"It should end green.",
|
||||
"Then run the check 'Sensor data in the database' - the first upload may carry only the box status.",
|
||||
]
|
||||
|
||||
[[guide.end]]
|
||||
@@ -738,3 +735,83 @@ severity = "error"
|
||||
title = "Microphone records nothing"
|
||||
text = "Even loud noise next to the box gives no signal, although the switch is on."
|
||||
actions = ["Check the microphone board/cable (inside the case); replace the microphone if needed."]
|
||||
|
||||
# ================================================================== influx
|
||||
[[guide]]
|
||||
id = "influx"
|
||||
title = "Sensor data in the database (InfluxDB)"
|
||||
summary = "Checks online that the sensor readings of this box reach InfluxDB, not only its status."
|
||||
recommend = ["always"]
|
||||
start = "check"
|
||||
|
||||
[[guide.step]]
|
||||
id = "check"
|
||||
type = "influx"
|
||||
text = "Checking in InfluxDB that this box's data arrives: device status, microphone and the sensors (AS7341, BME688, SEN66). Keep the box switched on and online. The tool checks again every 30 s for up to 4 minutes (the air sensor needs about 2 minutes after a restart). The laptop needs Internet for this check."
|
||||
timeout_s = 240
|
||||
poll_s = 30
|
||||
outcomes = { ok = "end:data_ok", sensors_missing = "why", silent = "end:silent", never = "end:never", unavailable = "end:unavailable" }
|
||||
|
||||
[[guide.step]]
|
||||
id = "why"
|
||||
type = "route"
|
||||
routes = { "kota.rtc_stopped" = "end:sensors_clock", "rtc.clock_not_running" = "end:sensors_clock", "kota.rtc_not_ticking" = "end:sensors_clock", "kota.time_invalid" = "end:sensors_clock", "kota.rtc_read_failed" = "guide:rtc_i2c", "rtc.init_failed" = "guide:rtc_i2c", "sensor.init_failed" = "guide:sensors", "kota.sensor_missing" = "guide:sensors" }
|
||||
default = "end:sensors_missing"
|
||||
|
||||
[[guide.end]]
|
||||
id = "data_ok"
|
||||
severity = "ok"
|
||||
title = "Box is healthy and its sensor data reaches InfluxDB"
|
||||
text = "Status, microphone and all sensor readings of this box arrived in InfluxDB in the last 15 minutes."
|
||||
actions = []
|
||||
|
||||
[[guide.end]]
|
||||
id = "sensors_clock"
|
||||
severity = "error"
|
||||
title = "Sensor data is lost: the box clock (RTC) is not running"
|
||||
text = "The box sends its status and microphone level with the Internet time, but the sensor readings are timestamped by the clock module. With the clock stopped they are stamped 1 Jan 2000 and do not show up in InfluxDB."
|
||||
actions = [
|
||||
"Replace the RTC coin cell (inside the case), switch the box off and on, then run this check again.",
|
||||
"If the Diagnosis tab still shows the clock not running with a new cell: replace the RTC module.",
|
||||
"Save the session log for the firmware team.",
|
||||
]
|
||||
|
||||
[[guide.end]]
|
||||
id = "sensors_missing"
|
||||
severity = "error"
|
||||
title = "Status arrives, sensor data does not"
|
||||
text = "The box is online and InfluxDB receives its status, but readings of some sensors are missing (the list is in the technician notes of the report)."
|
||||
actions = [
|
||||
"Check the Diagnosis tab for sensor errors; re-seat the cable of the missing sensor (inside the case).",
|
||||
"If the log shows no sensor error: save the session log and send it to the firmware team.",
|
||||
]
|
||||
|
||||
[[guide.end]]
|
||||
id = "silent"
|
||||
severity = "warning"
|
||||
title = "Box is not uploading right now"
|
||||
text = "InfluxDB has older data from this box, but nothing from the last 15 minutes."
|
||||
actions = [
|
||||
"Check that the box has Wi-Fi and Internet (Purple LED / no Internet check), then run this check again.",
|
||||
"The technician notes of the report show when each kind of data arrived last - if the sensor data stopped long before the status, treat it like 'Status arrives, sensor data does not'.",
|
||||
]
|
||||
|
||||
[[guide.end]]
|
||||
id = "never"
|
||||
severity = "warning"
|
||||
title = "No data from this box in InfluxDB"
|
||||
text = "In the last 30 days InfluxDB received nothing from this box: it was never online, or its SD card has wrong database settings."
|
||||
actions = [
|
||||
"Run the Purple LED / no Internet check.",
|
||||
"If the box is online: re-provision the SD card with the current ENV.TXT (SD card tab).",
|
||||
]
|
||||
|
||||
[[guide.end]]
|
||||
id = "unavailable"
|
||||
severity = "info"
|
||||
title = "Could not check InfluxDB"
|
||||
text = "The tool could not query InfluxDB from this computer (no Internet on the laptop, InfluxDB access not set up, or the box MAC not known yet)."
|
||||
actions = [
|
||||
"Settings > InfluxDB access: enter the read token from the firmware team.",
|
||||
"Or check the box later in the service system (Stan w InfluxDB).",
|
||||
]
|
||||
Reference in new issue
Block a user