Importing & Exporting Devices
You can import and export device configurations as CSV files. Both run from the Actions menu on the Devices page. This is useful for bulk-creating devices across protocols, migrating configurations between Koios instances, or editing device settings in a spreadsheet.
Exporting Devices
How to Export
There are two ways to export device configurations:
- Selected devices: tick one or more devices, then open the Actions menu above the table and choose Export config for N devices. Only the selected devices are exported.
- All devices: with nothing selected, the same menu offers Export config for all N devices, which includes every device in the system.
The export downloads a file named devices.csv containing one row per device.
What's Included
The CSV contains all configuration fields for each device: general settings and protocol-specific fields. Every column is included regardless of protocol, so columns that don't apply to a particular device's protocol will be empty.
CSV Columns
The export includes these columns:
Core fields:
Protocol-specific fields:
Audit fields (read-only):
Importing Devices
How to Import
- Navigate to the Devices page
- Open the Actions menu above the table and choose Import devices from CSV
- Select a CSV file from your computer
- Review the preview to verify what will change
- Click Confirm Import to apply the changes
The menu item is disabled if your account lacks permission to manage devices.
CSV Format
The import expects a CSV file with column headers matching the export format. You don't need to include every column, only the fields you want to set. At minimum, new devices require a name and protocol.
How the import determines what to do with each row:
Example: Creating New OPC-UA Devices
To create new devices, leave the id column empty. Provide at least a name and protocol (by ID):
Example: Creating Modbus TCP Devices
Example: Updating Existing Devices
To update existing devices, include the id column with the device's database ID. Only the fields you include will be checked for changes:
Preview Step
After selecting a file, Koios performs a dry run. It processes the CSV without saving anything and shows you exactly what will happen:
- Counts: how many devices will be created, updated, or rejected, and how many of the file's columns change at all
- Row details: select any row to open a panel showing each changed field, with its current value above the new one
- Filtering: search the rows, or narrow the grid to one action — rejected rows sort to the top and are marked
- All columns: the grid shows only the columns your file changes. Switch it to show every column when you want the full picture
Validation Rules
The import validates each row against the same rules as the create/update forms:
Boolean fields accept: True/False, true/false, 1/0, yes/no.
Foreign key fields (protocol, parent, opcua_certificate) expect integer IDs.
After Import
Once you confirm the import:
- Devices are created or updated in a single transaction. If anything fails, all changes are rolled back
- An audit event is recorded (e.g. "Imported 10 devices") with your username
- The device table automatically refreshes to show the updated list
- Imported devices begin connecting on the next scan cycle if they are enabled
Tips
- Bulk-create devices for a new site: create one device per protocol, export it, duplicate the rows in your spreadsheet, change the names and addresses, clear the
idcolumn, and import. - Move devices between Koios instances: export from one instance, clear the
idandslugcolumns, verify theprotocolIDs match the target instance, and import on the target. - Audit trail: every import creates an event visible on the Events page, grouped under a single parent event so you can see what was imported in one action.
- Read-only columns:
id,slug,created_at,updated_at, andlast_modified_byare ignored on create. You can leave them in the CSV (useful when round-tripping an export) but they won't overwrite system-managed values. - Sensitive fields: credentials (
opcua_password,soap_rdm_password,rest_password,sql_password) are included in exports. Handle exported CSV files carefully if your devices use authenticated connections.
