This guide provides step-by-step instructions for deploying the MH DAQ backup system on the DAQ computer. Follow each step carefully, and refer to the Troubleshooting Guide if you encounter any issues.
Path placeholders used in this guide:
<repo_path>— the folder where you clone the repository (e.g., the result of Step 2)<conda_path>— your conda base directory (runconda info --baseto find it)
Before you begin, confirm that:
- You have administrator access to the DAQ desktop computer in Building 423
- The machine is on the NIST network
- You can reach the mission network drive
Test this by opening File Explorer and typing the mission path (from
data_config.json→remote_destinations.mission.base_path) in the address bar. You should see folders. There should also be a shortcut on the desktop, as using it may resolve issues with accessing the drive through File Explorer.
If the mission network drive is not accessible, stop and contact eldst on slack before proceeding.
The backup system requires Python 3.x via a dedicated conda environment (iaqmh_daq), created from environment.yaml. Check that conda itself is already installed on the DAQ computer:
- Open Command Prompt or PowerShell on the DAQ computer
- Type the following command:
conda --version - If you see a version number (e.g.,
conda 23.5.0), Python and conda are installed - If you see
conda is not recognized..., contact Nathan Lima or eldst for help
The
iaqmh_daqenvironment itself (withpandas,requests,pyserial) is created in Step 2, after the repository is cloned, sinceenvironment.yamllives in the repo.
On the DAQ desktop computer, clone the repository from GitHub:
- Open Command Prompt or PowerShell on the DAQ computer
- Navigate to the directory where you want to install the repo:
cd <your_preferred_install_directory> - Clone the repository:
git clone https://github.com/usnistgov/Building423_IAQ-MH_DAQ - This creates a
Building423_IAQ-MH_DAQ\folder at that location — this is your<repo_path>
Note: If
gitis not installed, contact your Nathan Lima or eldest support or see the Troubleshooting Guide for installation instructions.
- Create the conda environment from the repo's
environment.yaml:This creates thecd <repo_path> conda env create -f environment.yamliaqmh_daqenvironment withpandas,requests, andpyserial.
After cloning, verify that all files are in place:
- Open File Explorer and navigate to
<repo_path>\ - You should see:
Building423_IAQ-MH_DAQ/ ├── docs/ (documentation) ├── src/ (Python scripts) ├── scripts/ (batch files) ├── README.md ├── LICENSE.md ├── CODEMETA.yaml └── data_config.template.json (copy this to data_config.json and edit paths) - The Python backup scripts are in:
<repo_path>\src\ - The batch file is in:
<repo_path>\scripts\
The batch files (run_backup.bat and run_weather_station_daq.bat) read where conda is installed from data_config.json, not from the batch files themselves — this keeps machine-specific paths out of the tracked .bat files so a future git pull never conflicts with a hand edit here.
-
On the DAQ computer, open Command Prompt and type:
conda info --baseThis shows where conda is installed — this is your
<conda_path>. -
Using Notepad, open
<repo_path>\data_config.json(copy it fromdata_config.template.jsonfirst if you haven't already) -
Find the
"conda"section and setactivate_path:"conda": { "activate_path": "<conda_path>\\Scripts\\activate.bat", "env_name": "iaqmh_daq" }
Replace
<conda_path>with the path returned byconda info --basein step 1. Leaveenv_nameasiaqmh_daqunless you created the environment under a different name. -
Save the file (File → Save) and close Notepad
The Python script paths and log file path are derived automatically from the batch file's location — no edits needed for those. Both batch files read the same
condablock, so they always activate the same environment.
Now run the backup manually to make sure everything works. Choose one of the two options below:
-
On the DAQ computer, open Command Prompt
-
Navigate to the scripts folder:
cd <repo_path>\scripts -
Run the batch file:
run_backup.bat -
The command prompt window will appear briefly while the scripts run, then close automatically. All output is written to
batch_output.log— there is no console output displayed. -
Open
<repo_path>\scripts\batch_output.logimmediately after to confirm the scripts ran.
- On the DAQ computer, open File Explorer
- Navigate to:
<repo_path>\scripts\ - Find the file named
run_backup.bat - Double-click on
run_backup.batto run it - A command prompt window will appear showing the backup progress
- The window will close automatically when finished
-
Open File Explorer and navigate to
<repo_path>\scripts\ -
Open the file
batch_output.login Notepad -
Look for these messages (one for each backup):
ALL BACKUPS COMPLETED SUCCESSFULLY(frommh_daq_file_backup.py)ECOBEE BACKUP COMPLETED SUCCESSFULLY(fromecobee_thermostat_backup.py)
Note: Until an Ecobee API key is obtained, the Ecobee script will not complete successfully — it will log a token/authorization error instead of the success message. This is expected and does not affect the DAQ backup.
-
Check for errors:
- Look for lines containing
ERRORorNOT accessible - If errors appear, see the Troubleshooting Guide
- Look for lines containing
Once the first test backup is successful, you have two options:
Run the batch file manually every few days:
- Open Command Prompt on the DAQ computer
- Run:
<repo_path>\scripts\run_backup.bat - Check
<repo_path>\scripts\batch_output.logfor success
Schedule the backup to run automatically every night using Splinterware System Scheduler. On the Building 423 DAQ computer this is done by creating an event (via Action → New Event... or the green + button) that runs run_backup.bat:
- See the Configuration Guide for detailed event setup instructions
- This is the long-term approach for unattended operation
Before considering deployment complete, confirm:
- Python and the
iaqmh_daqconda environment are installed (conda env create -f environment.yaml) - Repository is cloned and
<repo_path>is noted data_config.jsoncreated from template with correct local and network paths, including thecondasection'sactivate_path- Manual backup test completed successfully
- Log file shows no errors
- DAQ data appeared on mission network drive
- Ecobee token file created and first thermostat backup succeeded (pending an Ecobee API key — not required for current deployment; the Ecobee script will log an authorization error until a key is obtained)
If you encounter any issues:
- Check the log file:
<repo_path>\scripts\batch_output.log - Read the error message and look it up in the Troubleshooting Guide
- Contact Nathan Lima with the error message and log file contents
Once installation is complete:
- To set up Ecobee thermostat data backup, see Configuration Guide
- To automate with Splinterware Scheduler, see Configuration Guide
- To troubleshoot issues, see Troubleshooting Guide