Every PROFINET device ships with a GSDML file that states its model, article number, Ethernet ports, slots and pluggable modules. The open-source generator ot-devicetypes reads those files and writes NetBox device types and module types in the format of the NetBox community device type library. I/O stations, drive control units and IO-Link masters then no longer have to be typed in by hand; what a GSDML file does not contain, such as the power input, still comes from the data sheet.
What a GSDML file is
GSD is the device description technology of PROFIBUS and PROFINET. For PROFINET the file is written in GSDML, the XML-based GSD Markup Language, specified by PROFIBUS & PROFINET International (PI). According to PI the specification covers a device’s identification, structure, communication features, process data, parameters and diagnosis. The file lives in the engineering tool, which imports it to learn what the device can do.
It is written for that tool, not for an inventory. A generator therefore has to interpret it, and the repository documents each decision in docs/gsdml.md.
What the generator reads
| In the GSDML file | Becomes in NetBox |
|---|---|
DeviceAccessPointItem (the head of a station) |
a device type |
its ModuleInfo/OrderNumber |
part_number, the file name and the slug |
its ModuleInfo/Name |
model, without the firmware version |
its ModuleInfo/InfoText |
description, cut to 200 characters |
PortSubmoduleItem |
an interface |
PhysicalSlots |
module bays |
ModuleItem with an order number |
a module type |
Everything else in the file (parameters, telegrams, I/O data, diagnostics) is ignored. Ports are named X1 P1, X1 P2, X2 P1. The medium comes from the MAU types the port lists: the fastest one decides the interface type, and a port that names none is 100BASE-TX. Every device type gets u_height: 0, since this hardware sits on a DIN rail or a machine.
A generated definition looks like this (an IO-Link master):
---
manufacturer: ifm
model: AL1100
slug: ifm-al1100
part_number: AL1100
description: IO-Link Master StandardLine Profinet 4 Ports IP67
u_height: 0
is_full_depth: false
interfaces:
- name: X1 P1
type: 100base-tx
- name: X1 P2
type: 100base-tx
module-bays:
- name: Slot 1
position: '1'
comments: Generated from GSDML-V2.34-ifm-AL1100-20181105.xml by ot-devicetypes.
How device types and module types map
The head of a station becomes a device type. A module becomes a module type only when it has an order number of its own, because many “modules” in a GSDML file are telegrams or data layouts, not hardware. A station gets module bays only when at least one such module fits in it.
Some cases need a decision, and the repository states each one:
- A file lists a device once per firmware release. Entries with the same order number become one device type.
- A device with two PROFINET interfaces, such as a PN/PN coupler, is merged into one device type with ports on X1 and X2.
- Drives and motor starters often carry a family pattern where an article number should be. A pattern is skipped unless the source file lists the real articles it stands for.
- A station with more than 64 slots gets no module bays by default; the generator prints a note.
- Head stations that take their Ethernet ports from a pluggable adapter are skipped.
What a GSDML file cannot tell
The repository is explicit about this. Not in a GSDML file, so missing until someone adds it to the source file:
- the power input;
- USB, serial and other non-PROFINET ports;
- weight and dimensions.
These facts come from the manufacturer’s data sheet, through a file under sources/. ot-devicetypes check -v lists the device types that still lack a power input. The community library refuses those, so they are not yet offered there. The project’s open task list counted 17 such device types at the time of writing.
Devices that are not PROFINET devices have no GSDML file. That includes the CPUs of the S7-1200 and S7-1500, which are controllers. They are not covered yet.
What is covered today
The repository’s status is “early”: the definitions are skeletons, correct as far as they go, and incomplete. On 13 November 2026 it holds 23 device types and 102 module types:
| Manufacturer | Device types | Module types | What |
|---|---|---|---|
| Siemens | 10 | 0 | PN/PN Coupler, SINAMICS control units, SIMOCODE pro V PN |
| WAGO | 4 | 69 | 750 fieldbus couplers and I/O modules |
| Murrelektronik | 4 | 0 | MVK |
| Festo | 2 | 33 | CTEU-PN |
| ifm | 2 | 0 | IO-Link masters |
| Turck | 1 | 0 | IO-Link master |
Continuous integration validates every definition against the community library’s schema and posts each file to the import page of the newest NetBox release, then compares the stored objects with the file.
Import into NetBox
The folders device-types/ and module-types/ have the same layout as the community library, so any tool that reads that library can import them. Without a tool, paste a file into NetBox’s own import page (Device types > Import or Module types > Import, format YAML), which is what the project’s CI does. The CI script creates the manufacturer before it imports that manufacturer’s files.
To generate definitions from GSDML files of your own, install the generator. It is not on PyPI yet:
pip install git+https://github.com/Packetflow-be/ot-devicetypes
Look at what a file describes, then convert it:
ot-devicetypes inspect GSDML-V2.34-Vendor-Device-20220126.xml
ot-devicetypes convert GSDML-V2.34-Vendor-Device-20220126.xml --out out/
GSDML files are not in the repository. They belong to their vendors; download them from the vendor’s support site.
Contribute a file
The README gives five steps:
- Download the GSDML file from the vendor.
- Run
ot-devicetypes inspecton it. - Add a file under
sources/;docs/sources.mddescribes the format. - Run
ot-devicetypes buildandot-devicetypes check. - Open a pull request with the source file and the generated definitions.
ot-devicetypes build --gsdml-dir ~/gsdml
ot-devicetypes check
A source file needs only the gsdml key, a glob on the file name. Data-sheet facts go under devices, for example:
devices:
AC-100:
model: AC-100
set:
weight: 0.2
weight_unit: kg
add:
power-ports:
- name: 24V
type: dc-terminal
console-ports:
- name: USB
type: usb-micro-b
The rules are short: take every added fact from the manufacturer’s data sheet or manual and name it in a comment, and list an article under expand only when it appears in the manufacturer’s catalogue. The code is Apache-2.0; the definitions are CC0 1.0.
Sources
- ot-devicetypes on GitHub: README, how a GSDML file becomes a device type, source files, open task list
- GSDML Specification for PROFINET (PROFIBUS & PROFINET International)
- Where’s My GSD File? (PI North America)
- NetBox community device type library
- netbox-ot on GitHub and on PyPI, the companion OT register plugin
Packetflow maintains ot-devicetypes and builds secure OT platforms for industrial plants; it does not program PLCs. For help getting a plant’s hardware into NetBox, send the NetBox version, the list of devices or article numbers to model and a sketch of the installation through the contact page. The other open tools are under open tooling.