Skip to content

NathanL-CodeBase/Building423_IAQ-MH_DAQ

Repository files navigation

Building 423 IAQ Manufactured House (MH) DAQ — Automated Data Acquisition and Backup System

Automated backup and data collection scripts for the NIST IAQ Manufactured House (MH) test facility Data Acquisition (DAQ) system at Building 423. This repository contains Python scripts and deployment documentation for copying instrument data from the DAQ desktop computer to secure network storage and downloading thermostat data from the Ecobee4 smart thermostat.


Quick Links


Purpose and Scope

This repository supports the continued development of the MH DAQ backup infrastructure and deployment/maintenance instructions for technical personnel. All network paths are managed in data_config.json to prevent hardcoded paths from being visible in the GitHub repository.

The system:

  1. Backs up indoor DAQ data from the Task Logger to the mission network drive (all data)
  2. Backs up outdoor weather station data (AIO2) to the mission network drive (all data)
  3. Backs up selected 2026 data to the EPA Shower project share (temporary — will be deprecated)
  4. Downloads thermostat data from the Ecobee4 thermostat via the Ecobee API (daily 5-minute interval runtime data)

Note: All three backup scripts reference the same configuration file (data_config.json). The EPA Shower backup is a separate project-specific target that will be removed after the EPA project concludes.


Disclaimer

Certain commercial equipment, instruments, software, or materials are identified in this repository in order to specify the experimental and analytical procedures adequately. Such identification is not intended to imply recommendation or endorsement of any product or service by NIST, nor is it intended to imply that the materials or equipment identified are necessarily the best available for the purpose.

Measurement Uncertainty

This repository is responsible for the automated transfer of raw measurement data from the DAQ computer to network storage. No calculations, data processing, or derivation of new quantities are performed by the scripts in this repository. Therefore, measurement uncertainty is limited to the inherent accuracy and precision of the instruments themselves, as specified in their manufacturer documentation.

Detailed specifications for each instrument, including measurement ranges, accuracy, resolution, and calibration information, are available in the instrument documentation: docs/instruments/INSTRUMENT_DOCUMENTATION.md.


What's in This Repository

Building423_IAQ-MH_DAQ/
├── docs/                              # Documentation (read these first!)
│   ├── INSTALLATION.md               # Quick start guide & deployment steps
│   ├── CONFIGURATION.md              # Detailed setup & Ecobee configuration
│   ├── TROUBLESHOOTING.md            # Common issues and solutions
│   └── instruments/                  # Instrument specs and document links (vendor manuals excluded)
│       ├── INSTRUMENT_DOCUMENTATION.md  # Specifications and variable lists for all active instruments
│       └── pdf_links.md              # Public download links for vendor manuals (copyright excluded)
├── src/                               # Python source code (for development)
│   ├── mh_daq_file_backup.py         # Main DAQ data backup
│   ├── epa_shower_file_backup.py     # EPA Shower project backup
│   ├── ecobee_thermostat_backup.py   # Ecobee thermostat data download
│   └── ecobee_token_setup.py         # Ecobee API setup (one-time)
├── scripts/                           # Deployment scripts
│   └── run_backup.bat                # Batch file to run all backups in sequence
├── README.md                          # This file
├── LICENSE.md                         # Public domain license
├── CODEMETA.yaml                     # NIST metadata
├── CODEOWNERS                        # Repository maintainers
├── data_config.template.json          # Configuration template (copy to data_config.json)
├── fair-software.md                   # FAIR software principles documentation
└── .gitignore                         # Git ignore file

System Status and Deployment Timeline

Component Status Notes
DAQ Backup (Task Logger) Operational Running via run_backup.bat, deployed to DAQ computer
Weather Station Backup Operational Running via run_backup.bat, deployed to DAQ computer
EPA Shower Backup Operational Running via run_backup.bat, deployed to DAQ computer
Ecobee Thermostat Data Operational Running via run_backup.bat, deployed to DAQ computer
Splinterware Scheduler Under Review Software evaluation in progress; backups currently run manually via run_backup.bat

Getting Started

For End Users (Operators and Technicians)

  1. Read first: Installation Guide for deployment steps
  2. Configure paths:
    • Copy data_config.template.json to data_config.json
    • Edit data_config.json to set your local and network paths (no hardcoded paths in scripts!)
    • See Configuration Guide for detailed instructions
  3. Deploy: Clone the repository to the DAQ computer and run test backup
  4. Monitor: Check batch_output.log for successful backups
  5. Troubleshoot: See Troubleshooting Guide if issues arise

