Skip to main content

RealTime OpenControl

Project description

RealTime OpenControl (RTOC)

| Documentation Status | Builds 3.0v | PyPI pyversions | PyPI version fury.io | PyPI license | GitHub release | Github all releases |

Version 3.0

Usecase Documentation

New in version 3.0

  • Introducing the Android App with full RTOC remote control
  • Websocket-API
  • TCP is deprecated and removed from GUI. Use websockets instead.
  • New Plugin Functions:
    • self.warning(), self.info(), self.error(), self.debug() # Log available in the Android-App
    • Persistent Variables: Variables are stored in a file and automatically loaded and saved
    • Doc-Strings for functions and Plugin-class are displayed in Android-App. Doc-Strings for Parameters need to be defined seperate: self.__doc_PARAMETER__
  • Webserver has been removed, because the Android App provides a better interface and could also run as a WebApp on any device. But I only published the App, If you need a WebApp, contact me.
  • Several bugfixes

RealTime OpenControl is a simple way for real-time data recording, visualization and editing.

RTOC is made for communication with different devices (IoT) in a network or local sensors or devices providing data. It collects Data from any source and provides easy and intuitive user interaction. The simplest way is, to run RTOC with the user-frontend. But it can also run a HTML-Server providing plots and events. This is the best way to view the data, if RTOC is running on screen-less devices, like a Raspberry Pi. And in any other case, you can get full access and control of RTOC with a simple Telegram-Bot all over the world, without many configurations. This bot is also capable of sending messages or warnings, if events are triggered. Read more about Events later on.

There are different ways to access data on an RTOC-Server:

  • NEW: With WebApp / Android App
  • From GUI (PyQT5) (full access)
  • From another RTOC-Server with Websockets (partial access)
  • From any device with a Telegram-Bot (full access)
  • From any device with PostgreSQL-Database (only access to data, no controlling of RTOC)

Possible applications

  • Endlessly customizable home automation
  • General long time data recording and automation due to postgreSQL integration
  • Central measurement data recording of laboratory instruments with PC connection (e.g. power supply unit, multimeter, sensors, microcontroller)
  • Central recording of measurement data from Internet devices (e.g. mobile weather stations, drones, smartphones)
  • Remote monitoring and control of processes and devices with PC and Smartphone (Telegram) (e.g. 3D printing, heating, Custom-SmartHome)
  • Controlling between several devices (e.g.: power regulation of a power supply unit on the temperature sensor of a multimeter)
  • Decentralized data recording (e.g. on Raspberry) and access via network connection (smart projects)
  • Fun projects like controlling a LED with Telegram

Recording data and events

Basis for a RTOC-Server are plugins, which collect data in any way and provide their functions and parameters. These plugins are represented by simple python-plugins, which can be downloaded from the RTOC-plugin-repository for specific devices. You can also write your own plugins for it. If you want to publish your plugin in my repository, just send me a message.

Every plugin can send measurements and events to the RTOC-Server.

A measurement represents the collected data. Events occur in certain conditions (for example if a measured value is higher than a limit value) and can trigger actions, which will be performed after the event. Also these events can be used to trigger PushNotifications in Telegram.

Getting Started

RTOC is written in Python 3. Tested on Windows and Linux.

Python3 (and pip3) need to be installed on the System. But you can also download the Stand-Alone-Builts for Windows and Linux below. RTOC can be installed and used in different ways:

  • Installation and use with PostgreSQL-Server (recommended for embedded)
  • Installation without PostgreSQL-Database (recommended for simple-usage)
  • Installation with builds (Linux/Windows)
  • Installation from source

Click here for a complete setup-tutorial

Write simple Python-Plugin

Python plugins are integrated into RTOC and can be used to

  • send data as stream(=append) or plot(=replace) to RTOC
  • send events

Plugins can not access all measurements. This can be done with a websocket connection to RTOC.

Example-Plugins here.

Documentation

Read the Wiki for full documentation

Default/Example Plugins:

  • function generator: generates sine, square, sawtooth, random, AC, DC

You can get more plugins from the RTOC-plugin-repository. Simply follow the steps described in the documentation:

  • System: For recording many system variables (CPU, Memory, Network,...)
  • Octoprint: Recording of 3D printers
  • DPS5020: power supply unit recording and control (possibly also DPS5005, ...)
  • HoldPeak VC820: Multimeter Measurement Recording (also other VC820)
  • ...

No GUI

In some cases you don't want to run the GUI (e.g. raspberry). Then you can still configure RTOC in a terminal: python3 -m RTOC.RTLogger -c

If you just want to run the Websocket-Server after configuration, you can do this with python3 -m RTOC.RTLogger. The best way, to run this code on embedded devices, is, to setup a systemd-service for automated startup. But you can also run/stop RTOC in background with 'python3 -m RTOC.RTLogger -s start/stop'.

If you want to start the HTML server on port 8050, you need to run it with 'python3 -m RTOC.RTLogger -w'.

GUI

Übersicht

Complete GUI-tutorial here.

Simple local Websocket-Server

Websocket clients can establish a connection to the RTOC server on the same computer or in the network (check firewall settings). With the necessary port shares on the router and dynamic DNS, the RTOC server can also be accessed from the Internet.

Websocket communication-protocoll is in JSON format, which allows communication in all programming languages and also, for example, with an ESP8266/ESP32 microcontroller. The communication can also be end-to-end-encrypted with AES. In this case, you need to implement the right encryption yourself.

A client can

  • send data as stream(=append) or plot(=replace) to RTOC
  • send events
  • access all measurement data and events of the RTOC-server
  • access all RTOC-server functions
  • access all RTOC-server plugin functions and parameters
  • subscribe to signals

The server will

  • send events to the clients
  • send subscribed signals to clients

Example for Websockets here.

Include Telegram-messanger

Tutorial for Telegram here.

Built With

External libraries and scripts

All icons used in this software (including plugins) are kindly provided by Icons8

Contributing

Please read CONTRIBUTING.md for details on my code of conduct, and the process for submitting pull requests to me.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details

Coffee

Feel free to buy me some coffee with milk

Project details


Release history Release notifications | RSS feed

This version

3.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for RTOC, version 3.0
Filename, size File type Python version Upload date Hashes
Filename, size RTOC-3.0-py3-none-any.whl (980.9 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page