yau-plant-assistant/db/seed/historian_items.csv
Claude 8aba1f7f5c Rebuild the stand-in historian on CI Server item names
The three open Phase 5 findings were one defect: the stand-in was keyed on
CI Server POINT names (PS_STN_WET_WELL_LEVEL) when the historian is keyed on
CI Server ITEM names (AID.WRPS.STN.LEVEL). Modbus carries register numbers,
not names, so those two layers are free to differ - and do. Reconciling
against the register map, as planned, would only have proved the first three
namespaces agreed with each other.

Rebuilt from WRPS/05-scada/modbus, so item names, sample rates, retention and
timestamp semantics come from the machine rather than from a guess.

(a) Level tag does not join. PS_STN_WET_WELL_LEVEL becomes a tag row in its
    own right; LIT-101 is marked NOT HISTORISED - a field input on %IW0 that
    never reaches SCADA. It was the only seed row carrying two addresses.
    public.historian_items holds the item-to-tag mapping, generated by
    scripts/gen_historian_items.py and enforced non-empty at generate, at
    deploy and at verify.

(b) first_alarm/last_alarm returned UTC. Converted inside the measure, so it
    stays in Cube and happens once. Aggregate first, convert after - the other
    order picks the wrong row across a DST fall-back. Returned as a formatted
    string with a companion site_timezone measure. Storage being UTC is now
    confirmed, not assumed: all 49 points carry TIME_ZONE "Date+time GMT" and
    every history group CORRECT_DAYLIGHT=0. This answers Phase 4 task 4.

(c) High level alarm filed against the wrong equipment. Both sides were right
    about different things; the defect was asserting equipment twice. The
    history now carries no equipment column at all - faithful, since CI
    Server's section tree stops at the station and three pumps. Equipment is
    reached bit -> tag -> equipment via public.alarm_bits.

Alarms are derived, not stored: CI Server's ALARM_HISTORY group is empty
because every item imports with alarming off. Decomposing the alarm word needs
no configuration that does not exist.

Three things the SCADA config changed that were never filed as faults:
  - retention is 7 days, not 30. The advisory path was reporting a month of
    evidence drawn from a week of data
  - the analogue rate is 5 s, not 60. Two measures multiplied sample counts by
    a hardcoded 60 - a twelvefold overstatement that read as plausible
  - the deadband warning in process_values.yml was wrong and was steering
    people away from the correct measure

db/002_fixtures.sql now asserts its own counts at load and cross-checks the
alarm derivation against two independent signals. Those prove the pipeline,
not the plant.

db/README-standin-historian.md documents removal: the seam between generation
and contract, and twelve assumptions about imh that are NOT confirmed. Two of
them fail silently.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-31 11:42:02 +10:00

13 KiB

