How do I screen building automation trend exports for simultaneous heating and cooling, stuck sensors and after-hours running with an AI-written script?
Trend data sits in the building automation system for months and gets opened only when someone complains, because lining up dozens of points across weeks in a spreadsheet is slow and every vendor's export looks different. Export the trends to CSV, have Claude, ChatGPT or Codex write a short Python script that loads the files, puts every point on one time axis and lists periods that match screens you define (heating and cooling outputs both on, a sensor that never changes, a fan running outside the occupied schedule, an output pinned at the end of its range), then have the AI turn the findings into a plain list of things to verify. Thresholds are yours, not the model's, and every cause is confirmed in the field.
MEP Engineer · MEP · Claude · ChatGPT · OpenAI Codex · Python · pandas · Microsoft Excel
Content updated · Tool links listed below; vendor features and pricing change, so confirm with the vendor
Short answer
Use Claude, ChatGPT or OpenAI Codex: The AI writes a Python script that loads a building automation trend export, lines up all points on one time axis, and lists periods that match screens you define (heating and cooling outputs both on, sensors that never change, equipment running outside your occupied schedule, points stuck at an end of range), with plots for each finding. Trend data sits in the building automation system for months and gets opened only when someone complains, because lining up dozens of points across weeks in a spreadsheet is slow and every vendor's export looks different. Export the trends to CSV, have Claude, ChatGPT or Codex write a short Python script that loads the files, puts every point on one time axis and lists periods that match screens you define (heating and cooling outputs both on, a sensor that never changes, a fan running outside the occupied schedule, an output pinned at the end of its range), then have the AI turn the findings into a plain list of things to verify. Thresholds are yours, not the model's, and every cause is confirmed in the field. A person still checks: that the point mapping and units are right, a sample of findings against the trend graphs in the BAS itself, and every cause and fix verified in the field by the controls technician and the mechanical engineer.
AI tie-in
Tool: Claude, ChatGPT or OpenAI Codex
The AI writes a Python script that loads a building automation trend export, lines up all points on one time axis, and lists periods that match screens you define (heating and cooling outputs both on, sensors that never change, equipment running outside your occupied schedule, points stuck at an end of range), with plots for each finding.
Prompt 1
Here are the first 20 lines of a trend export from our building automation system [paste, with site and point names generalized if needed]. Write a commented Python script using pandas and matplotlib that loads files in this format from a folder, parses the timestamps (tell me which format you assumed), resamples every point to a common interval I set at the top, and writes an Excel workbook with: a data-quality tab (gaps longer than N intervals, duplicate timestamps, points with no data), and one tab per screen listing start, end, duration and the values that triggered it. Screens: (1) the heating and cooling output points I name both above a percent I set, for longer than a duration I set; (2) a point that does not change for longer than a duration I set; (3) a fan or pump status point ON outside the occupied schedule I enter; (4) an output at the top or bottom of its range for longer than a duration I set. Put every threshold in one settings block at the top. Do not use default thresholds from any guideline or from memory; leave them blank and stop with a message if I have not filled them in.
Prompt 2
Here are the screen results from the trend script [paste the findings tabs]. Group the findings by piece of equipment, sort by total hours, and write a short, factual list for the controls contractor and the facility team: what the data shows, when, and for how long. Phrase each item as something to verify in the field. Do not state the cause, do not estimate energy savings, and do not say whether the system meets any design intent or standard.
Human check: That the point mapping and units are right, a sample of findings against the trend graphs in the BAS itself, and every cause and fix verified in the field by the controls technician and the mechanical engineer.
The problem
Screen building automation trend exports for simultaneous heating and cooling, stuck sensors and after-hours running with an AI-written script. This is a common, time-consuming task for a mep engineer.
What this workflow does
Trend data sits in the building automation system for months and gets opened only when someone complains, because lining up dozens of points across weeks in a spreadsheet is slow and every vendor's export looks different. Export the trends to CSV, have Claude, ChatGPT or Codex write a short Python script that loads the files, puts every point on one time axis and lists periods that match screens you define (heating and cooling outputs both on, a sensor that never changes, a fan running outside the occupied schedule, an output pinned at the end of its range), then have the AI turn the findings into a plain list of things to verify. Thresholds are yours, not the model's, and every cause is confirmed in the field.
How it works: AI drafts or analyzes. A person operates the tools, checks the work, and takes action.
Your checkpoint: The script describes what the logged data shows, not what the equipment is doing: a failed sensor, a mislabeled point or a gap in the trend can produce wrong findings. It does not diagnose causes, estimate savings or judge whether a system meets design intent or any standard. Confirm point mapping and units first, and verify every finding in the field with the controls technician and the mechanical engineer.
Before you start
- Access to the named tool; confirm license, version and cost with the vendor.
- A small, non-confidential sample to try the workflow on first.
- A qualified person to review the output before it is used.
Tools and access
Follow the steps
- Pick one air handler or one floor to start. Export two to four weeks of trends for the points you need (supply temperature and setpoint, heating and cooling outputs, fan status, damper and valve outputs, space temperatures) to CSV at a fixed interval.
- Paste the first 20 lines of one export into Claude, ChatGPT or Codex and have it write a commented Python script that parses the timestamps, resamples every point to one interval and reports data gaps and duplicate timestamps before anything else. Run it on your own computer so the trend files stay local.
- Fill in the settings block at the top of the script yourself: which output points pair as heating and cooling, the percent and duration that count as both on, how long a flat reading must last, the occupied schedule, and what counts as pinned at an end of range. The script should stop if any setting is blank.
- Run the screens. The script writes one Excel tab per screen (start, end, duration, triggering values) and a plot per equipment item, so you can see each finding against the raw data.
- Open a handful of findings in the BAS's own trend viewer and confirm the script read the points and units correctly before sharing anything.
- Have the AI group the findings by equipment and draft a factual list for the controls contractor or facility team, phrased as items to verify on site. Rerun the same script after fixes to see whether the pattern went away.
Try a small example
Replace the bracketed fields with your own project details. No tested sample run is published for this workflow yet.
Sample input
Fill in the bracketed [fields] in the text below with your project data.
Starter prompt
Here are the first 20 lines of a trend export from our building automation system [paste, with site and point names generalized if needed]. Write a commented Python script using pandas and matplotlib that loads files in this format from a folder, parses the timestamps (tell me which format you assumed), resamples every point to a common interval I set at the top, and writes an Excel workbook with: a data-quality tab (gaps longer than N intervals, duplicate timestamps, points with no data), and one tab per screen listing start, end, duration and the values that triggered it. Screens: (1) the heating and cooling output points I name both above a percent I set, for longer than a duration I set; (2) a point that does not change for longer than a duration I set; (3) a fan or pump status point ON outside the occupied schedule I enter; (4) an output at the top or bottom of its range for longer than a duration I set. Put every threshold in one settings block at the top. Do not use default thresholds from any guideline or from memory; leave them blank and stop with a message if I have not filled them in.
Expected output
Not published yet. Treat any output as a draft and check it against the source documents.
Check the result
- Every value, citation or quantity traces back to a source document.
- Missing information is marked as missing, not filled in.
Limits and recovery
- The script describes what the logged data shows, not what the equipment is doing: a failed sensor, a mislabeled point or a gap in the trend can produce wrong findings. It does not diagnose causes, estimate savings or judge whether a system meets design intent or any standard. Confirm point mapping and units first, and verify every finding in the field with the controls technician and the mechanical engineer.
- Check your organization’s data policy before sharing project files with third-party tools.
Stop or switch when: The source cannot be verified, permissions are missing, or the result contains unsupported facts.
Frequently asked questions
How does AI help with this?
Claude, ChatGPT or OpenAI Codex: The AI writes a Python script that loads a building automation trend export, lines up all points on one time axis, and lists periods that match screens you define (heating and cooling outputs both on, sensors that never change, equipment running outside your occupied schedule, points stuck at an end of range), with plots for each finding. A person still checks: That the point mapping and units are right, a sample of findings against the trend graphs in the BAS itself, and every cause and fix verified in the field by the controls technician and the mechanical engineer.
How do I how do I screen building automation trend exports for simultaneous heating and cooling, stuck sensors and after-hours running with an AI-written script??
Pick one air handler or one floor to start. Export two to four weeks of trends for the points you need (supply temperature and setpoint, heating and cooling outputs, fan status, damper and valve outputs, space temperatures) to CSV at a fixed interval. Paste the first 20 lines of one export into Claude, ChatGPT or Codex and have it write a commented Python script that parses the timestamps, resamples every point to one interval and reports data gaps and duplicate timestamps before anything else. Run it on your own computer so the trend files stay local. Fill in the settings block at the top of the script yourself: which output points pair as heating and cooling, the percent and duration that count as both on, how long a flat reading must last, the occupied schedule, and what counts as pinned at an end of range. The script should stop if any setting is blank. The full step list is above.
Does this use an AI agent or regular software?
It is labeled AI assists: AI drafts or analyzes. A person operates the tools, checks the work, and takes action.
What tools do I need?
Claude, ChatGPT, OpenAI Codex, Python, pandas, Microsoft Excel. Confirm license, version and cost with the vendor, and try it on a small non-confidential sample first.
Has this workflow been tested?
Workflow guide · not independently tested. Written from vendor documentation and practitioner use. Labels apply to the steps described here, not every feature of a product. Links were checked when the page was written.
Evidence and maintenance
Written from vendor documentation and practitioner use. Labels apply to the steps described here, not every feature of a product. Links were checked when the page was written.