pypglab
About
An asynchronous Python library to communicate with PG LAB Electronics devices over MQTT.
This library was created for Home Assistant integrations of PG LAB Electronics.
Features
- Discover devices
- Control relays (turn on/off)
- Monitor relays status (on/off)
- Control shutters (open/close/pause)
- Monitor shutters status (open/opening/closed/closing)
- Receiving device internal sensor update
Devices supported
- E-BOARD
Coming soon
- E-SWITCH
Installation
pip install pypglab
Usage
The library has an helper class to simplify the discovery and the use of PG LAB Electronics devices. The helper class hide the complexity to setup the MQTT connection with the broker.
In this simple working example pyPgLab class does the connection with the MQTT broker, retrieve an E-BOARD device and turn ON all available relay outputs
from pypglab.helper import pyPgLab
def turn_relay(relay, on):
if on:
asyncio.run( relay.turn_on() )
else:
asyncio.run( relay.turn_off() )
time.sleep(0.02)
pglab = pyPgLab()
pglab.start("192.168.1.8")
pglab.connect()
e_board = pglab.get_device_by_name("E-BOARD-DD53AC85")
if e_board :
# turn all relay outputs ON
for relay in e_board.relays:
asyncio.run( relay.turn_on() )
pglab.stop()
For more example and proper setup of the MQTT connection and callback, see the example.py and the unittest of pypglab python library.
Feedback
Please give us feedback on support@pglab.dev
Founder
This plugin is created by PG Lab Electronics.
License
Code is released under [MIT license]
Metadata
Release files for pypglab 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pypglab-0.0.5.tar.gz | 11.4 kB | Without provenance | Details for pypglab-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pypglab-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for pypglab-0.0.5-py3-none-any.whl |
Total release size: 24.1 kB
Release files / pypglab-0.0.5.tar.gz
| Download URL | pypglab-0.0.5.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf7db4654d9a6367c8099c3db6c75002f40f15ed15dc43f1236a7d02a0c54a4b
|
|
BLAKE2b-256 checksum How to use checksums |
d320c63002471c34124f9d435ef69749557f76c6ed1fac9c1161cf0d87cd6c5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / pypglab-0.0.5-py3-none-any.whl
| Download URL | pypglab-0.0.5-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cead9a2134f46591082317553a74d72a8c85c027395778e63b76aae75e7c023
|
|
BLAKE2b-256 checksum How to use checksums |
9778eb3da67adf1caf3a88813a3fc0b715b60087a6a721470d75bb23591cc55a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for pypglab 0.0.5
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.