Blog

ChatGPT for HVAC Controls: Using AI Assistants (Claude, ChatGPT, Local Models) for BMS Work Safely

2026-11-19 · 13 min read AIChatGPTClaudeOllamaBMSBACnetHVAC controlsscripts

Short answer

ChatGPT, Claude and local models such as those run with Ollama are useful for HVAC controls work when they draft and explain: decoding point names, reading sequences of operation, writing control logic, summarizing trends and alarms. They are not safe as a direct path to the building, because they write plausible code with real mistakes, such as the wrong BACnet priority. Remove site data you may not share, give the AI the exact point names and units, and test every script it writes in a dry run and in test mode before anything writes to a controller.

Most controls technicians have already tried it: paste a list of cryptic point names into ChatGPT and ask "what is this equipment?", or ask it to write a reset schedule in Python. Sometimes the answer saves an hour. Sometimes it is confidently wrong, and on a building automation system a wrong answer can hold a damper, lock out a boiler or leave an override in place for months.

This guide covers ChatGPT for HVAC controls in practice, and the other assistants too (Claude, Copilot, Gemini, local models with Ollama): what they do well on BMS jobs, where they fail, what never to paste, and a five-step method to check AI-written control logic before it touches a controller. The screenshots show a real case: a local AI model writes a BACnet script that looks right, and the dry run shows it is wrong.

Can you use ChatGPT for HVAC controls?

Yes, for drafting, explaining and checking. No, as an unsupervised operator. An AI assistant has read a lot of public text about HVAC, BACnet and control sequences, so it is good at language work: expanding abbreviations, explaining a sequence, guessing which point is the supply air temperature, drafting a script. It has never seen your building: it does not know that your mixed air damper reverses or that priority 8 is already used by the front-end.

The safe rule: the AI proposes, the technician decides, and a test proves it.

What AI assistants do well on BMS work

Job What the AI does How you check it
Decoding point names Turns AH3_SAT, CTA-03 TEMP SOUF or VAV2-14 DA-T into equipment, role and likely units Compare with live values: a supply air temp should read 12-18 °C in cooling, not 45
Mapping equipment Groups 300 points into AHUs, VAVs, pumps and loops Spot-check each group on the graphic or the controller's object list
Explaining a sequence Rewrites a 20-page sequence of operation into steps and conditions Read the original for every number (setpoints, delays, limits)
Writing control logic Drafts a script, a schedule rule or a reset Dry run, then test mode, then a supervised live switch (method below)
Reading trends and alarms Summarizes 24 hours of data, suggests causes Look at the trend yourself before you act on a cause
Learning Explains BACnet priorities, Modbus byte order, PID terms Confirm against the standard or the vendor manual

Point names are where AI helps most: naming changes between vendors and sites and mixes languages, and a model that has seen thousands of styles guesses well. Guessing is fine if you confirm against the live value. Semantic models (Project Haystack tags, the Brick schema, ASHRAE Standard 223P) formalize the same idea; an AI can propose those tags, and you verify them. A wrong mapping gives wrong results downstream, as the AI fault detection guide shows.

What AI assistants get wrong in HVAC controls

The failures are predictable once you have seen a few:

  • Plausible code with the wrong meaning. AI-written code usually runs, and that is the danger. A script that writes at the wrong BACnet priority, releases the wrong slot or compares °F with °C raises no error; it just does the wrong thing every few seconds. The method section shows a real case.
  • Invented points and properties. Ask for "the property that shows the override" and an assistant may invent one. Real BACnet properties are defined by ASHRAE Standard 135; a commandable output, for example, has Priority_Array and Relinquish_Default. If you have never seen a property the AI names, read it on the controller first.
  • Confident numbers without a source. A "typical" economizer limit or static pressure setpoint may be wrong for the climate or the equipment. Setpoints come from the design, the sequence of operation, ASHRAE Guideline 36 if the project follows it, or the manufacturer.
  • No knowledge of the site. The AI cannot see an existing override at priority 8, a fan in hand at the starter or a life-safety interlock.
  • Units and scaling. °C or °F, Pa or in. w.c., a Modbus value ×10: a wrong guess gives a comparison that never triggers, or always does. Put units in the prompt.

