Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance support for Vasco and ClimaRad HRUs #133

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/ramses_rf/binding_fsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ class Vendor(StrEnum):
ITHO = "itho"
NUAIRE = "nuaire"
ORCON = "orcon"
CLIMARAD = "climarad"
VASCO = "vasco"
DEFAULT = "default"
silverailscolo marked this conversation as resolved.
Show resolved Hide resolved


Expand Down Expand Up @@ -142,6 +144,8 @@ class BindRole(StrEnum):
Vendor.ITHO: {"oem_code": "01"},
Vendor.NUAIRE: {"oem_code": "6C"},
Vendor.ORCON: {"oem_code": "67", "offer_to": ALL_DEVICE_ID},
Vendor.CLIMARAD: {"oem_code": "65"},
Vendor.VASCO: {"oem_code": "66"},
Vendor.DEFAULT: {"oem_code": None},
silverailscolo marked this conversation as resolved.
Show resolved Hide resolved
}

Expand Down Expand Up @@ -627,7 +631,7 @@ def rcvd_msg(self, msg: Message) -> None:
class _DevSendCmdUntilReply(_DevIsWaitingForMsg, _DevIsReadyToSendCmd):
"""Device sends a Command (Offer, Accept), until it gets the expected reply Packet.

Failure occurs when the the timer expires (timeout) or the retry limit is exceeded
Failure occurs when the timer expires (timeout) or the retry limit is exceeded
silverailscolo marked this conversation as resolved.
Show resolved Hide resolved
before receiving a reply Packet.
"""

