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.11.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.11.0
File Size Uploaded Provenance Actions
pyblnet-0.11.0.tar.gz 15.4 kB Without provenance Details for pyblnet-0.11.0.tar.gz

Built distribution (wheel)

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

Total release size: 31.9 kB

Release files / pyblnet-0.11.0.tar.gz

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

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

Download URL pyblnet-0.11.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d96eed01cb05c29b30c8aeeea080e1fa62a9b116ccf7cb5a05236c7b2ff65c2c
BLAKE2b-256 checksum
How to use checksums
38c91d41275c684cca4bde8d9c348da911652e1af081128b2682588fbe1e2c6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Security for PyBLNET 0.11.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.11.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