TSB Telemetry Server Backend

A gate to the IoT world for all my future projects. A tale about flask, https requests and websockets.

Features

  • Clients can send data to the server
  • Clients can place comands on the server which are relayed to other clients
  • Telemetry measurements are stored in SQLite, in separate tables for each user and signal
  • Clients can read data from the database
  • Supports multiple parallel connections
  • Fully encrypted SSL connection
  • Client authorization
  • Supports single action connection via https requests
  • Supports permanet connection via websockets
  • Compatible to UDL Universal Data Logger project

Main Components

  • Flask webserver behind nginx reverse proxy running on a Hetzner cloud server
  • SQLite database for telemetry measurements
  • Redis for control command buffers, WebSocket client state, request statistics and security tracking
  • SW available for ESP32 clients for https and websocket connection

Programming languages

  • Python
  • C
  • html
  • Kotlin

The ESP32 demo board connects to the TSB and sends data packages of 10 datapoints captured with a period of 100ms (one data package is send every 1000ms). The UDL tool is checking the TBS regularly for new data. Via the calibration labels in C1 misc the user can send data to the ESP32 changing the set point for the random number generation and also the period of the data packages.