Skip to main content

A Python library for Taiwan Smart Energy Industry Association (TaiSEIA) protocol.

Project description

https://travis-ci.com/slee124565/twseia.svg?branch=main https://coveralls.io/repos/github/slee124565/twseia/badge.svg?branch=main https://img.shields.io/hexpm/l/plug.svg

A Taiwan Smart Energy Industry Association (TaiSEIA) Protocol Python Library.

Example

Read POWER state from TaiSEIA device:

import twseia
sa = twseia.SmartApplication()
service_id = 0
r = sa.read_state(service_id)

Write POWER command to TaiSEIA device:

import twseia
sa = twseia.SmartApplication()
service_id = 0
POWER_ON = 1
r = sa.write_state(service_id, POWER_ON)
print(r.to_json())

Web resources

Features

TWSEIA is an easy-to-use Python module for talking to instruments (slaves) from a computer (master) using the TaiSEIA protocol, and is intended to be running on the master. The only dependence is the pySerial module (also pure Python).

There are convenience functions to handle floats, strings and long integers (in different byte orders).

It is open source, and has the Apache License, Version 2.0.

Tested with Python 3.8 and 3.9.

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

twseia-0.0.2.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

twseia-0.0.2-py2.py3-none-any.whl (15.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file twseia-0.0.2.tar.gz.

File metadata

  • Download URL: twseia-0.0.2.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for twseia-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f13938fb4d1ec9ce515bd30d3b26b799662ce1db392196180f05612b5a508a31
MD5 5924de1a6989307f767f2d405cd6143a
BLAKE2b-256 f5a088efac4a0e762b7da3eb3283528f086e8d0fb3b347c4cc80e2c4eb618d63

See more details on using hashes here.

File details

Details for the file twseia-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: twseia-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for twseia-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 48ad5ca82aba12f0f672be98d122196cb4073db29d3305afaced6294b14a910b
MD5 b2fb058ea71f51d6f48599c15ea33f3b
BLAKE2b-256 4620465ed783b31fe00e2f725e47aa8dfd927ac98a421d07a15097ef55c1cb92

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