1item_nametag_idexclusion_reasonsection_pathsectionattributesection_descriptiondescriptioneng_unitvalue_formatconv_typehas_signphys_lowphys_higheng_gainraw_to_enghis_groupscan_interval_secondslife_timescada_pointiec_addressmodbus_kindmodbus_addressdata_typepoint_time_zone
2AID.WRPS.PU301.RUN_CMDPS_PU301_RUN_COMMANDAID.WRPS.PU301PU301RUN_CMDPump PU-301Run commandDigital001001.0valueWRPS_EVENT1 weeksPS_PU301_RUN_COMMAND%QX0.0coil0BooleanDate+time GMT
3AID.WRPS.PU302.RUN_CMDPS_PU302_RUN_COMMANDAID.WRPS.PU302PU302RUN_CMDPump PU-302Run commandDigital001001.0valueWRPS_EVENT1 weeksPS_PU302_RUN_COMMAND%QX0.1coil1BooleanDate+time GMT
4AID.WRPS.PU303.RUN_CMDPS_PU303_RUN_COMMANDAID.WRPS.PU303PU303RUN_CMDPump PU-303Run commandDigital001001.0valueWRPS_EVENT1 weeksPS_PU303_RUN_COMMAND%QX0.2coil2BooleanDate+time GMT
5AID.WRPS.PU301.RUNNINGPS_PU301_RUNNINGAID.WRPS.PU301PU301RUNNINGPump PU-301RunningDigital001001.0valueWRPS_EVENT1 weeksPS_PU301_RUNNING%QX0.3coil3BooleanDate+time GMT
6AID.WRPS.PU302.RUNNINGPS_PU302_RUNNINGAID.WRPS.PU302PU302RUNNINGPump PU-302RunningDigital001001.0valueWRPS_EVENT1 weeksPS_PU302_RUNNING%QX0.4coil4BooleanDate+time GMT
7AID.WRPS.PU303.RUNNINGPS_PU303_RUNNINGAID.WRPS.PU303PU303RUNNINGPump PU-303RunningDigital001001.0valueWRPS_EVENT1 weeksPS_PU303_RUNNING%QX0.5coil5BooleanDate+time GMT
8AID.WRPS.PU301.AVAILABLEPS_PU301_AVAILABLEAID.WRPS.PU301PU301AVAILABLEPump PU-301AvailableDigital001001.0valueWRPS_EVENT1 weeksPS_PU301_AVAILABLE%QX0.6coil6BooleanDate+time GMT
9AID.WRPS.PU302.AVAILABLEPS_PU302_AVAILABLEAID.WRPS.PU302PU302AVAILABLEPump PU-302AvailableDigital001001.0valueWRPS_EVENT1 weeksPS_PU302_AVAILABLE%QX0.7coil7BooleanDate+time GMT
10AID.WRPS.PU303.AVAILABLEPS_PU303_AVAILABLEAID.WRPS.PU303PU303AVAILABLEPump PU-303AvailableDigital001001.0valueWRPS_EVENT1 weeksPS_PU303_AVAILABLE%QX1.0coil8BooleanDate+time GMT
11AID.WRPS.STN.IN_AUTOPS_STN_STATION_IN_AUTOAID.WRPS.STNSTNIN_AUTOWaterloo Road PS - station wide measurements and statusStation in autoDigital001001.0valueWRPS_EVENT1 weeksPS_STN_STATION_IN_AUTO%QX1.1coil9BooleanDate+time GMT
12AID.WRPS.STN.HIGH_LEVELPS_STN_HIGH_LEVEL_ALARMAID.WRPS.STNSTNHIGH_LEVELWaterloo Road PS - station wide measurements and statusHigh level alarmDigital001001.0valueWRPS_EVENT1 weeksPS_STN_HIGH_LEVEL_ALARM%QX1.2coil10BooleanDate+time GMT
13AID.WRPS.STN.SPILL_ACTIVEPS_STN_SPILL_ACTIVEAID.WRPS.STNSTNSPILL_ACTIVEWaterloo Road PS - station wide measurements and statusSpill activeDigital001001.0valueWRPS_EVENT1 weeksPS_STN_SPILL_ACTIVE%QX1.3coil11BooleanDate+time GMT
14AID.WRPS.PU301.TRIPPEDPS_PU301_TRIPPEDAID.WRPS.PU301PU301TRIPPEDPump PU-301TrippedDigital001001.0valueWRPS_EVENT1 weeksPS_PU301_TRIPPED%QX1.4coil12BooleanDate+time GMT
15AID.WRPS.PU302.TRIPPEDPS_PU302_TRIPPEDAID.WRPS.PU302PU302TRIPPEDPump PU-302TrippedDigital001001.0valueWRPS_EVENT1 weeksPS_PU302_TRIPPED%QX1.5coil13BooleanDate+time GMT
16AID.WRPS.PU303.TRIPPEDPS_PU303_TRIPPEDAID.WRPS.PU303PU303TRIPPEDPump PU-303TrippedDigital001001.0valueWRPS_EVENT1 weeksPS_PU303_TRIPPED%QX1.6coil14BooleanDate+time GMT
17AID.WRPS.STN.LEVELPS_STN_WET_WELL_LEVELAID.WRPS.STNSTNLEVELWaterloo Road PS - station wide measurements and statusWet well level%999.9Linear1-5465460.016666666666666666value / 60WRPS_ONE_SEC51 weeksPS_STN_WET_WELL_LEVEL%QW0holding0Signed 16-bitDate+time GMT
18AID.WRPS.STN.INFLOWPS_STN_INFLOWAID.WRPS.STNSTNINFLOWWaterloo Road PS - station wide measurements and statusInflowm3/h9999.9Linear1-11796.4811796.120.36value * 0.36WRPS_ONE_SEC51 weeksPS_STN_INFLOW%QW1holding1Signed 16-bitDate+time GMT
19AID.WRPS.STN.DISCHARGEPS_STN_TOTAL_DISCHARGE_FLOWAID.WRPS.STNSTNDISCHARGEWaterloo Road PS - station wide measurements and statusTotal discharge flowm3/h9999.9Linear1-11796.4811796.120.36value * 0.36WRPS_ONE_SEC51 weeksPS_STN_TOTAL_DISCHARGE_FLOW%QW2holding2Signed 16-bitDate+time GMT
20AID.WRPS.STN.PUMPS_RUNNINGPS_STN_PUMPS_RUNNINGAID.WRPS.STNSTNPUMPS_RUNNINGWaterloo Road PS - station wide measurements and statusPumps runningcount9Linear1-32768327671.0valueWRPS_THIRTY_SEC301 weeksPS_STN_PUMPS_RUNNING%QW3holding3Signed 16-bitDate+time GMT
21AID.WRPS.STN.SPEEDPS_STN_COMMON_DRIVE_SPEEDAID.WRPS.STNSTNSPEEDWaterloo Road PS - station wide measurements and statusCommon drive speed%999.9Linear1-655365530.2value * 0.2WRPS_ONE_SEC51 weeksPS_STN_COMMON_DRIVE_SPEED%QW4holding4Signed 16-bitDate+time GMT
22AID.WRPS.STN.TIME_TO_SPILLPS_STN_TIME_TO_SPILL_WEIRAID.WRPS.STNSTNTIME_TO_SPILLWaterloo Road PS - station wide measurements and statusTime to spill weir (32767 = drawing down)s99999Linear1-32768327671.0valueWRPS_THIRTY_SEC301 weeksPS_STN_TIME_TO_SPILL_WEIR%QW5holding5Signed 16-bitDate+time GMT
23AID.WRPS.STN.TIME_TO_LSHHPS_STN_TIME_TO_LSHHAID.WRPS.STNSTNTIME_TO_LSHHWaterloo Road PS - station wide measurements and statusTime to LSHH (32767 = drawing down)s99999Linear1-32768327671.0valueWRPS_THIRTY_SEC301 weeksPS_STN_TIME_TO_LSHH%QW6holding6Signed 16-bitDate+time GMT
24AID.WRPS.STN.NET_ACCUMPS_STN_NET_ACCUMULATIONAID.WRPS.STNSTNNET_ACCUMWaterloo Road PS - station wide measurements and statusNet accumulation (signed)m3/h9999.9Linear1-11796.4811796.120.36value * 0.36WRPS_ONE_SEC51 weeksPS_STN_NET_ACCUMULATION%QW7holding7Signed 16-bitDate+time GMT
25AID.WRPS.PU301.RUN_HOURSPS_PU301_RUN_HOURSAID.WRPS.PU301PU301RUN_HOURSPump PU-301Run hoursh99999Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_PU301_RUN_HOURS%QW8holding8Signed 16-bitDate+time GMT
26AID.WRPS.PU302.RUN_HOURSPS_PU302_RUN_HOURSAID.WRPS.PU302PU302RUN_HOURSPump PU-302Run hoursh99999Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_PU302_RUN_HOURS%QW9holding9Signed 16-bitDate+time GMT
27AID.WRPS.PU303.RUN_HOURSPS_PU303_RUN_HOURSAID.WRPS.PU303PU303RUN_HOURSPump PU-303Run hoursh99999Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_PU303_RUN_HOURS%QW10holding10Signed 16-bitDate+time GMT
28AID.WRPS.STN.VOL_TO_SPILLPS_STN_VOLUME_REMAINING_TO_SPILLAID.WRPS.STNSTNVOL_TO_SPILLWaterloo Road PS - station wide measurements and statusVolume remaining to spillm39999Linear1-32768327671.0valueWRPS_THIRTY_SEC301 weeksPS_STN_VOLUME_REMAINING_TO_SPILL%QW11holding11Signed 16-bitDate+time GMT
29AID.WRPS.STN.STATEPS_STN_STATION_STATEAID.WRPS.STNSTNSTATEWaterloo Road PS - station wide measurements and statusStation state (enum 3.1)9Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_STN_STATION_STATE%QW12holding12Signed 16-bitDate+time GMT
30AID.WRPS.PU301.STATEPS_PU301_PUMP_STATEAID.WRPS.PU301PU301STATEPump PU-301Pump state (enum 3.2)9Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_PU301_PUMP_STATE%QW13holding13Signed 16-bitDate+time GMT
31AID.WRPS.PU302.STATEPS_PU302_PUMP_STATEAID.WRPS.PU302PU302STATEPump PU-302Pump state (enum 3.2)9Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_PU302_PUMP_STATE%QW14holding14Signed 16-bitDate+time GMT
32AID.WRPS.PU303.STATEPS_PU303_PUMP_STATEAID.WRPS.PU303PU303STATEPump PU-303Pump state (enum 3.2)9Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_PU303_PUMP_STATE%QW15holding15Signed 16-bitDate+time GMT
33AID.WRPS.STN.DUTY_PUMPPS_STN_CURRENT_DUTY_PUMPAID.WRPS.STNSTNDUTY_PUMPWaterloo Road PS - station wide measurements and statusCurrent duty pump (0 = none, 1-3)9Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_STN_CURRENT_DUTY_PUMP%QW16holding16Signed 16-bitDate+time GMT
34AID.WRPS.STN.ALARM_WORDPS_STN_ALARM_BITMASKAID.WRPS.STNSTNALARM_WORDWaterloo Road PS - station wide measurements and statusAlarm bitmask (section 6) - READ AS UNSIGNED99999Linear00655351.0valueWRPS_EVENT1 weeksPS_STN_ALARM_BITMASK%QW17holding17Unsigned 16-bitDate+time GMT
35AID.WRPS.STN.CMD_ACKPS_STN_COMMAND_ACKNOWLEDGEAID.WRPS.STNSTNCMD_ACKWaterloo Road PS - station wide measurements and statusCommand acknowledge (echoes %MW1)99Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_STN_COMMAND_ACKNOWLEDGE%QW20holding20Signed 16-bitDate+time GMT
36AID.WRPS.SP.MODEPS_STN_STATION_MODE_1_AUTOAID.WRPS.SPSPMODEOperator setpoints and commandsStation mode: 1 = auto, 2 = off9Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_STN_STATION_MODE_1_AUTO%MW0holding1024Signed 16-bitDate+time GMT
37AID.WRPS.SP.CMD_WORDPS_STN_COMMAND_WORDAID.WRPS.SPSPCMD_WORDOperator setpoints and commandsCommand word (section 3.3)99Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_STN_COMMAND_WORD%MW1holding1025Signed 16-bitDate+time GMT
38AID.WRPS.SP.CMD_PARAMPS_STN_COMMAND_PARAMETERAID.WRPS.SPSPCMD_PARAMOperator setpoints and commandsCommand parameter (pump number)9Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_STN_COMMAND_PARAMETER%MW2holding1026Signed 16-bitDate+time GMT
39AID.WRPS.SP.LEVEL_SPPS_STN_LEVEL_CONTROL_SETPOINTAID.WRPS.SPSPLEVEL_SPOperator setpoints and commandsLevel control setpoint%999.9Linear1-5465460.016666666666666666value / 60WRPS_EVENT1 weeksPS_STN_LEVEL_CONTROL_SETPOINT%MW3holding1027Signed 16-bitDate+time GMT
40AID.WRPS.SP.START_DUTYPS_STN_START_DUTY_LEVELAID.WRPS.SPSPSTART_DUTYOperator setpoints and commandsStart duty level%999.9Linear1-5465460.016666666666666666value / 60WRPS_EVENT1 weeksPS_STN_START_DUTY_LEVEL%MW4holding1028Signed 16-bitDate+time GMT
41AID.WRPS.SP.START_P2PS_STN_START_PUMP_2_LEVELAID.WRPS.SPSPSTART_P2Operator setpoints and commandsStart pump 2 level%999.9Linear1-5465460.016666666666666666value / 60WRPS_EVENT1 weeksPS_STN_START_PUMP_2_LEVEL%MW5holding1029Signed 16-bitDate+time GMT
42AID.WRPS.SP.START_P3PS_STN_START_PUMP_3_LEVELAID.WRPS.SPSPSTART_P3Operator setpoints and commandsStart pump 3 level%999.9Linear1-5465460.016666666666666666value / 60WRPS_EVENT1 weeksPS_STN_START_PUMP_3_LEVEL%MW6holding1030Signed 16-bitDate+time GMT
43AID.WRPS.SP.STOP_ALLPS_STN_STOP_ALL_LEVELAID.WRPS.SPSPSTOP_ALLOperator setpoints and commandsStop all level%999.9Linear1-5465460.016666666666666666value / 60WRPS_EVENT1 weeksPS_STN_STOP_ALL_LEVEL%MW7holding1031Signed 16-bitDate+time GMT
44AID.WRPS.SP.HIGH_ALARMPS_STN_HIGH_LEVEL_ALARM_SPAID.WRPS.SPSPHIGH_ALARMOperator setpoints and commandsHigh level alarm%999.9Linear1-5465460.016666666666666666value / 60WRPS_EVENT1 weeksPS_STN_HIGH_LEVEL_ALARM%MW8holding1032Signed 16-bitDate+time GMT
45AID.WRPS.SP.MIN_SPEEDPS_STN_MINIMUM_DRIVE_SPEEDAID.WRPS.SPSPMIN_SPEEDOperator setpoints and commandsMinimum drive speed%999.9Linear1-655365530.2value * 0.2WRPS_EVENT1 weeksPS_STN_MINIMUM_DRIVE_SPEED%MW9holding1033Signed 16-bitDate+time GMT
46AID.WRPS.SP.SERVICE_HRSPS_STN_SERVICE_INTERVALAID.WRPS.SPSPSERVICE_HRSOperator setpoints and commandsService intervalh99999Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_STN_SERVICE_INTERVAL%MW10holding1034Signed 16-bitDate+time GMT
47AID.WRPS.SIM.INFLOWsimulation control, not a plant measurement - answering from it would report the scenario driver as though it were the real inflowAID.WRPS.SIMSIMINFLOWSimulation control - simulation build onlymanual inflow (mode 0)m3/h9999.9Linear1-11796.4811796.120.36value * 0.36WRPS_EVENT1 weeksPS_SIM_MANUAL_INFLOW%MW20holding1044Signed 16-bitDate+time GMT
48AID.WRPS.SIM.SCENARIOsimulation control, not a plant measurementAID.WRPS.SIMSIMSCENARIOSimulation control - simulation build onlyscenario 0=man 1=diurnal 2=wet 3=ref9Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_SIM_SCENARIO_0_MAN_1_DIURNAL_2_W%MW21holding1045Signed 16-bitDate+time GMT
49AID.WRPS.SIM.RESETsimulation control, not a plant measurementAID.WRPS.SIMSIMRESETSimulation control - simulation build onlywrite 1 to reset scenario, self-clearing9Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_SIM_WRITE_1_TO_RESET_SCENARIO%MW22holding1046Signed 16-bitDate+time GMT
50AID.WRPS.SIM.TIME_SCALEsimulation control - a non-unity time scale means wall-clock durations in the history are compressed and must not be quoted as real durationsAID.WRPS.SIMSIMTIME_SCALESimulation control - simulation build onlytime scale 1-120x999Linear1-32768327671.0valueWRPS_EVENT1 weeksPS_SIM_TIME_SCALE_1_120%MW23holding1047Signed 16-bitDate+time GMT