Device Data Metrics
This document provides a comprehensive reference of all default settings, quality thresholds, and query configurations for the measurement normalization system. These values are defined in migration 00027_insert_metric_definitions_with_explicit_ids.sql.
Table of Contents
Section titled “Table of Contents”Metric Definitions by Device Type
Section titled “Metric Definitions by Device Type”Gridlink Device Metrics (1001-1007)
Section titled “Gridlink Device Metrics (1001-1007)”Device-level measurements with no phase distinction (phases=null).
1001: gridlink_temperature_celsius
| Property | Value |
|---|---|
| Unit | °C |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: -30, max: 80 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_temperature |
-30 °C |
└─ bad_quality.max_temperature |
80 °C |
| Quality Flags | bad_quality if outside -30 to 80°C |
1002: gridlink_supply_voltage_v
| Property | Value |
|---|---|
| Unit | V |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 0, max: 15 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_supply_voltage |
5 V |
| Quality Flags | bad_quality if < 5V (indicates bad_quality_low_supply) |
1003: gridlink_battery_voltage_v
| Property | Value |
|---|---|
| Unit | V |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 0, max: 6 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_battery_voltage |
3 V |
└─ bad_quality.max_battery_voltage |
5.5 V |
| Liveness Check | |
└─ liveness.min_alive |
3.0 V |
| Quality Flags | bad_quality if outside 3.0-5.5V |
| Note | Used for device liveness detection - values >= 3.0V indicate device alive |
1004: gridlink_humidity_percent
| Property | Value |
|---|---|
| Unit | % |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 0, max: 100 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_humidity |
0 % |
└─ bad_quality.max_humidity |
100 % |
| Quality Flags | bad_quality if outside 0-100% (bad_quality_out_of_range) |
1005: gridlink_line_frequency_hz
| Property | Value |
|---|---|
| Unit | Hz |
| Data Type | GAUGE |
| Aggregation | AVG (Average line frequency) |
| Phases | null |
| Physical Range | min: 40, max: 70 |
| Sentinels | [] |
| Sentinel Ranges | |
| └─ Range 1 | 0.04 - 0.05 Hz (DEFINITE SENTINEL - sentinel_firmware_error) |
| └─ Range 2 | 99.98 - 99.99 Hz (DEFINITE SENTINEL - sentinel_firmware_error) |
| Quality Thresholds | |
└─ bad_quality.min_line_frequency |
40 Hz |
└─ bad_quality.max_line_frequency |
70 Hz |
| Quality Flags | sentinel if near 0.04 or 99.99 Hz; bad_quality if outside 40-70Hz |
1006: gridlink_charging_battery
| Property | Value |
|---|---|
| Unit | state |
| Data Type | GAUGE |
| Aggregation | AVG (Proportion of time charging) |
| Phases | null |
| Physical Range | min: 0, max: 1 |
| Sentinels | [] |
| Note | Binary indicator (0/1) |
1007: gridlink_rssi_dbm
| Property | Value |
|---|---|
| Unit | dBm |
| Data Type | GAUGE |
| Aggregation | AVG (Average signal strength) |
| Phases | null |
| Physical Range | min: -120, max: -10 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_rssi |
-120 dBm |
└─ bad_quality.max_rssi |
-10 dBm |
| Quality Flags | bad_quality if outside -120 to -10 dBm (bad_quality_rssi) |
Gridlink Line Metrics (2001-2012)
Section titled “Gridlink Line Metrics (2001-2012)”Multi-phase measurements - Hardware sends phases [1,2,3,4] where phase 4 is unused (always zero).
Phase Configuration:
"phases": [ {"phase": "1", "type": "REAL"}, {"phase": "2", "type": "REAL"}, {"phase": "3", "type": "REAL"}, {"phase": "4", "type": "REAL"}]2001: gridlink_rms_current_a
| Property | Value |
|---|---|
| Unit | A |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.warn_current |
500 A (flagged but not NULL) |
└─ bad_quality.max_current |
800 A (value set to NULL) |
| Zero Check | liveness (requires device health cross-validation) |
| Quality Flags | bad_quality if >500A (warn), NULL if >800A; zero requires liveness check |
2002: gridlink_rms_voltage_v
| Property | Value |
|---|---|
| Unit | V |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_voltage |
80 V |
└─ bad_quality.max_voltage |
280 V |
| Zero Check | liveness (cross-validation to distinguish grid_outage vs device_offline) |
| Quality Flags | bad_quality if outside 80-280V; grid_outage or device_offline if zero |
2003: gridlink_apparent_power_va
| Property | Value |
|---|---|
| Unit | VA |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Sentinels | [] |
| Physics Check | voltage_current_power (V>0 AND I=0 AND P>0 is impossible) |
| Quality Flags | physical_impossibility if violates P=V*I relationship |
2004: gridlink_power_factor
| Property | Value |
|---|---|
| Unit | ratio |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: -1, max: 1 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_power_factor |
-1 |
└─ bad_quality.max_power_factor |
1 |
| Quality Flags | bad_quality if outside [-1, 1] (bad_quality_power_factor) |
2005: gridlink_peak_voltage_v
| Property | Value |
|---|---|
| Unit | V |
| Data Type | GAUGE |
| Aggregation | MAX (Maximum peak voltage) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0, max: 450 |
| Sentinels | [] |
| Note | For 280V RMS max, peak = ~396V (280 * √2); 450V allows headroom |
2006: gridlink_peak_current_a
| Property | Value |
|---|---|
| Unit | A |
| Data Type | GAUGE |
| Aggregation | MAX (Maximum peak current) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0, max: 1200 |
| Sentinels | [] |
| Note | Peak threshold higher than RMS (800A * √2 ≈ 1131A); max 1200A |
2007: gridlink_active_power_w
| Property | Value |
|---|---|
| Unit | W |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Sentinels | [] |
| Physics Check | voltage_current_power (check for physical impossibility) |
| Quality Flags | physical_impossibility if violates P=V*I |
2008: gridlink_reactive_power_var
| Property | Value |
|---|---|
| Unit | var |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Sentinels | [] |
| Physics Check | voltage_current_power |
| Quality Flags | physical_impossibility if violates physics |
2009: gridlink_thd_percent
| Property | Value |
|---|---|
| Unit | % |
| Data Type | GAUGE |
| Aggregation | AVG (Average THD) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0, max: 100 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_thd |
0 % |
└─ bad_quality.max_thd |
100 % |
| Quality Flags | bad_quality if >100% (bad_quality_thd) |
2010: gridlink_relay_state
| Property | Value |
|---|---|
| Unit | state |
| Data Type | GAUGE |
| Aggregation | AVG (Proportion of time relay closed) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0, max: 1 |
| Sentinels | [] |
| Note | Binary indicator (0/1) |
2011: gridlink_delta_time_sec
| Property | Value |
|---|---|
| Unit | s |
| Data Type | GAUGE |
| Aggregation | AVG (Average sampling interval) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Sentinels | [] |
| Note | Must be non-negative |
2012: gridlink_measure_period_sec
| Property | Value |
|---|---|
| Unit | s |
| Data Type | GAUGE |
| Aggregation | AVG (Average measurement period) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Sentinels | [] |
| Note | Must be positive |
Gridmate Device Metrics (3001-3010)
Section titled “Gridmate Device Metrics (3001-3010)”Device-level measurements with no phase distinction (phases=null).
3001: gridmate_temperature_celsius
| Property | Value |
|---|---|
| Unit | °C |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: -30, max: 90 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_temperature |
-30 °C |
└─ bad_quality.max_temperature |
90 °C |
| Liveness Check | |
└─ liveness.min_alive |
-30 °C |
└─ liveness.max_alive |
90 °C |
| Quality Flags | bad_quality if outside -30 to 90°C |
| Note | Used for device liveness detection |
3002: gridmate_humidity_percent
| Property | Value |
|---|---|
| Unit | % |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 0, max: 100 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_humidity |
0 % |
└─ bad_quality.max_humidity |
100 % |
| Quality Flags | bad_quality if outside 0-100% |
3003: gridmate_version
| Property | Value |
|---|---|
| Unit | version |
| Data Type | GAUGE |
| Aggregation | AVG (Firmware version) |
| Phases | null |
| Sentinels | [] |
| Note | No specific validation |
3004: gridmate_size
| Property | Value |
|---|---|
| Unit | bytes |
| Data Type | GAUGE |
| Aggregation | AVG (Average message size) |
| Phases | null |
| Physical Range | min: 0 |
| Sentinels | [] |
3005: gridmate_port
| Property | Value |
|---|---|
| Unit | port |
| Data Type | GAUGE |
| Aggregation | AVG (Port number) |
| Phases | null |
| Physical Range | min: 0 |
| Sentinels | [] |
3006: gridmate_payload
| Property | Value |
|---|---|
| Unit | raw |
| Data Type | GAUGE |
| Aggregation | AVG (Raw payload) |
| Phases | null |
| Sentinels | [] |
3007: gridmate_rssi_dbm
| Property | Value |
|---|---|
| Unit | dBm |
| Data Type | GAUGE |
| Aggregation | AVG (Average signal strength) |
| Phases | null |
| Physical Range | min: -120, max: -10 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_rssi |
-120 dBm |
└─ bad_quality.max_rssi |
-10 dBm |
| Liveness Check | |
└─ liveness.min_alive |
-120 dBm |
└─ liveness.max_alive |
-10 dBm |
| Quality Flags | bad_quality if outside -120 to -10 dBm (bad_quality_rssi) |
| Note | Used for device liveness detection |
3008: gridmate_lsnr_db
| Property | Value |
|---|---|
| Unit | dB |
| Data Type | GAUGE |
| Aggregation | AVG (Average link SNR) |
| Phases | null |
| Physical Range | min: -15, max: 15 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_lsnr |
-15 dB |
└─ bad_quality.max_lsnr |
15 dB |
| Liveness Check | |
└─ liveness.min_alive |
-15 dB |
└─ liveness.max_alive |
15 dB |
| Quality Flags | bad_quality if outside -15 to 15 dB (bad_quality_lsnr) |
| Note | Used for device liveness detection |
3009: gridmate_freq_hz
| Property | Value |
|---|---|
| Unit | Hz |
| Data Type | GAUGE |
| Aggregation | AVG (Radio frequency) |
| Phases | null |
| Sentinels | [] |
3010: gridmate_co2_ppm
| Property | Value |
|---|---|
| Unit | ppm |
| Data Type | GAUGE |
| Aggregation | AVG (Average CO2 concentration) |
| Phases | null |
| Physical Range | min: 0, max: 5000 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_co2 |
0 ppm |
└─ bad_quality.max_co2 |
5000 ppm |
| Quality Flags | bad_quality if outside 0-5000 ppm (bad_quality_co2_range) |
Gridmate Line Metrics (4001-4010)
Section titled “Gridmate Line Metrics (4001-4010)”Multi-phase measurements - Hardware sends phases [1,2,3,4] where phase 4 is mostly static/unused.
Phase Configuration: Same as Gridlink line metrics.
4001: gridmate_rms_voltage_v
| Property | Value |
|---|---|
| Unit | V |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_voltage |
80 V |
└─ bad_quality.max_voltage |
260 V |
| Zero Check | liveness (cross-validation required) |
| Quality Flags | bad_quality if outside 80-260V; grid_outage or device_offline if zero |
4002: gridmate_rms_current_a
| Property | Value |
|---|---|
| Unit | A |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.warn_current |
400 A |
└─ bad_quality.max_current |
600 A |
| Zero Check | liveness |
| Quality Flags | bad_quality if >400A (warn), NULL if >600A |
4003: gridmate_peak_current_a
| Property | Value |
|---|---|
| Unit | A |
| Data Type | GAUGE |
| Aggregation | MAX (Maximum peak current) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0, max: 900 |
| Sentinels | [] |
| Note | Peak threshold: 600A RMS * √2 ≈ 849A; max 900A |
4004: gridmate_avg_power_factor
| Property | Value |
|---|---|
| Unit | ratio |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: -1, max: 1 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_power_factor |
-1 |
└─ bad_quality.max_power_factor |
1 |
| Quality Flags | bad_quality if outside [-1, 1] |
4005: gridmate_avg_active_power_w
| Property | Value |
|---|---|
| Unit | W |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Sentinels | [] |
| Physics Check | voltage_current_power |
| Quality Flags | physical_impossibility if violates P=V*I |
4006: gridmate_avg_reactive_power_var
| Property | Value |
|---|---|
| Unit | var |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | [1,2,3,4] REAL |
| Sentinels | [] |
| Physics Check | voltage_current_power |
| Quality Flags | physical_impossibility if violates physics |
4007: gridmate_total_pos_active_energy_wh
| Property | Value |
|---|---|
| Unit | Wh |
| Data Type | COUNTER |
| Aggregation | SUM (Sum energy deltas) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Max Value | 4294967295 (2^32-1) |
| Allow Negative Reset | true |
| Sentinels | [-1] |
| Quality Flags | sentinel if value = -1 (sentinel_counter_reset) |
| Note | Counter rollover supported at 2^32-1 |
4008: gridmate_total_neg_active_energy_wh
| Property | Value |
|---|---|
| Unit | Wh |
| Data Type | COUNTER |
| Aggregation | SUM (Sum energy deltas) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Max Value | 4294967295 (2^32-1) |
| Allow Negative Reset | true |
| Sentinels | [-1] |
| Quality Flags | sentinel if value = -1 (sentinel_counter_reset) |
4009: gridmate_total_pos_reactive_energy_kvarh
| Property | Value |
|---|---|
| Unit | kvarh |
| Data Type | COUNTER |
| Aggregation | SUM (Sum energy deltas) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Max Value | 4294967295 (2^32-1) |
| Allow Negative Reset | true |
| Sentinels | [-1] |
| Quality Flags | sentinel if value = -1 (sentinel_counter_reset) |
4010: gridmate_total_neg_reactive_energy_kvarh
| Property | Value |
|---|---|
| Unit | kvarh |
| Data Type | COUNTER |
| Aggregation | SUM (Sum energy deltas) |
| Phases | [1,2,3,4] REAL |
| Physical Range | min: 0 |
| Max Value | 4294967295 (2^32-1) |
| Allow Negative Reset | true |
| Sentinels | [-1] |
| Quality Flags | sentinel if value = -1 (sentinel_counter_reset) |
Gridlink Fuse Metrics (6001-6004)
Section titled “Gridlink Fuse Metrics (6001-6004)”Fuse-level measurements with no phase distinction (phases=null).
6001: gridlink_fuse_state
| Property | Value |
|---|---|
| Unit | bitmask |
| Data Type | SUMMARY |
| Aggregation | NONE (Point-in-time snapshots, not aggregatable) |
| Phases | null |
| Fuse Count | 16 (configurable per device) |
| Physical Range | min: 0, max: 65535 |
| Sentinels | [] |
| Note | Bitmask where each bit = fuse position (1=closed, 0=open); stored as JSON array |
6002: gridlink_fuse_humidity_percent
| Property | Value |
|---|---|
| Unit | % |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 0, max: 100 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_humidity |
0 % |
└─ bad_quality.max_humidity |
100 % |
| Quality Flags | bad_quality if outside 0-100% |
6003: gridlink_fuse_temperature_celsius
| Property | Value |
|---|---|
| Unit | °C |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: -40, max: 90 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_temperature |
-40 °C |
└─ bad_quality.max_temperature |
90 °C |
| Quality Flags | bad_quality if outside -40 to 90°C |
6004: gridlink_fuse_adc
| Property | Value |
|---|---|
| Unit | raw |
| Data Type | GAUGE |
| Aggregation | AVG (Average ADC value) |
| Phases | null |
| Physical Range | min: 0 |
| Sentinels | [] |
Gridlink Voltage Quality (7001)
Section titled “Gridlink Voltage Quality (7001)”7001: gridlink_voltage_histogram
| Property | Value |
|---|---|
| Unit | V |
| Data Type | SUMMARY |
| Aggregation | SUM (Merge histograms by summing bucket counts) |
| Phases | [1,2,3] REAL (NO PHASE 4 for histograms) |
| Physical Range | min: 0 |
| Sentinels | [] |
| Histogram Validation | |
└─ require_positive_counts |
true |
└─ require_valid_bounds |
true |
└─ require_bucket_continuity |
false |
| Quality Flags | |
└─ sentinel, malformed_payload |
Empty/malformed histogram |
└─ sentinel, malformed_payload |
Bucket count < 0 or min >= max |
└─ bad_quality, invalid_histogram_bounds |
Invalid bucket range |
└─ bad_quality, invalid_histogram_counts |
Negative count or total_count mismatch |
| Note | Sparse histograms (gaps) are valid (~0.002% of data); only phases 1-3 |
Generic Sensor Metrics (8001-8010)
Section titled “Generic Sensor Metrics (8001-8010)”Generic sensor measurements with no phase distinction (phases=null).
8001: generic_co2_ppm
| Property | Value |
|---|---|
| Unit | ppm |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 0, max: 5000 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_co2 |
0 ppm |
└─ bad_quality.max_co2 |
5000 ppm |
| Quality Flags | bad_quality if outside 0-5000 ppm |
8002: generic_temperature_celsius
| Property | Value |
|---|---|
| Unit | °C |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: -40, max: 85 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_temperature |
-40 °C |
└─ bad_quality.max_temperature |
85 °C |
| Quality Flags | bad_quality if outside -40 to 85°C |
8003: generic_humidity_percent
| Property | Value |
|---|---|
| Unit | % |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 0, max: 100 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_humidity |
0 % |
└─ bad_quality.max_humidity |
100 % |
| Quality Flags | bad_quality if outside 0-100% |
8004: generic_voltage_v
| Property | Value |
|---|---|
| Unit | V |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 0, max: 30 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_voltage |
0 V |
└─ bad_quality.max_voltage |
30 V |
| Quality Flags | bad_quality if outside 0-30V (bad_quality_battery_range) |
| Note | Generic battery/supply voltage sensor |
8005: generic_pressure_hpa
| Property | Value |
|---|---|
| Unit | hPa |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 300, max: 1100 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_pressure |
300 hPa |
└─ bad_quality.max_pressure |
1100 hPa |
| Quality Flags | bad_quality if outside 300-1100 hPa |
| Note | Range covers all terrestrial conditions |
8006: generic_tvoc_ugm3
| Property | Value |
|---|---|
| Unit | µg/m³ |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 0, max: 30000 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_tvoc |
0 µg/m³ |
└─ bad_quality.max_tvoc |
30000 µg/m³ |
| Quality Flags | bad_quality if outside 0-30000 µg/m³ (bad_quality_tvoc_range) |
| Note | Total Volatile Organic Compounds |
8007: generic_hcho_ppb
| Property | Value |
|---|---|
| Unit | ppb |
| Data Type | GAUGE |
| Aggregation | AVG (Time-weighted average) |
| Phases | null |
| Physical Range | min: 0, max: 5000 |
| Sentinels | [] |
| Quality Thresholds | |
└─ bad_quality.min_hcho |
0 ppb |
└─ bad_quality.max_hcho |
5000 ppb |
| Quality Flags | bad_quality if outside 0-5000 ppb (bad_quality_hcho_range) |
| Note | Formaldehyde sensor |
8008: generic_pulse_count
Metric 8008 (generic_pulse_count) is the device’s raw pulse counter, stored as a COUNTER value; its numbers are not consumption. For the conversion method with the device profile multiplier, see the API measurements cookbook (section 6, pulse consumption).
| Property | Value |
|---|---|
| Unit | count |
| Data Type | COUNTER |
| Aggregation | SUM (Sum pulse deltas) |
| Phases | null |
| Physical Range | min: 0 |
| Max Value | 4294967295 (2^32-1) |
| Allow Negative Reset | true |
| Sentinels | [-1] |
| Quality Flags | sentinel if value = -1 (sentinel_counter_reset) |
| Note | Supports rollover at 2^32-1 |
8009: generic_alarm_state
| Property | Value |
|---|---|
| Unit | state |
| Data Type | GAUGE |
| Aggregation | AVG (Proportion of time alarm active) |
| Phases | null |
| Physical Range | min: 0, max: 1 |
| Sentinels | [] |
| Note | Binary indicator (0=inactive, 1=active) |
8010: generic_pin_state
| Property | Value |
|---|---|
| Unit | state |
| Data Type | GAUGE |
| Aggregation | AVG (Proportion of time pin high) |
| Phases | null |
| Physical Range | min: 0, max: 1 |
| Sentinels | [] |
| Note | Digital pin state (0=low, 1=high) |
Phase Configuration Reference
Section titled “Phase Configuration Reference”Metrics WITH Phases
Section titled “Metrics WITH Phases”Gridlink Line Metrics (2001-2012):
- Phases: [1, 2, 3, 4] all REAL
- Hardware sends all 4 phases; phase 4 is unused (always zero)
- Electrical measurements per phase
Gridmate Line Metrics (4001-4010):
- Phases: [1, 2, 3, 4] all REAL
- Hardware sends all 4 phases; phase 4 is mostly static/unused
- Electrical measurements per phase
Gridlink Voltage Quality (7001):
- Phases: [1, 2, 3] REAL
- NO PHASE 4 for histograms
- Voltage distribution histogram per phase
Metrics WITHOUT Phases (phases=null)
Section titled “Metrics WITHOUT Phases (phases=null)”- Gridlink device metrics (1001-1007)
- Gridmate device metrics (3001-3010)
- Gridlink fuse metrics (6001-6004)
- Generic sensors (8001-8010)
Hardware Phase Documentation
Section titled “Hardware Phase Documentation”| Phase | Type | Description |
|---|---|---|
| 0 | SUMMARY | Summary/total across all real phases (NOT sent by hardware) |
| 1-3 | REAL | Real electrical phase measurements (always sent) |
| 4 | REAL | Exists but contains zeros/static values (unused in practice) |
Note: Hardware does NOT send phase 0. Phase 4 exists in the data but is not used for active measurements.
Counter Sentinel Values
Section titled “Counter Sentinel Values”All counter metrics use -1 as a DEFINITE SENTINEL value indicating sentinel_counter_reset.
Affected Metrics:
- 4007: gridmate_total_pos_active_energy_wh
- 4008: gridmate_total_neg_active_energy_wh
- 4009: gridmate_total_pos_reactive_energy_varh
- 4010: gridmate_total_neg_reactive_energy_varh
- 8008: generic_pulse_count
Behavior: When counter value = -1, the measurement is flagged as sentinel and marked as quality_status = not_ok.
Quick Reference: Quality Flag Triggers
Section titled “Quick Reference: Quality Flag Triggers”| Quality Flag | Primary Trigger | Secondary Trigger |
|---|---|---|
invalid_timestamp |
device_time < 2020-01-01 | device_time is zero |
future_timestamp |
device_time > server_time + 5min | (timestamp corrected to server_time) |
sentinel |
Exact match sentinel value | Value in sentinel range |
malformed_payload |
Cannot parse histogram | Empty histogram payload |
below_minimum |
value < rules.min | |
above_maximum |
value > rules.max | |
bad_quality |
Value violates custom quality thresholds | See metric-specific tables above |
physical_impossibility |
V>0 AND I=0 AND P>0 | V=0 AND P>0 |
grid_outage |
Zero V/I + device alive | |
device_offline |
Zero V/I + device health bad | |
missing_value |
Gauge/Counter has no value | |
counter_reset |
Current < previous (no rollover) | |
counter_rollover |
Counter wrapped around | |
invalid_time_interval |
Current time <= previous time | |
large_gap |
Time gap > MaxGapSeconds | |
unexpected_phase |
Phase not in device_sensors config |
Document Version: 1.0 Migration Reference: 00027_insert_metric_definitions_with_explicit_ids.sql Last Updated: Based on migration schema as of latest codebase snapshot