Expand Down
2 changes: 1 addition & 1 deletion src/ramses_rf/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def renamed_key(node_value: Any) -> None:
#
# 3/5: Global Schema for Heat/HVAC systems
SCH_GLOBAL_SCHEMAS_DICT = { # System schemas - can be 0-many Heat/HVAC schemas
# orphans are devices to create that wont be in a (cached) schema...
# orphans are devices to create that won't be in a (cached) schema...
vol.Optional(SZ_MAIN_TCS): vol.Any(None, SCH_DEVICE_ID_CTL),
vol.Optional(vol.Remove("main_controller")): vol.Any(None, SCH_DEVICE_ID_CTL),
vol.Optional(SCH_DEVICE_ID_CTL): vol.Any(SCH_TCS, SCH_VCS),
Expand Down
2 changes: 1 addition & 1 deletion src/ramses_tx/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
return f"... {self}{comment}"

def __str__(self) -> str:
"""Return an brief readable string representation of this object."""
"""Return a brief readable string representation of this object."""
# e.g.: 000A|RQ|01:145038|08
return super().__repr__() # TODO: self._hdr

Expand Down Expand Up @@ -687,8 +687,8 @@

zon_idx = _check_idx(zone_idx)

kwargs.get("unknown_20", None) # HVAC

Check failure on line 690 in src/ramses_tx/command.py

View workflow job for this annotation

GitHub Actions / lint (3.12)

Ruff (SIM910)

src/ramses_tx/command.py:690:9: SIM910 Use `kwargs.get("unknown_20")` instead of `kwargs.get("unknown_20", None)`
kwargs.get("unknown_21", None) # HVAC

Check failure on line 691 in src/ramses_tx/command.py

View workflow job for this annotation

GitHub Actions / lint (3.12)

Ruff (SIM910)

src/ramses_tx/command.py:691:9: SIM910 Use `kwargs.get("unknown_21")` instead of `kwargs.get("unknown_21", None)`

if not (0 <= max_flow_setpoint <= 99):
raise exc.CommandInvalid(
Expand Down
10 changes: 7 additions & 3 deletions src/ramses_tx/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"0001001B371B01FEFF": ("FAN", "37", "2019-08-29", "CVE-RF"), # . 31D9, 31DA
"0001001B381B01FEFF": ("FAN", "37", "2020-02-14", "CVE-RF"), # . 31D9, 31DA (and I|042F, I|3120)
"0001001B391B01FEFF": ("FAN", "37", "2021-11-04", "CVE-RF"),
"0001C8830C0A65FEFF": ("FAN", "37", "2020-12-17'", "VMD-07RPS13"), # . ClimaRad Ventura
"0001C81C090466FEFF": ("FAN", "29", "0000-00-00", "VMC-17RP01"), # . appears to be an EXT
"0001C8260A0367FFFF": ("FAN", "29", "0000-00-00", "VMC-15RP01"),
"0001C8260D0467FFFF": ("FAN", "29", "0000-00-00", "VMC-15RP01"), # . 31D9
Expand All @@ -59,7 +60,7 @@
"00010028080101FEFF": ("CO2", "37", "2019-04-29", "VMS-12C39"), # . 1298, 31E0, 2E10, 3120, and I|22F1!
"00010028090101FEFF": ("CO2", "37", "2021-01-20", "VMS-12C39"), # . 1298, 31E0, 2E10, 3120 (and I|042F)
"0001C822030166FEFF": ("CO2", "29", "2015-05-07", "VMS-17C01"), # . 1298, 31E0
"0001C822060166FEFF": ("CO2", "37", "2016-12-22", "VMS-17C01"), # . 1298, 31E0
"0001C822060166FEFF": ("CO2", "37", "2016-12-22", "VMS-17C01"), # . 1298, 31E0 (Vasco RF includes REM buttons TODO)
"0001C8500B0167FEFF": ("CO2", "29", "2017-03-09", "VMS-15C16"), # . CO2 sensor (no remote)
"0001C85701016CFFFF": ("CO2", "32", "2016-06-17", "VMS-23C33"), # . 1298, 31E0 (and I|042F)
# HUM
Expand All @@ -70,6 +71,7 @@
"0001C827050167FFFF": ("REM", "29", "0000-00-00", "VMN-15LF01"), # . 22F1, 22F3
"0001C827070167FFFF": ("REM", "29", "0000-00-00", "VMN-15LF01"), # . 22F1, 22F3
"0001C827090167FFFF": ("REM", "29", "2019-02-13", "VMN-15LF01"), # . 22F1, 22F3 (and I|042F)
"0001C8400F0166FFFF": ("REM", "29", "2021-11-01", "VMN-17LMP01"), # . Vasco remote 4-way
"0001C85901016CFFFF": ("REM", "32", "2016-05-31", "VMN-23LMH23"), # . zxdavb 22F1, 1060, 4-way?
"0001C85A01016CFFFF": ("REM", "32", "2016-06-01", "VMN-23LMH23"), # . zxdavb 22F1, 1060, 4-way?
# REM (display, or with CO2 sensor)
Expand Down Expand Up @@ -118,7 +120,7 @@ def check_signature(dev_type: str, signature: str) -> None:
# VMD - Heat recovery unit
# VMC - Mechanical extraction: To integrate in a single fan system
# VMI - User interface with display
# VMN -
# VMN - Remote
# VMS - Sensors platform: CO2, humidity and temperature (and PIR?)

# BRDG-02A55 - Fan of some description
Expand All @@ -133,6 +135,7 @@ def check_signature(dev_type: str, signature: str) -> None:
# VMC-15RP01 - Orcon unit (senseair.com)
# VMC-17RP01 - Vasco C400RF (fan)

# VMD-07RPS13 - FAN - ClimaRad VenturaV1x
# VMD-15RMS64 - FAN - Orcon HRC-350 (Ventiline) / Orcon MVS 15RHB
# VMD-15RMS86 -
# VMD-17RPS01 -
Expand All @@ -141,6 +144,7 @@ def check_signature(dev_type: str, signature: str) -> None:
# VMI-15MC01 - REM - Orcon 15RF with integrated CO2

# VMN-15LF01 - REM - Orcon 15RF 6 button remote
# VMN-17LMP01 - REM - Vasco 4 button remote (NL 2021)
# VMN-23LM33 - REM?
# VMN-23LMH23 - REM - 4 button RF Switch

Expand All @@ -149,7 +153,7 @@ def check_signature(dev_type: str, signature: str) -> None:
# VMS-15C16 - CO2 - CO2 Sensor (no remote)
# VMS-12C39 - CO2 - CO2 Sensor, incl. integrated control, PIR?
# VMS-15CM17 - CO2 - CO2 Sensor
# VMS-17C01 -
# VMS-17C01 - CO2 - CO2 Sensor, incl. integrated control Vasco
# VMS-17HB01 -
# VMS-23C33 - CO2 - CO2 Sensor (no PIR) (e.g. Nuaire DRI-ECO-CO2)
# VMS-23HB33 - HUM - RH/Temp Sensor (e.g. Nuaire DRI-ECO-RH)
Expand Down
14 changes: 7 additions & 7 deletions src/ramses_tx/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def dt_now() -> dt:


def dt_str() -> str:
"""Return the current datetime as a isoformat string."""
"""Return the current datetime as an isoformat string."""
return dt_now().isoformat(timespec="microseconds")


Expand Down Expand Up @@ -307,15 +307,15 @@ def hex_to_flag8(byte: HexByte, lsb: bool = False) -> list[int]: # TODO: use tu


def hex_from_flag8(flags: Iterable[int], lsb: bool = False) -> HexByte:
"""Convert list of 8 bits, MSB bit 1 by default, to an two-char ASCII hex string.
"""Convert list of 8 bits, MSB bit 1 by default, to a two-char ASCII hex string.

The `lsb` boolean is used so that flag[0] is `zone_idx["00"]`, etc.
"""
if not isinstance(flags, list) or len(flags) != 8:
raise ValueError(f"Invalid value: '{flags}', is not a list of 8 bits")
if lsb: # LSB is first bit
return f"{sum(x<<idx for idx, x in enumerate(flags)):02X}"
return f"{sum(x<<idx for idx, x in enumerate(reversed(flags))):02X}"
return f"{sum(x << idx for idx, x in enumerate(flags)):02X}"
return f"{sum(x << idx for idx, x in enumerate(reversed(flags))):02X}"


# TODO: add a wrapper for EF, & 0xF0
Expand Down Expand Up @@ -368,7 +368,7 @@ def hex_from_str(value: str) -> str:


def hex_to_temp(value: HexStr4) -> bool | float | None: # TODO: remove bool
"""Convert a 2's complement 4-byte hex string to an float."""
"""Convert a 2's complement 4-byte hex string to a float."""
if not isinstance(value, str) or len(value) != 4:
raise ValueError(f"Invalid value: {value}, is not a 4-char hex string")
if value == "31FF": # means: N/A (== 127.99, 2s complement), signed?
Expand Down Expand Up @@ -410,7 +410,7 @@ def parse_fault_log_entry(

# NOTE: the log_idx will increment as the entry moves down the log, hence '_log_idx'

# these are only only useful for I_, and not RP
# these are only useful for I_, not RP
if (timestamp := hex_to_dts(payload[18:30])) is None:
return {f"_{SZ_LOG_IDX}": payload[4:6]} # type: ignore[misc,return-value]

Expand Down Expand Up @@ -506,7 +506,7 @@ def parse_air_quality(value: HexStr4) -> PayDictT.AIR_QUALITY:
assert value[2:] in ("10", "20", "40"), value[2:] # TODO: remove assert
basis = {
"10": "voc", # volatile compounds
"20": "co2", # carbdon dioxide
"20": "co2", # carbon dioxide
"40": "rel_humidity", # relative humidity
}.get(value[2:], f"unknown_{value[2:]}") # TODO: remove get/unknown

Expand Down
Loading
Loading