What you should never paste into a public AI chat

Before you paste anything, decide where the data goes.

Data Public chat (free/personal plan) Business plan or API Local model (Ollama)
Generic point names, sequence text without names Usually OK OK OK
Customer name, building address, floor plans Avoid Only if your contract allows it OK
IP addresses, BBMD tables, network drawings Never Avoid OK
Passwords, API keys, controller credentials Never Never Never in a prompt
Live trend exports of a customer site Avoid Only if your contract allows it OK

Providers treat consumer and business data differently. OpenAI, for example, says it does not train on API and business-plan data by default, while personal ChatGPT plans can use conversations for training unless you opt out. Policies change: read the current policy of your service, and your customer's contract, since many owners forbid sending site data outside. Two habits solve most of the problem:

  1. Anonymize. Replace the customer name, address and IP addresses with placeholders before you paste. "Building A, AHU-1, 10.0.0.x" is enough for the AI to help.
  2. Use a local model for site data. A model run with Ollama on your PC sends nothing to the internet; it is slower and less accurate than a large cloud model. The trade-offs are covered in which AI model to use for BMS work.

Never give an AI tool, cloud or local, a direct path to write to a building network without a human approval step. Security agencies take the same line: in December 2025, CISA, the NSA, Australia's ACSC and partners published Principles for the Secure Integration of Artificial Intelligence in Operational Technology, joint guidance for AI in operational technology, and a BMS is operational technology.

How to write a good prompt for BMS work

Most bad answers come from vague questions. A good BMS prompt gives:

  1. The exact point names, copied from the controller: AHU-1 OA-T, AHU-1 OA-DPR.
  2. Units and ranges: "OA-T in °C; OA-DPR 0-100 %".
  3. The rule with numbers: "below -20 °C close the damper; above -15 °C give control back".
  4. The BACnet priority: "write at priority 8, release priority 8 to return to the sequence". The BACnet object types guide explains which objects are commandable.
  5. What not to do: "write nothing else, write only when the state changes".

Then ask the AI to explain its code. The explanation is not proof, as you will see, but it makes mistakes easier to spot.

Step by step: checking AI-written control logic before it runs

The method is shown with BacLens, a free BACnet explorer with AI features (download BacLens), against the free BacLens Sim BACnet simulator, so you can repeat it without a real building. The AI is a small local model through Ollama. The same checks apply to a script pasted from ChatGPT or Claude.

Step 1: choose where the AI runs

In BacLens, the AI is set in Settings → General → AI. The provider is either Claude through your own Anthropic API key, Ollama on your own PC, or off.

BacLens AI settings: provider set to Ollama (local, nothing leaves this PC), model qwen3.5:4b, Ollama address 127.0.0.1:11434

The screen shows Ollama (local, nothing leaves this PC), the small model qwen3.5:4b (about 4.7 billion parameters) and the address http://127.0.0.1:11434, which is this PC. The hint states what the AI sees: point names and the graphic, never the network. Use this for sites where data may not leave the building; a stronger cloud model makes fewer mistakes on hard jobs.

Step 2: ask for the script in plain words

In Scripts → New script, the request box takes plain words. The request used here is a typical cold-weather protection rule for an air handler:

On AHU-1, when the outdoor air temperature is below -20 C, close the outdoor air damper at priority 8; release it when it is back above -15 C.

The two numbers create a 5 K dead band so the damper does not chatter around one value. Priority 8 is "Manual Operator" in the standard BACnet priority list (ASHRAE 135), a common choice for an operator-level override that is above the controller's own program.

BacLens new script dialog: the request, the AI's explanation saying it closes the damper at priority 8, and the code it wrote

