Library to communicate with relays
Project description
Pynumato
Pynumato allows to control relay modules (ON or OFF states).
This module is only compatible with the Numato series 1-2-4-8 Channels USB Solid State Relay Module, listed in the following link : <https://numato.com/?s=Channel+USB+Solid+State+Relay+Module>.
Requirement
The module requires the minimum configuration :
- Windows7 64-bits
- Linux 64-bits
- Python3.7
How to use it
The command line to drive relays are :
python3 -m pynumato.pynumato --cmd=<string to drive relays> --relays=<Number of relays> --port=<port> --baudrate=<baudrate>
Parameters are :
-
the number of relays to drive (default is 1)
-
the port (default is /dev/ttyUSB1)
-
the baudrate (default is 921600)
-
the command to drive relays
A relay can receive two types of orders (OFF or ON). The order in the module is encoding by an ASCII character such as :
"c" : close the relay (OFF state)
"o" : open the relay (ON state)
"x" : do not change the current state of the relay
In an example, if we have :
- 4 available relays : 0, 1, 2 and 3
- baudrate is 921600
- port is COM27
To turn on all relays, string command is oooo and the command line is :
python3 -m pynumato.pynumato --cmd="oooo" --relays=2 --port="COM27" --baudrate=921600
To turn off all relays, string command is cccc and the command line is :
python3 -m pynumato.pynumato --cmd="cccc" --relays=2 --port="COM27" --baudrate=921600
To turn on the relay 0, and it does not matter about other ones, string command is oxxx and the command line is :
python3 -m pynumato.pynumato --cmd="oxxx" --relays=2 --port="COM27" --baudrate=921600
To turn on the relays 1 and 3, and it does not matter about other ones, string command is xoxoand the command line is :
python3 -m pynumato.pynumato --cmd="xoxo" --relays=2 --port="COM27" --baudrate=921600
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pynumato-0.0.1.tar.gz.
File metadata
- Download URL: pynumato-0.0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44ea980814d236cadbe4bf7f5a859171a8a859e1950b10e80241b6dfabd7eabc
|
|
| MD5 |
60a73f66aa1b1b7acaa529f12feabc5a
|
|
| BLAKE2b-256 |
5513d1a800caf21739ec1b214cc5209aab2c661c096f3d18ea86c1e3b3be0519
|
File details
Details for the file pynumato-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pynumato-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2746c6fb96d512e8cf382a5d0d80efe6f1f559bf43c1429676596c8cc1ce86fa
|
|
| MD5 |
4cfc1e4102141d2f68147547fc064bf2
|
|
| BLAKE2b-256 |
56c261f566b0dce62761e0fe9c567b3eb41f57e7ace8e2835e6e23a45d58d77d
|