Skip to main content

PyBLNET - a very basic python BL-NET bridge

PyPI - Version PyPI - Python Version Build status Coverage Status

A package that connects to the BL-NET that is connected itself to a UVR1611 device by Technische Alternative. It is able to read digital and analog values as well as to set switches to ON/OFF/AUTO.

Documentation on the modules and their methods can be found with the methods and modules themselves.

Two interfaces to BLNet exist and both are supported:

  • Webinterface - Class BLnetWeb
  • BLNet-Direct protocol [1] - Class BLNETDirect

However, as of now, there is no testing on the BLNet-Direct protocol of any kind, so enabling it is discouraged until the interface is fixed. Parsing the data via the web interface is the preferred way of accessing the BLNet for now.

The class BLNET is a wrapper around the two classes. When initializing the class, the two interfaces can be activated/deactivated. BLNetDirect provides 'analog', 'digital', 'speed', 'energy', 'power', whereas BLnetWeb supports 'analog' and 'digital' only. If both are active, BLNetDirect has priority. Setting switches and reading their manual/auto state is only possible via the BLNetWeb interface.

Usage

from pyblnet import blnet_test, BLNET, BLNETWeb, BLNETDirect

ip = '192.168.178.10'

# Check if there is a blnet at given address
blnet_test(ip)  # -> True/False

# Convenient high level interface
blnet = BLNET(ip, password='pass', timeout=5)

# Control a switch by its ID
blnet.turn_on(10)
blnet.turn_auto(10)
blnet.turn_off(10)

# Fetch data (contains all available data using enabled interfaces)
print(blnet.fetch())

# The low level modules are also available
# note that the direct use of these modules is discouraged though

# Fetch the latest data via web interface
# Note that manual log in and log out are required
# when not using the with statement
with BLNETWeb(ip, password='pass', timeout=5) as blnet_session:
    print(blnet_session.read_analog_values())
    print(blnet_session.read_digital_values())

    # For publishing values
    blnet_session.set_digital_value('10', 'AUS')
    # Note that without explicit log out,
    # the BLNET will block any further web access for the next 150s
    # this is handled automatically when using the with statement

# Fetch data via the Protocol developed by TA
blnet = BLNETDirect(ip)
# Fetching the latest data
print(blnet.get_latest())
# Still inofficial because unexplicably failing often
print(blnet._get_data(1))

[1] Technische Alternative, "Schnittstelle Winsol <> Bootloader" (2006), archived copy: http://web.archive.org/web/20160122124754/http://www.haus-terra.at:80/heizung/download/Schnittstelle/Schnittstelle_PC_Bootloader.pdf

Metadata

Release files for PyBLNET 0.12.0

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

Source distribution (sdist)

Source distribution for PyBLNET 0.12.0
File Size Uploaded Provenance Actions
pyblnet-0.12.0.tar.gz 16.1 kB Without provenance Details for pyblnet-0.12.0.tar.gz

Built distribution (wheel)

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

Total release size: 33.3 kB

Release files / pyblnet-0.12.0.tar.gz

Download URL pyblnet-0.12.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cec706cb30f481945e027e71b56e8912a31b753ff5a963a89047decb76396c5f
BLAKE2b-256 checksum
How to use checksums
5fa1fbdddc149c2dcb5b8fa0eb5b67e3a687fab0e0d3ff2edd2593b360a0d23f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release files / pyblnet-0.12.0-py3-none-any.whl

Download URL pyblnet-0.12.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3a115d16f1d18926ab15e14195e8798be40964ce8085070b18dae53078713dd
BLAKE2b-256 checksum
How to use checksums
9dc1f42d9f57280843c68b68f879118dabd6811ce54f30fde1c65a19138c46f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Security for PyBLNET 0.12.0

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.12.0 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