Skip to main content

Set of tools for use with Tinycontrol devices like LK2.X, LK3.X, LK4.X or tcPDU.

Project description

tinyToolsLib

Set of tools for use with tinycontrol devices like LK2.X, LK3.X, LK4.X or tcPDU.

Features

Easy to use functions for common actions with tinycontrol devices:

  • Flashing firmware via TFTP (LK2.X, LK3.X).
  • Flashing firmware via HTTP (LK4, tcPDU).
  • Getting data from devices.
  • Sending commands to devices (for common tasks like controlling OUTs, PWMs, etc.).
  • Checking device version.

Usage

Discovering devices in network:

from tinytoolslib.discovery import run_discovery_all

devices = run_discovery_all()
for device in devices:
    print('{ip_address:20}{name:20}{mac_address:20}{family:10}{hardware_version:10}{software_version:15}'.format_map(device))

Flashing firmware:

from tinytoolslib.flash import get_latest_firmware, Flasher

success, data = get_latest_firmware(IP_ADDRESS, USERNAME, PASSWORD, DIRECTORY_FOR_FIRMWARE_FILES)
if success:
    flasher = Flasher()
    success = flasher.run(data['path'], IP_ADDRESS, USERNAME, PASSWORD)

Working with tinycontrol devices:

from tinytoolslib.models import get_version

version_info = get_version(IP_ADDRESS, with_device=True)
if version_info:
    device_model = version_info['device_model']
    # Get reading from device
    device_model.get_all()
    # Control outputs OUT
    device_model.set_out(1, 1)

File structure

  • constants.py - constants related to tinycontrol devices.
  • discovery.py - functions for discovering devices in network via UDP broadcast. Works for LK2.X, LK3.5 SW 1.26+, LK4.0, tcPDU.
  • exceptions.py - errors raised in this library.
  • flash.py - functions for updating the firmware of devices. Includes both method: TFTP and HTTP.
  • models.py - models for working with different device types.
  • parsers.py - functions for working with data formats used on LKs.
  • requests.py - base request functions.

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

tinytoolslib-0.2.5.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tinytoolslib-0.2.5-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file tinytoolslib-0.2.5.tar.gz.

File metadata

  • Download URL: tinytoolslib-0.2.5.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for tinytoolslib-0.2.5.tar.gz
Algorithm Hash digest
SHA256 6822d32d413c63de01094cd5c0994f7d8477bab63e4b1c3287cb6b952ed6aa6c
MD5 9845c47dba167df90b8a2f3675e8d9ca
BLAKE2b-256 6d9d928e12779df2a1e1bdf581aff2da24cb9db4b15ffbfd70ce5571626cc913

See more details on using hashes here.

File details

Details for the file tinytoolslib-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: tinytoolslib-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for tinytoolslib-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f9b70074c603761ccbcb6418619f1cff8952c777b485e9031a0230008a722a5b
MD5 ac7ed438a516b6f9106f1425f5a2bdef
BLAKE2b-256 bcc82560244a7e81c0f6b17aeca11acbbf646a92b370def9249367a9f5dd95b9

See more details on using hashes here.

Supported by

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