Skip to main content

pyv6m Package

Package to control a V6M ethernet relay boards using Python. I can't read Chinese on the controller, but the unit operates nicely and can be configured using HTTP and controlled on port 1234. It theoretically supports MQTT protocol, but I haven't received that documentation yet.

The underlying command structure sent to the board is simple. The following example would turn on relay 1, and turn off relay 3. The remaining relays are left unchanged: setr=1x0xxxxxx

The board supports other controls:

  • '0' - off
  • '1' - on
  • '2' - pulse (on, delay, off)
  • '3' - toggle
  • '4' - group 2 relays adjacent relays. On if '4x', off if 'x4'.

This package only supports turning relays on and off through the V6M.set_relay method.

The board also supports 8 inputs. As a default from the factory, the inputs directly control the relays. This can be disabled through the web interface. The state of the inputs can be read using the V6M.get_sensor interface, or by setting the sensor_callback.

The board will not send immediate feedback when input levels changed, so the board is polled every second.

Example:

from time import sleep
from pyv6m import V6M

hub = V6M( 'host.test.com', 1234 )

# Turn the first relay on
hub.set_relay( 0, True )

# Pause for a second
sleep(1.)

# Turn the first relay off
hub.set_relay( 0, False )

# Close the interface
hub.close()

Metadata

Release files for pyv6m 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyv6m 0.0.1
File Size Uploaded Provenance Actions
pyv6m-0.0.1.tar.gz 3.5 kB Without provenance Details for pyv6m-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyv6m 0.0.1
File Interpreter ABI Platform Actions
pyv6m-0.0.1-py3-none-any.whl Python 3 none any Details for pyv6m-0.0.1-py3-none-any.whl

Total release size: 11.5 kB

Release files / pyv6m-0.0.1.tar.gz

Download URL pyv6m-0.0.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5f0b18e358a55d7687b48647a00c9f7c954b90d42fde6de8a95eae9c57c29e07
BLAKE2b-256 checksum
How to use checksums
bcafc9f316b153670c58e52d23d0e8f42d25531b14430c3613d28be9b7803a6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

Release files / pyv6m-0.0.1-py3-none-any.whl

Download URL pyv6m-0.0.1-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59829d18845cfd941f374eca63eed26c105e12c89dbbb352b7e5f0555f906e3a
BLAKE2b-256 checksum
How to use checksums
efdb0139703e56202bf28a1f7a9889101454f26fd7f77d12c8d147fee106b7c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

Security for pyv6m 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page