Skip to main content

TecoRoute server and EPSNET connector.

Project description

TecoRoute

The TecoRoute package provides software components for better usability of the TecoRoute service from Teco a.s. It consists of TecoRoute server and EPSNET connector.

For the proxy server, which automatically authenticates the user to the TecoRoute web interface, see TecoRoute Proxy.

Components

TecoRoute server

With the SetPlcIp utility, it is possible to set the address of TecoRoute server for the PLC, so there is no restriction to using Teco's TecoRoute service, but it is possible to have a private server.

The TecoRoute server is not fully opensourced yet. Please contact Czetech at hello@cze.tech for this component first.

TecoRoute EPSNET connector

The TecoRoute connector provides various types of EPSNET access to the PLC via the TecoRoute service. By default, the connector is authenticated as Teco's Mosaic, so on the portal this application must be enabled for the user.

Command-line interface

The basic functionality of the components can be invoked from the command-line. Currently, there is only one mode of operation, which is the UDP connector.

Connector

Connector locally opens UPD port 61682, which can be accessed in the same way as the PLC in a local network (e.g. communicate using EPSNET or connect to Mosaic). Example:

tecoroute connector \
  --mode udp \
  --username BroukPytlik \
  --password ferda1 \
  --plc AB_1234

The program terminates in case of any error (for example, temporary loss of connection), so it is up to the user to start the program again.

For all options, run tecoroute connector --help.

Library API

Thanks to the library's asynchronous design, it is possible to operate thousands of connections at the same time very efficiently.

As in the command-line example, in Python the UDP connector starts with the code:

from asyncio import run
from logging import INFO, basicConfig

from tecoroute.connector import UdpConnector

basicConfig(level=INFO)


async def main():
    connector = UdpConnector(username='BroukPytlik', password='ferda1',
                             plc='AB_1234')
    await connector.run()


run(main())

There is an example of the implementation of simultaneously running connectors according to the data from the MariaDB table at https://github.com/czetech/tecoroute-manager.

See full documentation at https://tecoroute.readthedocs.io.

Installing

Install from PyPI

Requirements:

  • Python (version 3.8 or later)
  • pip or another package installer for Python

Installation using pip is done with:

pip install tecoroute

Run from Docker Hub

Run the image from Docker Hub:

docker run czetech/tecoroute

Support

Professional support by Czetech is available at hello@cze.tech.

Source code

The source code is available at https://github.com/czetech/tecoroute.

Project details


Download files

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

Source Distribution

tecoroute-0.1.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

tecoroute-0.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file tecoroute-0.1.0.tar.gz.

File metadata

  • Download URL: tecoroute-0.1.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1

File hashes

Hashes for tecoroute-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e041ebacc5428f82bca6b8490d7c0db5ff165de0ca20bd1d6300205fa6f39f5b
MD5 628b118e7c192eeeb158918d0c093190
BLAKE2b-256 e09df75487aef581f7c1ee5341da81f0e1eb612b240e8e56451a2397ef0eefff

See more details on using hashes here.

File details

Details for the file tecoroute-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tecoroute-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1

File hashes

Hashes for tecoroute-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e67ad530a267500221da1ef3fadbb3be0251e166d5abd2d7817f50acf53186b4
MD5 a59b20f68d37c17d87469a37749ef2f7
BLAKE2b-256 7043edd2022d58764e8394ec4e9944e172aa4b5495d80992392cdbefb463dd05

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page