# Read-only equipment-health adapter

Local JSON Lines / CSV normalization for laboratory equipment and civil asset diagnostics. No network connections, tracking data, tasking, engagement, actuation or weapon interfaces. This adapter is independent of the existing cueing program.

## Platforms

Python 3.8+ standard library; designed for Windows, macOS and Linux. Automated checks run on Linux only; other operating systems and vendor equipment are not verified. No universal vendor compatibility or protocol certification is claimed.

## Example

Download the adapter, configuration and sample into one folder:

```sh
python3 equipment-health.py --config equipment-health.example.json --input equipment-health.sample.jsonl
```

Windows: use `py -3` instead of `python3`. Redirect standard output to a file if needed. `--input -` accepts standard input. `--format csv` accepts header-based CSV; JSON Lines is the default.

## Customization

Edit `fields` to map the source's own names to `device_id`, `timestamp`, `status`, optional `battery_pct` and optional `temperature_c`. Dotted paths address nested JSON; a matching literal CSV header takes precedence. Set `temperature_unit` to C, F or K. Battery input must already be a percentage. Timestamps must contain an explicit timezone; output uses UTC. Configure vendor status strings in `status_values`; unmapped states become `unknown`, not healthy.

Output contains only the approved health fields and `schema: equipment-health/v1`. Other source fields are discarded. Invalid records are rejected without logging their contents. Exit codes: 0 all valid, 1 one or more rejected records, 2 configuration/input error. A mixed file produces valid rows and exits 1; consumers must check the exit code.

## Integration boundary

The equipment owner exports health records using their documented vendor interface. This tool normalizes those records locally; it does not authenticate to, connect to, or control equipment. Transport, vendor SDKs, credentials, deployment permissions and real-device acceptance testing remain client-specific. Nothing is uploaded to the platform, and no platform health dashboard or health API is implied.