Precooling room using RCAC DRED (Demand Response Enabling Device)
When you have surplus solar, one thing to consider is using it to operate a reverse cycle air conditioner during the day. Assuming you have a good energy meter like the Iammeter WEM3080T connected to Home assistant, It should be possible to use an automation to turn the air conditioner on and off when there is sufficient to run it. This can get a bit complicated if (like me) you have another energy circuit (like hot water) that you want to give priority to.
The idea is by using free solar power during the day to keep a hot room cool, less night time grid energy will be required.
In Australia and New Zealand, Air conditioners have had to comply with AS/NZS 4755 standard since about 2011. This is designed so the energy operator can reduce the Air conditioner’s power consumption in a similar way to how they manage controlled loads. This requires a special receiver module called a Demand Response Enabling Device (DRED) but few people have installed these as they are not mandated. Some Air conditioner are DRED ready and others might be an additional module available at extra cost. Its possible to access the DRED interface with Home Assistant to give greater granularity in power consumption settings.In my case, the one I wanted to control had the DRED interface already fitted as shown below.
So how does the DRED work? It’s pretty simple really. In the displayed configuration, the air conditioner will run at maximum current. If you connect the Common terminal to terminal 3 and current will be limited to 75% of rated power, patch it to terminal 2, it will be limited to 50% of rated power and a connection to terminal 1 will reduce it to 0% of rated power (eg. turn the compressor off but leave the circulation fan running). So sounds pretty simple right? Just grab a couple of relays and go for it! But as always the devil is in the detail. After thinking about various way to set the relays up, I stumbled upon this 4 chanel relay that interfaces with Ewelink that supports Home assistant. The beauty of this device is that it supports mains power which substantially simplifies the wiring. The other nice feature for us is that you can set an interlock mode in the app so that only 1 relay is enabled at any time. Turning any relay on will disable any other relays that are on. Perfect. The delivery timeframe was surprisingly quick! Its a bit annoying that you have to open the case to connect the wires. I accidentally knocked off one of the switches (which will never get used so it won’t matter)
Connecting all the common terminals with the green wire, adding red wires to go to the DRED terminals and mains power wires did not take long.
I tried hard to get this working without measuring the air conditioner power consumption but in the end I grabbed a Shelly 1 pm to measure the power (I did not wire in a switch). I would like to eventually replace this with a Iammeter WEM3080 as its a much more robust device which can use Modbus/TCP to send the power usage to HAS every six seconds. In fact, the Modbus/TCP feature is one of the many things including external wifi antennas that sets the iammeter apart. I currently use a 3 phase and single phase meter. The 3 phase meter can be split into 3 single phase meters.
I already have a Shelly UNI monitoring my hot water temperature with a DS18B20 temperature sensor slipped in under the insulation of the hot water service near the thermostat. Using this in my automations will let me wait until my water is hot before sending power to the Air conditioner.
Time to get some stuff fitted up!
The relay box will end up being a little bit exposed here. I turned the box around so the wires were on the inside to give them more protection once the cover was on. I will revisit this but it’s pretty good once the cover is on.
I did try to integrate a Broadlink RM4 remote into the automations to turn the air conditioner on and off but whilst I have it working from a console switch, it did not seem to want to trigger in an automation which was a bit annoying. Weird!
So with the hardware fitted, Time to work on some automations.
We need switch we can use to enable and disable our DRED system at will
input_boolean:
dred_enable:
name: Enable DRED
icon: mdi:bug
And we need a template that says how much surplus solar we have (before hot water consumption as it will yield to any other loads). Sensor.modbus_power_b is an iammeter on the hot water circuit.
surplus_power:
unit_of_measurement: 'W'
value_template: "{{ (states('sensor.modbus_power_b')|float(0)) + (states('sensor.feedin_power')|float(0)) }}"
And we need another template that calculates the available power for the DRED assuming that the air conditioner is not turned on. This adds back the actual power being used to surplus_power. This is measured by our Shelly 1 pm
- name: "dred_threshold"
state: "{{ states('sensor.surplus_power') | float(0) + (states( 'sensor.shelly1pm_bcff4dfcc2a3_power') | float(0))}}"
We want to make sure the dred is enabled during the day, so we add 2 automations. The first enables the DRED system mid morning
alias: DRED - 4 Hours after sunrise turn on DRED1 (0%)
description: >-
While sleeping all DRED relays are off. After we wake up, turn DRED1 on (0%
cooling)
trigger:
- platform: sun
event: sunrise
offset: "+4:00"
condition:
- condition: state
entity_id: input_boolean.dred_enable
state: "on"
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.100132ea23_1
mode: single
And we want to turn off all relays at sunset
alias: DRED Off at Sunset
alias: DRED Off at Sunset
description: Select Dred relay 4
trigger:
- platform: sun
event: sunset
offset: 0
condition: []
action:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.100132ea23_1
- switch.100132ea23_2
- switch.100132ea23_3
- switch.100132ea23_4
mode: single
So the housekeeping is done, its time to set our arbitrary dred thresholds based on our air conditioner specifications. If you add a panel like this, you can disable the automations and flick the switches to observe what happens to the power consumptions at various DRED levels. This will also give you some idea how long it takes for the AC to change from one level to another. I choose 5 minutes.
I chose the following levels:
4: >1000 Watts
3: 750-500 watts
2: 500-750 watts
1. < 500 watts
So now we need a separate automation for each of these levels.
We will use a time pattern trigger to check things every 5 minutes so we don’t change values too frequently.
We want to do the conditions in a specific order so make for an efficient processing
If the integration is enabled
And it is between sunset and sunrise and
The available power is within our desired threshold and
If the water temperature is near the thermostat set point of 73 deg.
You can set these up in the automations tab without dropping to code but to share what I’ve done, its much easier to use show the code
So lets look at what they look like. First the 100% automation
alias: DRED4 100 % power
description: all terminals off
trigger:
- platform: time_pattern
minutes: /5
condition:
- condition: state
entity_id: input_boolean.dred_enable
state: "on"
- condition: sun
before: sunset
after: sunrise
- condition: numeric_state
entity_id: sensor.shellyuni_98cdac24e53b_temperature
above: 72.5
- condition: numeric_state
entity_id: sensor.surplus_power
above: 0
- condition: numeric_state
entity_id: sensor.dred_threshold
above: 1000
action:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.100132ea23_1
- switch.100132ea23_2
- switch.100132ea23_3
- switch.100132ea23_4
mode: single
Then the 75% automation
alias: DRED3 75% power
description: ""
trigger:
- platform: time_pattern
minutes: /5
condition:
- condition: state
entity_id: input_boolean.dred_enable
state: "on"
- condition: sun
before: sunset
after: sunrise
- condition: numeric_state
entity_id: sensor.shellyuni_98cdac24e53b_temperature
above: 72.5
- condition: numeric_state
entity_id: sensor.surplus_power
above: 0
- condition: numeric_state
entity_id: sensor.dred_threshold
above: 749
below: 1001
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.100132ea23_3
mode: single
And the 50% automation
alias: DRED2 50% power
alias: DRED2 50% power
description: ""
trigger:
- platform: time_pattern
minutes: /5
condition:
- condition: state
entity_id: input_boolean.dred_enable
state: "on"
- condition: sun
before: sunset
after: sunrise
- condition: numeric_state
entity_id: sensor.shellyuni_98cdac24e53b_temperature
above: 72.5
- condition: numeric_state
entity_id: sensor.surplus_power
above: 0
- condition: numeric_state
entity_id: sensor.dred_threshold
above: 500
below: 750
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.100132ea23_2
mode: single
And the final 0% automation
alias: DRED1 0% power
description: ""
trigger:
- platform: time_pattern
minutes: /5
condition:
- condition: state
entity_id: input_boolean.dred_enable
state: "on"
- condition: sun
before: sunset
after: sunrise
- condition: numeric_state
entity_id: sensor.shellyuni_98cdac24e53b_temperature
above: 72.5
- condition: numeric_state
entity_id: sensor.dred_threshold
below: 500
above: 100
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.100132ea23_1
mode: single
So thats it! Enjoy your cool house!
Phew! Thats a big post!