Automate Tasks in the IP Network with ROQSTAR OpenAPI

16 Nov, 2022

ROQSTAR OpenAPI can be used to automate tasks. In this article, we look at a real-world example of how the work of transport operators is made easier with the help of OpenAPI supported by ROQSTAR Ethernet Switches.

A Typical Environment

A transport operator is digitizing its vehicles. The fleet consists of over 100 vehicles, including solo buses, articulated buses and trams. Each vehicle is equipped with a contactless payment system, digital validators and cameras. A passenger counting system and a passenger information system will also be installed in each vehicle. The components are the same, but may differ in number. For example, an articulated bus requires more components than a solo bus.

Data is transmitted via Ethernet technology. For this purpose, all devices are connected to a network via Ethernet switches. The components are installed, wired and commissioned in the vehicle. After commissioning, all components can be addressed via IP. The systems are “online” and can communicate with each other within the network. The initial configuration is thus complete.

Automation of Management Tasks with Maximum Flexibility

Using an API provides a powerful way to increase productivity where ROQSTAR Ethernet switches are in use. API technology enables machine-to-machine communication. Based on this, a large number of tasks can be executed by a program/service. The execution of tasks depends entirely on the programming: autonomous, time-limited or triggered by a specific interaction or availability. Adjustment of tasks or their execution is possible at any time.

Automation can be done in the backend service or executed as a simple (stand-alone) script. In this way, recurring tasks and their processing can be accelerated and simplified. Practical examples are:

  • Check if the Ethernet Switches have a current software revision
  • Check the settings of the Ethernet switch
  • Select the Ethernet switches whose settings are to be updated
  • Select vehicles whose network settings are to be changed
  • Deployment of configuration or software update of multiple Ethernet Switches
  • Exchange of configuration files
  • Scheduling of maintenance tasks in the vehicle fleet network

Practical Example: Automated Configuration Change

The network in the vehicle fleet is to receive a new configuration, because new validators are to be put into operation. For this purpose, another port on the Ethernet switch has to be activated and the DHCP settings have to be extended. The task is to be performed automatically via an update service as soon as the vehicle is accessible via the depot network.

All Ethernet switches are accessible via the depot network via their unique IP address. The assignment of the configuration to the Ethernet switch is also done via the IP address. The IP address is defined in such a way that it is assigned to a vehicle number. To change the configuration, new configuration files are created in advance.

A script is programmed, which executes the operations below via API. The script writes the events for each operation into a log file. There the status can be checked. In addition, a scheduler is set so that the script runs in a loop for three weeks. During this time, all vehicles should have been in the depot at least once.

Script Operations:

  1. Perform a ping to an IP address from the vehicle IP pool.
  2. If ping successful, retrieve status and existing configuration.
  3. If configuration does not match target, perform configuration update.
  4. Retrieve status again.
  5. Jump to next IP address.

Creating Scripts is Easy Thanks to OpenAPI

The OpenAPI specification is a format that defines the structure and syntax for API (REST) services – in this case, the device-side interface. The big advantage of OpenAPI is the documentation. It is generated automatically so that it is always in sync with code, structure and parameters.

Outdated or missing documentation is eliminated by OpenAPI because the OpenAPI definition file is itself the API documentation. In addition, the entire API specification is in a single format that multiple tools, including the documentation generator, can process automatically. The YAML file that describes the OpenAPI definition file is easy to read and modify.

Existing tools can also be used to automatically generate the code for the API. The code for the client application can be generated in a number of languages. Execution on the device side is independent of this.

More Stories Like This:

Our products are fundamental for the digitalization in public transport. ROQSTAR M12 Ethernet Switches provide the network infrastructure for e-ticketing, passenger counting systems (PCS), dynamic passenger information (DPI) and closed-circuit television (CCTV).


Hoelzlestr. 3
72768 Reutlingen


Connect with us!

© 2024 | TRONTEQ GmbH