For Developers

  • Scripts are located in src/ and are ready for continued development
  • All scripts load configuration from data_config.json — no hardcoded paths!
  • All backup functions are modular; new data sources can be added following the existing pattern
  • Python 3.x with pandas library is required (see Configuration Guide)

Key Features

Incremental Backups — Only copies files that have changed (compares modification times) Safe Live-File Handling — DAQ backup scripts skip today's data file by default (the DAQ system is still writing to it; copying an open file can produce a corrupt backup). Run with --include-today to override when needed. Ecobee Integration — Automatic download of 5-minute interval thermostat data via Ecobee API (always fetches the previous completed day — no live-file risk) Error Logging — Detailed logs for troubleshooting and audit trails Manual & Automated — Run manually on-demand or schedule with Splinterware System Scheduler Smart Retry Logic — Handles token refresh and network timeouts gracefully


System Requirements

Hardware & Network

  • Machine: DAQ desktop computer (Building 423)
  • Network access: NIST mission network
  • Storage: Access to the mission network drive (path configured in data_config.jsonremote_destinations.mission.base_path)
  • Additional access: Elwood network drive (path configured in data_config.jsonremote_destinations.epa_shower.base_path, for EPA Shower backup)

Software

  • Python 3.x (installed via Miniforge/Conda — run conda info --base to find your install path)
  • pandas library (install once in base conda environment)
  • Windows command prompt/PowerShell to run batch files

For Ecobee Thermostat Data

  • Ecobee account with thermostat (thermostat ID configured in data_config.json)
  • Ecobee API key and authorized token file (see Configuration Guide)
  • Internet access from the DAQ computer to reach api.ecobee.com

Data Organization

All backed-up data is organized by source and date:

<remote_destinations.mission.base_path>\        ← configured in data_config.json
    ├── indoor_daq\          ← Task Logger files
    ├── weather_station\     ← Outdoor weather station files
    └── thermostat\          ← Ecobee4 runtime CSVs
        └── YYYY\
            └── YYYY-MM-DD_thermostat.csv

EPA Shower data also copies to:

<remote_destinations.epa_shower.base_path>\     ← configured in data_config.json
    ├── indoor_daq\2026\
    └── weather_station\2026\

Instrumentation

Vendor instrument manuals and data sheets are not tracked in this repository due to copyright. Public download links for all vendor documents are in docs/instruments/pdf_links.md.

Active Instruments

Instrument Type Measurement Documentation
Met One AIO 2 Outdoor weather station (10m MET Tower) Wind speed/direction, temperature, humidity, barometric pressure Manual, Supplement
Vaisala HMP155 High-accuracy RH/T probe (×4) Relative humidity, temperature User Guide
Vaisala HMP45A RH/T probe (×8, legacy) Relative humidity, temperature User Guide
ecobee4 Smart Wi-Fi thermostat Temperature, humidity, HVAC runtime Fact Sheet
NI cDAQ-9178 8-slot USB DAQ chassis User Manual
NI 9201 8-ch analog input module (×5) ±10V analog inputs Getting Started
Setra Model 264 Differential pressure transducer Differential pressure (currently disconnected) Data Sheet

Project-Specific Wiring Documents

The cDAQ-9178 channel map (xlsx) and weather-station wiring sketch (PDF) are NIST-authored internal documents maintained outside the repository. See docs/instruments/pdf_links.md for details.

Detailed specifications, variable names, and channel assignments are in INSTRUMENT_DOCUMENTATION.md. Instrument serial numbers are in data_config.json under the instruments key.


License

This software is in the public domain and provided "as is" according to the LICENSE.md file.


Citation

If you use this software in your research, please cite as:

@software{lima_2026_building423_daq,
  author    = {Lima, Nathan M.},
  title     = {{Building 423 IAQ Manufactured House DAQ --- Automated Data Acquisition and Backup System}},
  year      = {2026},
  version   = {1.0},
  publisher = {National Institute of Standards and Technology},
  url       = {https://github.com/usnistgov/Building423_IAQ-MH_DAQ},
  doi       = {10.18434/mds2-4154}
}

Contact

About

Python-based automation system for the NIST Building 423 Manufacturing House IAQ test facility. Provides incremental backups of instrumentation data, weather station logs, and thermostat telemetry to mission network storage with detailed error logging, retry logic, and support for scheduled execution.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors