-
-
Notifications
You must be signed in to change notification settings - Fork 19
BDR91 Overriding TPI behaviour
There are some circumstances where you may want to override the TPI settings of a BDR91, such as when using one for UFH, or when you have a S-plan configuration with OpenTherm.
This can be done by adding a second binding to the BDR91, the second binding being controlled by Home Assistant. The result is that the relay will be activated whenever either Evohome or Home Assistant enable it - effectively an OR function.
To achieve this you need to know the ids, and their hex equivalent, of the BDR91 and the HGI80/SSM.
The hex equivalent can be found with excel. With the id of the device in A1 (eg 18:136212), this formula in A2 will give you the hex equivalent (4A1414)
=DEC2HEX(BITLSHIFT(LEFT(A1,2),18)+VALUE(RIGHT(A1,6)))
Alternatively, use this python:
device_id = '18:136212' # a.k.a. 4A1414
print(f"{(int(device_id[:2]) << 18) + int(device_id[-6:]):0>6X}")
In the details below, the follow example devices are used:
BDR91 CH Relay 13:197705 (370449)
HGI80/SSM 18:136212 (4A1414)
Generic HGI80/SSM 18:000730 (used for sending but will be replaced by the HGI80/SSM)
The binding process involves sending a command, waiting for a response, and then sending an acknowledgment. The two strings you need to send are of the form below, where xxxxxx represents the hex device identifier of the HGI80/SSM. Note : The HGI80 won't send out a message as another device. You have to use 18:000730 instead. The examples below will work both on the HGI80 and the SSM.
I --- 18:000730 --:------ 18:136212 1FC9 012 000008xxxxxx001FC9xxxxxx
I --- 18:000730 13:197705 --:------ 1FC9 006 00FFFFxxxxxx
- Do not clear any BDR91 bindings
- Prepare the two strings that are required in a text editor you can cut and paste from. For the example devices these would be
I --- 18:000730 --:------ 18:136212 1FC9 012 0000084A1414001FC94A1414
I --- 18:000730 13:197705 --:------ 1FC9 006 00FFFF4A1414
- Shutdown HA.
- Connect your HGI80/SSM to a terminal emulator such as putty or the Arduino IDE, and confirm that you are seeing data packets
- Put BDR91 into binding mode (5 second press till red led flashes)
- Send the first of the two strings (
I --- 18:000730 --:------ 18:136212 1FC9 012 0000084A1414001FC94A1414
) - Wait for the BDR91 to return a W response (
W --- 13:197705 18:136212 --:------ 1FC9 006 003EF0370449
) - Send second string (
I --- 18:000730 13:197705 --:------ 1FC9 006 00FFFF4A1414
) - BDR91 should now be bound to the HGI80/SSM as well as the Evohome controller - led should have stopped flashing.
This is a sample packet log showing the process.
+ 11:10:22.860 -> 000 I --- 18:136212 --:------ 18:136212 1FC9 012 0B00084A14140B1FC94A1414
11:10:23.747 -> 053 I --- 01:185426 --:------ 01:185426 0008 002 F906
+ 11:10:23.840 -> 062 W --- 13:197705 18:136212 --:------ 1FC9 006 003EF0370449
11:10:24.119 -> 062 W --- 13:197705 18:136212 --:------ 1FC9 006 003EF0370449
11:10:29.163 -> 053 I --- 04:003202 --:------ 01:185426 2309 003 0405DC
11:10:29.163 -> 052 I --- 04:003202 --:------ 01:185426 12B0 003 040000
11:10:31.068 -> 052 I --- 04:003202 --:------ 01:185426 12B0 003 040000
+ 11:10:38.987 -> 000 I --- 18:136212 13:197705 --:------ 1FC9 006 0BFFFF4A1414
11:10:39.316 -> 062 I --- 10:048456 --:------ 10:048456 1FD4 003 002ED9
11:11:15.940 -> 061 I --- 04:026298 --:------ 01:185426 3150 002 0600
11:11:18.313 -> 053 RQ --- 01:185426 10:048456 --:------ 3EF0 001 00
11:11:18.360 -> 061 RP --- 10:048456 01:185426 --:------ 3EF0 009 000010000000020A64
At this stage it is possible to test by sending either of these two strings:
On:
I --- 18:000730 --:------ 18:136212 0008 002 00C8
Off:
I --- 18:000730 --:------ 18:136212 0008 002 0000
It is worth noting that for some strange reason the green led does not always follow the relay state initially - it seems to take a few cycles for it to behave.
From within HA, use ramses_cc.send_packet to control the BDR91. For example, to enable the CH valve:
- alias: Enable CH Valve
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.f9_relay_demand
above: 5
condition: []
action:
- service: ramses_cc.send_packet
data:
device_id: "18:000730"
verb: I
code: '0008'
payload: '00C8'
mode: single
Note for the service calls you must use the HGI80/SSM internal id (18:000730) for the destination. It will not work if you use any other id.
One issue you may find is that the BDR91 thinks it has lost connection with the HGI80/SSM if you only activate it occasionally, in which case you should implement an automation that fires periodically:
- alias: CH Watchdog
description: ''
trigger:
- platform: time_pattern
minutes: /10
condition: []
action:
- if:
- condition: numeric_state
entity_id: sensor.f9_relay_demand
above: 5
then:
- service: ramses_cc.send_packet
data:
device_id: "18:000730"
verb: I
code: '0008'
payload: '00C8'
else:
- service: ramses_cc.send_packet
data:
device_id: "18:000730"
verb: I
code: '0008'
payload: '0000'
mode: single