The AI answered in a minute or two. Its explanation, outlined in orange, reads well: the script "closes the outdoor air damper at priority 8" and "releases the command" above -15 °C, and it even reminds you to confirm with a supervisor. New scripts start in Test: log what it would write (top of the dialog).

Now read the code, not the explanation:

  • write("AHU-1", "AHU-1 OA-DPR", 8) # Close damper at priority 8: this writes the value 8, which means 8 % open, at the default priority. The comment says priority 8; the code does not do it.
  • write("AHU-1", "AHU-1 OA-DPR", None) # Release damper command: this releases the default priority, not priority 8.

In BACnet, a write without a priority goes to priority 16, the lowest. So in real cold this script would set the damper to 8 % instead of closing it, at a priority any command at 1-15 overrides, and above -15 °C it would release priority 16 every 5 seconds, a slot the site's own program may use. The comment and the explanation both say the right thing, which is why this is easy to miss.

Step 3: dry run the AI's draft exactly as written

Never fix the code in your head and assume it works. Run it as written, in a mode that cannot write. In BacLens, Dry run (10 s, nothing written) runs the script against the current point values and lists every write it would make.

BacLens dry run of the AI draft: 2 runs, 2 writes, 0 errors, each a release on AHU-1 OA-DPR at priority 16

The result, outlined: 2 runs, 2 writes, 0 errors. Each write is a release on analog-output,1 AHU-1 OA-DPR, the damper was at 20, and the priority column says 16. The simulated outdoor air was 3.88 °C, so the script took the "above -15 °C" branch and released priority 16 every 5 seconds.

Zero errors, and still wrong: the script works at priority 16, not 8, and writes on every run instead of only on a change. A check for errors alone would have passed it.

Step 4: correct the logic and dry run again

The corrected script states the priority on both calls, keeps a small memory (state) so it writes only when the condition changes, and does nothing if the temperature cannot be read:

# Cold-weather protection: close the OA damper below -20 C, give it back above -15 C
@every(30)
def cold_weather_damper():
    t = read("AHU-1", "AHU-1 OA-T")
    if t is None:
        log("OA-T not readable: nothing done")
        return
    if t < -20 and not state.get("closed"):
        write("AHU-1", "AHU-1 OA-DPR", 0, priority=8)
        state["closed"] = True
        log(f"OA-T {t} C: damper closed at priority 8")
    elif t > -15 and state.get("closed", True):
        release("AHU-1", "AHU-1 OA-DPR", priority=8)   # give control back to the sequence
        state["closed"] = False
        log(f"OA-T {t} C: priority 8 released")

On its first run it releases priority 8 once. That is deliberate: if an old override at priority 8 was left behind, the script cleans it up when the weather is mild. After that it stays silent until the temperature crosses -20 °C.

BacLens dry run of the corrected script: 1 run, 1 write, 0 errors, a release on AHU-1 OA-DPR at priority 8

The dry run now shows 1 run, 1 write, 0 errors: one release on AHU-1 OA-DPR at priority 8, damper at 20 %, as asked. You can also paste the dry run back to the AI ("your script releases priority 16, I asked for 8") and let it correct itself; then dry run again.

Step 5: save in test mode and read the log

A dry run lasts 10 seconds. Real conditions change over hours, so the next step is to save the script in test mode: it runs all the time on live values and writes in the log what it would do, without writing anything.

BacLens Scripts page: the AHU-1 cold-weather damper script in test mode, 0 errors, and log lines saying it would release AHU-1 OA-DPR at priority 8

The list shows the test badge (outlined) and 0 errors. The log shows the orange line "[test] would release on AHU-1 AHU-1 OA-DPR at priority 8", then the script's message "OA-T 3.88 C: priority 8 released" (two starts, because it was saved twice during testing). Leave it in test mode through a cold night, or test the cold branch on a copy of the building in the simulator, and read the log. Switch to Live only after that; BacLens asks you to confirm you checked the dry run and the test log.

Whatever tool you use, the order is the same: read the code, dry run, test mode with a log, then live with someone watching the first real change.

