Import
Import methods allow bulk loading of project data from CSV. All
methods accept a CSV string and return a dict with the
result status.
Zones
import_zones(csv_data)Spaces
import_spaces(csv_data)Assets
import_assets(csv_data)Sources
import_sources(csv_data)Source Map
import_source_map(csv_data)Maps points from a source to assets. See the API Reference for the expected CSV format.
Scene
import_scene(csv_data)Adds or updates a single scene. The first data row is the scene
itself, and each following row is a point in that scene, with one column
per mode. Leave the scene id blank to create a new scene.
See Import Scene for the CSV
format.
Requires a Control API key: a scene used by a schedule writes its values to equipment, so changing those values is a write to the building.
csv = """name,id,Occupied,Unoccupied,Curtail
Lobby HVAC,sn.5,,,
,s.5.9,72,55,78
,s.5.12,1,0,0
"""
client.import_scene(csv)Schedules
import_schedules(csv_data)Adds or updates schedules. Rows without an id add a new
schedule; rows with one update it, changing only the columns present.
See Import Schedules for the
CSV format.
Requires a Control API key: a schedule applies its scene modes to equipment, so changing a schedule is a write to the building.
# Add a new schedule
csv = """name,schedule,active,inactive
Office,weekdays 8:00-17:00,"sn.1.1, sn.2.1","sn.1.2, sn.2.2"
"""
client.import_schedules(csv)
# Update just the times of an existing schedule
client.import_schedules("id,schedule\nsch.2,weekdays 7:00-18:00\n")Trends
import_trends(csv_data, mode=None)Arguments
| Argument | Default | Description |
|---|---|---|
csv_data |
— | CSV string content (required) |
mode |
merge |
Import mode: merge, append, or
prepend |
The CSV must have ts as the first column (ISO 8601
timestamps), followed by one column per point ID. Maximum 50 columns and
10,000 rows per request.
Example
# Import assets from a CSV string
csv = "id,name,type\na.1,AHU-1,ahu\na.2,AHU-2,ahu\n"
result = client.import_assets(csv)
print(result)
# Import trend data
csv = "ts,s.2.4,s.2.5\n2026-03-09T00:00:00,72.1,68.4\n"
result = client.import_trends(csv, mode="append")
print(result)See the API Reference for full CSV format details per endpoint.