PyBmr
Python library for communication with BMR HC64 Heating Controller units.
Features
- List, read and save heating circuits
- HDO reading
- List, read and set shutter blinds (experimental)
Product website:
Install:
python3 -m pip install pybmr
Usage examples
Create connection
from pybmr import pybmr
bmr = pybmr.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
Metadata
Release files for pybmr 0.7.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pybmr-0.7.13.tar.gz | 16.9 kB | Without provenance | Details for pybmr-0.7.13.tar.gz |
Release files / pybmr-0.7.13.tar.gz
| Download URL | pybmr-0.7.13.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4849c46f47c76c44c3d4e3f9c548ee93e2a48e439ea8f33bcd60b84b325e6a21
|
|
BLAKE2b-256 checksum How to use checksums |
a7402f89f2e761842d8e69467face25a8a0eb3c64b63cc0312669b4f3eaef3c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for pybmr 0.7.13
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.