Keep the site knowledge where the AI can read it

Many AI mistakes come from missing context. A model that knows "priority 8 is the operator here, the economizer is enabled below 18 °C" writes better code. BacLens keeps this in the Brain: plain notes per site that people and the AI both read.

BacLens Brain: the note AHU-1 sequence of operation, with occupied and unoccupied modes, folder equipment, tags ahu and sequence

The note shown is the simulated AHU-1 sequence: fan start 6:30, supply air 13 °C reset to 16 °C, economizer below 18 °C. With ChatGPT or Claude directly, keep a short anonymized "site facts" text and paste it at the start of the conversation.

Worked example: the numbers in the cold-weather script

What each version would do, with the values from the screenshots:

Condition What was asked AI draft (as written) Corrected script
OA-T = 3.88 °C (mild) Leave the damper to the sequence Releases priority 16 every 5 s (720 writes per hour) Releases priority 8 once, then nothing
OA-T = -22 °C (very cold) Damper 0 % at priority 8 Writes 8 % at priority 16, every 5 s Writes 0 % at priority 8, once
OA-T = -17 °C (dead band) Keep the last state Nothing Nothing
A command at priority 10 holds the damper at 30 % Cold rule must win Loses: 16 is below 10, damper stays at 30 % Wins: 8 is above 10, damper closes
OA-T sensor fails (no value) Do nothing, say so Error every run (compares nothing with -20) Logs "OA-T not readable", writes nothing

720 writes per hour is one write every 5 seconds (3,600 / 5). On a BACnet MS/TP trunk at 38,400 baud, useless writes compete with every other request, so "write only on change" matters; the BACnet MS/TP troubleshooting guide shows what a busy trunk does to response times.

Common mistakes when using AI for BMS work

  • Trusting the explanation instead of the code. In the example the explanation was right and the code was wrong.
  • Forgetting the priority. Most BACnet tools write at 16 when you give none. State it in the prompt, check it in the dry run.
  • Releasing the wrong slot. Releasing 16 does not undo a command at 8; an override left at 8 stays forever.
  • Writing on every scan. Write on a change, not every loop.
  • Pasting customer data into a personal chat account. Anonymize, or use a local model.
  • Giving the AI a direct write path, or accepting setpoints it made up.

FAQ

Can ChatGPT program a BMS?

ChatGPT can write control logic and scripts, but it cannot see your controllers or your site's priorities and interlocks. Treat its code as a first draft, run it in a dry run or test mode that writes nothing, check every write and its priority, then go live with someone watching.

Is it safe to use ChatGPT for HVAC controls?

It is safe for drafting, explaining and learning if you remove customer data you may not share and test everything it produces. It is not safe to give any AI assistant direct, unsupervised write access to a building network.

Does ChatGPT keep the data I paste?

It depends on the plan and settings. OpenAI says API and business-plan data is not used for training by default, while personal plans can use chats for training unless you opt out. Check the provider's current data policy and your customer's contract; for site data that must stay private, use a local model.

Which AI is best for BACnet and HVAC controls work?

Larger cloud models, such as Claude or the larger ChatGPT models, make fewer mistakes on long point lists and multi-step code. Small local models through Ollama are free and private but make more errors, like the priority mistake in this guide. The checks are the same for every model.

Can I run an AI model offline for building automation?

Yes. Ollama runs open models on a Windows, Mac or Linux PC and sends nothing to the internet. Bigger models need more memory. BacLens can use Ollama for point mapping, graphics and scripts.

Can AI find faults in my HVAC system?

The finding should come from rules that check trend data, such as NIST APAR or ASHRAE Guideline 36; an AI model then explains it in plain words, and a technician confirms it on site. The AI fault detection guide explains the method.

How do I test AI-written control code without a real building?

Use a BACnet simulator. BacLens Sim is free, and BacLens can run scripts on a copy of the discovered building. Dry run the script there, change the simulated values to test each branch, then move to the real site in test mode.