Skip to main content

Python library for communication with BMR HC64 Heating Controller units

Project description

bmr-hc64-client

Python library for communication with BMR HC64 Heating Controller units.

This is a fork of slesinger/pybmr

Features

  • List, read and save heating circuits
  • HDO reading
  • List, read and set shutter blinds (experimental)

Product website:

Install:

python3 -m pip install bmr-hc64-client

Usage examples

Create connection

from bmr_hc64_client import Bmr

bmr = Bmr("http://192.168.1.5/", "username, "password")

Circuits

Get number of circuits:

numCircuits = bmr.getNumCircuits()

Load circuit status:

circuit = bmr.getCircuit(0)
print(f"Circuit {circuit['name']}: temperature is {circuit['temperature']} °C, target temperature is {circuit['target_temperature']} °C")

Load circuit schedules (what schedule is assigned to what day). It is possible to assign a different schedule for up to 21 days.

circuit_schedules = bmr.getCircuitSchedules(0)
print(f"Circuit 0 schedule for the first day is {circuit_schedules['day_schedules'][0]}")

Save circuit schedules:

bmr.setCircuitSchedules(0, [0, 8])

Schedules

Load schedules:

schedules = bmr.getSchedules()
print(schedule[0])  # Print the name of first schedule

Get schedule details:

schedule = bmr.getSchedule(0)
print(f"Schedule {schedule['name']} has timetable {schedule['timetable']}")

Save schedule:

bmr.setSchedule(0, "New schedule name", [("00:00", 21), ("06:00", 23), ("21:00", 21)])

Delete schedule:

bmr.deleteSchedule(0)

Summer mode

Get summer mode:

if bmr.getSummerMode():
    print("Summer mode is ON")
else:
    print("Summer mode is OFF")

Set summer mode:

bmr.setSummerMode(True):

Load summer mode assignments (which circuits will be affected by turning the summer mode on):

assignments = bmr.getSummerModeAssignments()
for circuit_id, value in enumerate(assignments):
    if value:
        print(f"Circuit {circuit_id} is assigned to summer mode.")
    else:
        print(f"Circuit {circuit_id} is NOT assigned to summer mode.")

Add circuits to summer mode:

bmr.setSummerModeAssignments([0, 1, 2], True)

Remove circuits from summer mode:

bmr.setSummerModeAssignments([0, 1, 2], False)

Low mode

Get low mode:

low_mode = bmr.getLowMode()
if low_mode['enabled']:
  print(f"Low mode is turned ON since {low_mode['start_date']}, target temperature is {low_mode['temperature']}")
  if low_mode['end_date']:
    print(f"It will be turned off automatically on {low_mode['end_date']}")

Turn the low mode ON, set temperature to 18°C:

bmr.setLowMode(True, 18)

Turn the low mode ON and let it turn OFF automatically after 3 days:

bmr.setLowMode(True, 18, datetime.now(), datetime.now() + timedelta(days=3))

Turn the low mode OFF:

bmr.setLowMode(False)

Load low mode assignments (which circuits will be affected by turning the low mode on):

assignments = bmr.getLowModeAssignments()
for circuit_id, value in enumerate(assignments):
    if value:
        print(f"Circuit {circuit_id} is assigned to low mode.")
    else:
        print(f"Circuit {circuit_id} is NOT assigned to low mode.")

Add circuits to low mode:

bmr.setLowModeAssignments([0, 1, 2, 6, 7, 8], True)

Remove circuits from low mode:

bmr.setLowModeAssignments([0, 1, 2, 6, 7, 8], False)

HDO

Load HDO status:

hdo = bmr.getHDO()
if hdo:
  print("HDO is currently ON")
else:
  print("HDO is currently OFF")

Backup of BMR Controler Unit Configuration

There is a CLI tool that can be used to backup configuration of actual BMR Controler Unit. It can be used in automations or just as a remote management tool. For more information refer to https://github.com/dankeder/bmrcli

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bmr_hc64_client-0.1.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bmr_hc64_client-0.1.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file bmr_hc64_client-0.1.1.tar.gz.

File metadata

  • Download URL: bmr_hc64_client-0.1.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bmr_hc64_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 945345367bb13d888b482e5ab7fee2657db0baaacf70ddb9eedd698cacf425c5
MD5 ebc90c516fc85fe2df16ddfcaa6a0ec0
BLAKE2b-256 c44bd3a1dd1e1046c534391ae0ae12a7304bf3faf2b4bd73ce86d3e7d045c4a1

See more details on using hashes here.

File details

Details for the file bmr_hc64_client-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bmr_hc64_client-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bmr_hc64_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa54142c05d3a5a4eaace87963ff6873ecb4f328cb526c1170ecaf51b45c4da6
MD5 9642e58ad7e9228646fbc7cb1f0b5ba8
BLAKE2b-256 1398c38b14115d583bfe31f3e5cad2b0a19e892b482a7e6feb90448bee54ab23

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page