Device Management¶
Overview¶
This section covers the following use cases:
- How to add a new device as data source
- How to assign a device to a gateway
- How to find last gateway a device connected with
- How to check the current state of a device
- How to visualize device data with the built-in Data Explorer
- How to export data via the user interface
Add a new source device¶
Prerequiste
A device of the same Model, of which you would like to add additional devices, is already fully configured on the Device Hub. If you want to add a new device Model, please contact Leitwert support.
If the devices are already registered on the Device Hub, jump to step 5 below. Otherwise, proceed with step 1.
- Register your new device in the
Devicesection of theDeviceapplication by clicking on the+ Devicebutton.

- Choose the corresponding
ProductandModelfrom the dropdown menu and enter the Bluetooth MAC address of the devices asDevice ID. You can add multiple devices at the same time using a comma-separated list. Alternatively, click theAdvancedtab at the top of the screen to directly enter the deviceNametogether with eachDevice ID. Click theSavebutton for the changes to take effect.

- In the
Devicesection of theDeviceapplication, chose an already configured device of the sameModelfrom the device list and open its detail view by clicking on the corresponding row. - In the tab
Device Settingsclick the buttonApply to other devicesfor the first setting, and select the newly registered devices from the list. Click theApplybutton. Repeat for every setting of that device.

- Open the
Source Devicessection in theDataapplication and click the+ Devicebutton to add the newly registered devices as source devices for data capture. You need to choose the relatedModelfrom the dropdown menu and enter the device IDs (Bluetooth MAC address). You can enter multiple device IDs at the same time using a comma-separated list. Click theSavebutton.

Info
After completing the steps above, device events will be stored in the event database. To automatically forward all events to the time-series database, the corresponding configuration must be updated by Leitwert. This can be done retrospectively as well. Please contact Leitwert support to request this.
Assign a source device to a gateway¶
A Leitwert gateway only connects with devices, which have been assigned to it on the Device Hub.
You can do this as follows:
- Navigate to the
Source Devicessection in theDataapplication. Filter the source device list for gateways either by using the name search or by selecting the related model from the dropdown menu. Chose the gateway from the list, to which you would like to assign a device. This will open the gateway detail view, which is depicted below. There, open the tab for the device type you would like to add (e.g. MMT Devices as depicted below). - From the list of related devices, select the ones you would like to add to this gateway. Selected devices will be marked with a green check mark. If a device can't be selected, it is already assigned to another gateway and does not allow multiple assignments. In that case, you first need to un-assign it from the other gateway.
- If you want to add many devices, you can do this efficiently with the button
Select all. If you want to assign all devices to all gateways, follow below Tipp.
Tipp
To assign all devices of a certain model to all gateways, it is more efficient to do the following:
1) Complete above steps one to three for one gateway.
2) Open the device settings of that gateway by navigating to the Device application, then section Devices, filtering for product Gateway and clicking on the specific gateway in the list.
3) For the setting with the Key "device-plugin-(device model)", whereas (device model) is the name of the device model you want to assign, click on the button Apply to other devices and click on select all and save to apply the same settings to all other gateways.
Add a device to a gateway
Find last gateway a device connected with¶

- Open the Data App
- Select the Model (Basler-Band) and enter the name of the device
- Press the "Detail" ⓘ button below "Aktionen"


- Open the "Device History" tab
- Click the "Copy" button from a "device-data" Event Type
Note
If the device is currently connected, you can switch on "Auto Refresh" so new incoming messages will be displayed automatically.
- Paste the message into a text editor (on Windows e.g. use the "editor" programm or on MacOS the "text edit")
- You will see the ID of the Gateway this message was sent through

