Skip to main content

Visonic Alarm Panel Library using asyncio

An asyncio interface to Visonic PowerMax and PowerMaster alarm panels, including PowerMax+, PowerMaxExpress, PowerMaxPro, PowerMaxComplete, PowerMaster 10 and PowerMaster 30. Python 3.14 or newer is required.

This library does not make any physical / transport connections to a device or panel. This library is a protocol, you make the connection to the panel and the library:

  • Is given the received serial data from the panel
  • Provides the serial data to send to the panel

A PowerLink device is not required; do not use this library with PowerLink hardware. See the hardware and configuration wiki.

Installation

python -m pip install pyvisonic

Version 4 migration

Version 4 packages the updated protocol implementation as a pyvisonic package. The previous standalone modules (pyconst, pyenum, pyeprom, pyhelper, and pyvisonic.py) are replaced by the modules in the new package. Update imports, for example:

from pyvisonic.py_visonic import VisonicProtocol
from pyvisonic.py_abstract_classes import AlPanelInterface
from pyvisonic.py_enum import AlPanelCommand, AlPanelMode

Connection setup and protocol callbacks are demonstrated in the included examples. Review these when migrating an application from version 3.

Examples

Install the optional dependencies for the command line examples, Textual interface, and serial bridge:

python3.14 -m pip install -e '.[examples]'

Run the examples as modules so their relative imports resolve:

python -m pyvisonic.examples.simple_example -address 192.168.0.7 -port 11124
python -m pyvisonic.examples.complete_example -address 192.168.0.7 -port 11124
python -m pyvisonic.examples.simple_example -usb /dev/ttyUSB0 -baud 9600

Use --help to see the available options. The common connection adapter is in pyvisonic.examples.example_common. The library itself depends on Pillow; serial and user interface dependencies are provided by the examples extra.

Build a release

From this directory:

python -m pip install build twine
python -m build
PYVISONIC_VERSION=$(sed -n 's/^__version__ = "\(.*\)"/\1/p' src/pyvisonic/__init__.py)
python -m twine check dist/pyvisonic-${PYVISONIC_VERSION}-*

Install and test the wheel before publishing. To upload only this release:

python -m twine upload dist/pyvisonic-${PYVISONIC_VERSION}-*

Tests

From this directory, install the package and test/example dependencies in a virtual environment, then run pytest:

python -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[test,examples]'
python -m pytest

The tests use fixed checksum vectors (including a captured F4 acknowledgement), synthetic control packets, and fragmented or corrupted byte streams. They verify state updates, expected responses, and shutdown without opening a connection to a panel. The distribution tests build a source archive, build its wheel, validate both with Twine, install the wheel into a temporary directory, and check imports and example --help commands outside the source directory. Build and installation checks run without network access after the test dependencies are installed.

These are initial regression tests; they do not verify live panel behaviour or all message types. Add anonymised captures and expected decoded state when fixing protocol bugs. The receive API is synchronous, so these tests use a local event loop without starting background connection tasks.

Metadata

Release files for pyvisonic 4.0.2

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

Source distribution (sdist)

Source distribution for pyvisonic 4.0.2
File Size Uploaded Provenance Actions
pyvisonic-4.0.2.tar.gz 167.9 kB Without provenance Details for pyvisonic-4.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 347.2 kB

Release files / pyvisonic-4.0.2.tar.gz

Download URL pyvisonic-4.0.2.tar.gz
Size 167.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0c8c3f6411c5cb8cb34a135d4cf4f9b03e86c57394f5cc08519238c1f2aaa756
BLAKE2b-256 checksum
How to use checksums
e6063d131094ab8f3fac3584ec51e1de762bcab4f7a263a55debe7bdc22f314c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / pyvisonic-4.0.2-py3-none-any.whl

Download URL pyvisonic-4.0.2-py3-none-any.whl
Size 179.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a780d7f2ee35b87a69d49c61303f283e897fb1ee15f789694eda34b99225b1e
BLAKE2b-256 checksum
How to use checksums
e835ca42336b67e2b090b12b94d4ae1f42fb4a49336588d3ff086249ec15a971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for pyvisonic 4.0.2

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.

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