Skip to main content

PyBLNET - a very basic python BL-NET bridge

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] https://www.haus-terra.at/heizung/download/Schnittstelle/Schnittstelle_PC_Bootloader.pdf

Metadata

Release files for PyBLNET 0.10.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.10.0
File Size Uploaded
pyblnet-0.10.0.tar.gz 30.3 kB Details

Built distribution (wheel)

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

Total release size: 44.6 kB

Release files / pyblnet-0.10.0.tar.gz

Download URL pyblnet-0.10.0.tar.gz
Size 30.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bfb900f6123803a81a9c9c6297585d764b5123413ca0dff6ce113bcd0cd26299
BLAKE2b-256 checksum
How to use checksums
2892a1a6c4c9ab351d82c98caa033b40de9dc6da604b90b82ece5301c912f107
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

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

Download URL pyblnet-0.10.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4b11d3f2e620f71b51fa55025d7e83b4784ed2e80d6aca3117290a1f6b44c07
BLAKE2b-256 checksum
How to use checksums
92407fb8646bddc956f3c115cb347ba8e45514db985c3f28f4ca916becd58468
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

1 release file

0.7.2

1 release file

0.7.1

2 release files

0.7.0

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6

2 release files

0.5.1

2 release files

0.5

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4

2 release files

0.3.2

1 release file

0.3

1 release file

0.2

1 release file

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

1 release file

0.1.3

1 release file

0.1.2

2 release files

0.1.1

2 release files

0.1

3 release files

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