Back to prompt library
Build an open62541 Sensor Health and Replacement Forecaster — implementation
Linked challenge: Build an open62541 Sensor Health and Replacement Forecaster
Prompt source
implementation65 lines11 sectionsNo variables1 code block
## Build
Analyze analog signal attenuation and noise metrics from open62541 OPC UA telemetry servers. Forecast remaining sensor lifespan and generate spare part pick lists before measurement loss.
## User
Predictive Maintenance Technician
## Workflow
1. Collect signal-to-noise ratio and temperature drift logs from open62541 OPC UA variable nodes.
2. Calculate sensor degradation slopes using exponential smoothing algorithms.
3. Predict sensor end-of-life horizon against replacement warning limits.
4. Synthesize a warehouse spare part reservation ticket with manufacturer part numbers.
## Interface
Sensor degradation timeline displaying remaining useful life days and warehouse inventory status.
## Data
Create local synthetic JSON datasets of open62541 telemetry node logs simulating analog sensor attenuation.
Starter examples below are synthetic. They are not downloaded records.
## Source
[open62541 OPC UA](https://raw.githubusercontent.com/open62541/open62541/master/README.md)
Extracts open62541 variable node histories and server status diagnostics described in Source 0.
## Tools
agno, sqlite.
Agno provides lightweight agent workflows to coordinate sensor data analysis and warehouse ERP API calls.
Local or hosted lightweight model to draft clear technician replacement work orders.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Accurately flags sensors with remaining useful life under 14 days.
- Matches degraded sensors with compatible replacement part numbers in mock inventory.
- Outputs complete work order tickets formatted for CMMS import.
## Starter Examples
```json
[
{
"input": {
"sensor_node": "ns=2;s=Line1.LaserSensor.NoiseRatio",
"current_snr_db": 14.2,
"baseline_snr_db": 28,
"degradation_rate_db_per_week": 2.1,
"critical_threshold_db": 12
},
"expected_output": {
"sensor_node": "ns=2;s=Line1.LaserSensor.NoiseRatio",
"estimated_days_to_failure": 7,
"replacement_recommended": true,
"urgency": "CRITICAL"
}
},
{
"input": {
"sensor_node": "ns=2;s=Line2.PressureTransmitter.NoiseRatio",
"current_snr_db": 26.5,
"baseline_snr_db": 29,
"degradation_rate_db_per_week": 0.2,
"critical_threshold_db": 15
},
"expected_output": {
"sensor_node": "ns=2;s=Line2.PressureTransmitter.NoiseRatio",
"estimated_days_to_failure": 402,
"replacement_recommended": false,
"urgency": "NORMAL"
}
}
]
```
## Safety
Read-only predictive analytics; creates mock warehouse pick tickets without physical inventory allocation.
Use mock external writes. Require human review before any real deployment.