Export historical data from Control4 HVAC Generic BMS Monitor systems via WebSocket API.
This tool allows you to extract years of historical temperature, humidity, and HVAC data from Control4 systems running the hvac_generic_bms_monitor_dc driver. Perfect for migrating to a new platform or analyzing your HVAC system's performance.
- ✅ Export all historical data via WebSocket API
- ✅ Automatic device and variable name mapping
- ✅ CSV output format for easy import
- ✅ Comprehensive data analysis tools
- ✅ Support for 132+ sensor types
- ✅ No proprietary format decoding required
- Python 3.7+
- Access to your Control4 controller's IP address
- Control4 system with HVAC BMS Monitor driver
# Clone the repository
git clone https://github.com/yourusername/control4-hvac-data-exporter.git
cd control4-hvac-data-exporter
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt-
Update the controller IP address in
scripts/export_data.py:WS_URL = "ws://YOUR_CONTROLLER_IP:13005/"
-
Create your device list (see Device Discovery)
-
Run the export:
python scripts/export_data.py
-
Analyze the data:
python scripts/analyze_data.py python scripts/check_export.py
- Temperature sensors (°F and °C)
- Humidity sensors (%)
- HVAC states and modes
- Setpoints (heating/cooling)
- Outdoor weather data
- System memory and usage stats
- Data Points: 786,027 readings
- Sensors: 132 active sensors
- Date Range: ~414 days of history
- Format: CSV with timestamps, device names, and values
The Control4 HVAC BMS Monitor exposes a WebSocket API on port 13005:
ws://CONTROLLER_IP:13005/
{
"method": "GET_DATA",
"from": 1234567890000,
"to": 1234567890000,
"utcOffset": -21600,
"windowSize": "NONE",
"scale": "MS",
"vars": "device_id.variable_id,device_id.variable_id,...",
"maximumElements": 100000,
"uuid": "unique-request-id"
}{
"type": "DEVICE_DATA",
"uuid": "unique-request-id",
"values": {
"device_id.variable_id": {
"values": [[timestamp, value], [timestamp, value], ...]
}
}
}export_data.py- Main export script to download all historical datacheck_export.py- Verify exported data and show statisticsanalyze_data.py- Comprehensive data analysis (frequency, gaps, ranges, correlations)analyze_devices.py- Per-device/sensor statisticsmissing_sensors.py- Identify sensors without historical data
test_window_sizes.py- Test different windowSize parametersadd_names.py- Add human-readable names to exported data
To create your device_variable_list.json:
- Open Chrome DevTools (F12) on the Control4 web interface
- Go to Network tab → WS (WebSocket)
- Click on the WebSocket connection
- Look for
USER_SCREENSorWATCHED_DEVICESmessages - Extract device IDs and variable IDs
- Create JSON mapping (see
examples/device_variable_list_sample.json)
-
windowSize: Data aggregation level"NONE"- All raw data points (recommended)"HOUR_1"- Hourly aggregation"DAY_1"- Daily aggregation"WEEK_1"- Weekly aggregation"MONTH_1"- Monthly aggregation
-
maximumElements: Max data points per sensor (default: 100000) -
utcOffset: Timezone offset in seconds (e.g., -21600 for Central Time)
Understand sampling rates for each sensor (seconds, minutes, hours, or days between readings).
Find periods with missing data (gaps > 24 hours).
Min/max/average values for all numeric sensors.
Compare temperature readings across different rooms.
Identify continuous vs event-driven sensors.
Calculate percentage of expected data points present.
CSV file with columns:
sensor_id- Device and variable ID (e.g., "788.1130")sensor_name- Human-readable name (e.g., "Theater - TEMPERATURE_F")timestamp- Unix timestamp (seconds)datetime- ISO 8601 formatted datetimevalue- Sensor reading (numeric or string)
- System stores approximately 13-14 months of historical data
- Some sensors (SCALE, HVAC_MODE) may not have historical data
- Configuration values and setpoints only record when changed
- Maximum data points per request: 100,000
- Verify controller IP address and port 13005
- Check that WebSocket connection is established
- Ensure device IDs and variable IDs are correct
- Try requesting a single sensor first
Some sensors won't have historical data:
- SCALE - Configuration value (rarely changes)
- HVAC_MODE - Configuration value (rarely changes)
- Setpoints - Only logged when manually adjusted
- New devices - Recently added sensors
- Ensure you're on the same network as the Control4 controller
- Check firewall settings for port 13005
- Verify the HVAC BMS Monitor driver is installed and running
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - See LICENSE file for details
- Control4 for the HVAC BMS Monitor driver
- Community members who helped reverse-engineer the WebSocket API
- Issues: GitHub Issues
- Discussions: GitHub Discussions
This tool is not affiliated with or endorsed by Control4. Use at your own risk. Always backup your data before making system changes.