Note
"wearables-bt-gw-monitoring0007-xxxxxxxxx" corresponds to "GW 07 - smartAF"
Check device states¶
To check a device state, navigate to the Source Devices section in the Data application. Filter the list of source devices either by using the name search or by selecting a specific device model from the dropdown menu. Then, select the device, for which you would like to see the device state.
Note
There is different information displayed depending on whether a device is a gateway or not.
Standard device state¶
For devices that are not gateways, the following information is available:
- Last Attempt: The last time the gateway tried to access the device.
- Reconfiguration Time: The last time when settings have been applied to the device.
- Last Sync: The time up to which all data has been retrieved from the device.
- Last Connection: Time when the last connection has been successfully established between a gateway and the device.
- Other fields can be configured depending on the device.
Information about the state of a standard device
Gateway state¶
For gateways, the following information is available:
- Last Health Check: Last time the gateway sent a health check.
- Last Update Check: Last time the gateway checked for a firmware update.
- IP Address: IP address of the gateway in its current network.
- WiFi MAC Address: WiFi MAC address to which the gateway is currently connected.
- WiFi Frequency: The WiFi frequency over which the gateway is currently communicating.
- Hardware Info: Detailed name of the hardware model and version of the gateway.
Information about the state of a Leitwert gateway
Visualize device data¶
Data from the Event Log can be visualized in the User Interface using the Data Explorer. For the generic view, navigate to the Data app and there to the Data Expolorer section.
Note
If you access the Data Explorer via the detail view of a Monitoring Tile, Device or Participant, then it will use preconfigured settings for the related Device and Data Templates, which can't be changed as described in step 1 below.
- Click
Selectionto select a device from the device list, for which you would like to visualize the data. Then select the data template from theTemplatesdrop down menu. Lastly, select a date, for which you would like to visualize the data from that device. - If the graph does not load automatically - or if you would like to refresh the graph - click
Refresh Data Source. - You can export the visualized data as CSV or HDF5 file. Click the
Refresh CSV ExportorRefresh HDF5 Exportbutton, respectively. After the data was processed, which can take a while, theDownload CSV ExportorDownload HDF5 Exportbutton will appear.

- The legend shows in which color the parameters are displayed in the graph. You can remove a parameter from the graph by clicking on the colored square next to it. By clicking the colored square again, you can reverse that.
- Zoom in to a specific section in the graph by marking that section with your mouse (click-and-drag)
- The grey marked section in the smaller graph below shows you which part of the overall graph you are currently viewing. You can navigate the graph an zoom back out by selecting a different section with your mouse (click-and-drag)
Note
If multiple data templates are selected, you will see two rows of refresh buttons corresponding to each data template. The graphs related to both data templates will be overlaid in the same graphic as depicted below.
Visualize data in the Data Explorer
Export device data¶
Note
This feature is currently only available on instances running the new Device Hub architecture. If you would like to know more, please contact Leitwert support.
- You can only download the data for one device at the time.
- The time frame is limited to 100 days by default to prevent overly long waiting times and protect server resources.
- The download file will stay available for download for 1 day.
The most efficient way to export device data is via the Device Hub API. You can find example Python scripts here.
If you would like to export data without requiring any programming know-how, you can use the data export form available in the Study application (see picture below).

Data export form
- Enter the
Device UUIDof the device, with which the data you would like to export was measured. You can copy theDevice UUIDof a device with the corresponding button in theSource Devicelist.
- Enter the
Stream IDfor the data you would like to export. TheStream IDis defined by the device's communication protocol. If you don't know the stream ID's of your devices, please contact Leitwert support. - Enter the start time from when you would like to export the data.
- Enter the end time until when you would like to export the data. By default, the maximum time frame allowed for export is 100 days.
- Click the
Start Exportbutton. The application will start to build the CSV file with your requested data and display "Export in progress".
- While the export is in progress, you can leave the
Data Exportpage and come back later. Wait until the display shows "Export ready".
- Once available, click the
Downloadbutton to download your CSV file. If your browser was not yet authorized to access the data API, it will ask you for authentication. If you do not know the password for API authentication, please contact Leitwert support.
- After authentication, the CSV file will be downloaded by your browser.