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

Add gas_fault, air_fault, water_overtemp, lockout_reset, low_water_pressure. #8

Open
ananyevgv opened this issue Nov 15, 2022 · 2 comments

Comments

@ananyevgv
Copy link

OpenThermMessageID::ASFflags:
    flags = (response & 0xFFFF) >> 8;
    vars.service_required.value = flags & 0x01;
    vars.lockout_reset.value = flags & 0x02;
    vars.low_water_pressure.value = flags & 0x04;
    vars.gas_fault.value = flags & 0x08;
    vars.air_fault.value = flags & 0x10;
    vars.water_overtemp.value = flags & 0x20;
    vars.fault_code.value = response & 0xFF;

https://github.com/DRazumovskiy/Baxi-Luna3-Comfort-IN-HT-Solar-MQTT/blob/master/baxi-luna3-mqtt/OpenThermTask.ino

@ananyevgv
Copy link
Author

ananyevgv commented Nov 17, 2022

It turns out to add either a sensor or a binary sensor, the duplicate key error is not compiled in place.
sensor
"fault_code": SensorSchema({
"description": "Fault code",
"accuracy_decimals": 0,
"icon": "mdi:water-boiler-alert",
"state_class": STATE_CLASS_MEASUREMENT,
"message": "ASFflags",
"keep_updated": True,
"message_data": "u8_lb",
}),

binary sensor
"service_required": BinarySensorSchema({
"device_class": DEVICE_CLASS_PROBLEM,
"icon": "mdi:account-wrench-outline",
"description": "Remote boiler parameters: service required read",
"message": "ASFflags",
"keep_updated": False,
"message_data": "flag8_hb_0",
}),

"lockout_reset": BinarySensorSchema({
    "device_class": DEVICE_CLASS_PROBLEM,
    "icon": "mdi:lock-reset",
    "description": "Remote boiler parameters: lockout reset read",
    "message": "ASFflags",
    "keep_updated": False,
    "message_data": "flag8_hb_1",
}),   
"low_water_pressure": BinarySensorSchema({
    "device_class": DEVICE_CLASS_PROBLEM,
    "description": "Remote boiler parameters: low water pressure read",
    "message": "ASFflags",
    "icon": "mdi:water-alert",
    "keep_updated": False,
    "message_data": "flag8_hb_2",
}),   

"gas_fault": BinarySensorSchema({
    "device_class": DEVICE_CLASS_PROBLEM,
    "description": "Remote boiler parameters: gas fault read",
    "message": "ASFflags",
    "icon": "mdi:fire-alert",
    "keep_updated": False,
    "message_data": "flag8_hb_3",
}),   
"air_fault": BinarySensorSchema({
    "device_class": DEVICE_CLASS_PROBLEM,
    "icon": "mdi:weather-cloudy-alert",
    "description": "Remote boiler parameters: air fault read",
    "message": "ASFflags",
    "keep_updated": False,
    "message_data": "flag8_hb_4",
}),  
"water_overtemp": BinarySensorSchema({
    "device_class": DEVICE_CLASS_PROBLEM,
    "icon": "mdi:water-thermometer",
    "description": "Remote boiler parameters: water overtemp read",
    "message": "ASFflags",
    "keep_updated": False,
    "message_data": "flag8_hb_5",
}), 

@arthurrump
Copy link
Owner

Huh, I must have overlooked that one. For reference, this is message id 5 described in section 5.3.1 of the OpenTherm specification. In the OpenTherm library it is indeed message id ASFflags. The code you listed looks reasonable at first glance, though I think the binary sensors are the hb and the fault code is the lb (at least, that's what it says in the spec).

What do you mean with

It turns out to add either a sensor or a binary sensor, the duplicate key error is not compiled in place.

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants