Control the fridge temperature

I’m a home beer brewer. The hardest part of brewing a pilsener is keeping the fermentation temperature steady at 12 degrees celcius. It is the 22th of june and there is no place that has a temperatuur of 12 degrees. My fridge is too cold for fermentation. 5 degrees doesn’t make the yeast happy.

I’ve bought a xiaomi aqara temperature sensor and a Sonoff basic switch and used them in HA. I will refer to the installation below.

The steps to keep the fridge at a temperature of 12 degrees:
1. put the temperature sensor in the fridge. Put it in a plastic drawer.
2. use the sonoff switch between the power socket and the power plug. (I have used a 230 V extension cable so I can reuse the sonoff for other projects)
3. make an automation which turns on the fridge when the temperature gets higher then 12 degrees
4. make an automation which turns off the fridge when the temperature gets lower then 12 degrees
(it’s also possible to use a temperature range)

Below the installation steps for getting this to work:
1. Add the temperature device to the xiaomi gateway via the xiaomi app
2. connect the xiaomi gateway to Home Assistant:
https://www.home-assistant.io/components/xiaomi_aqara
https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)#Adding_the_Xiaomi_Gateway_to_Domoticz
3. make the sonoff basic device Home Assistant ready. Can be hard for the first time:
https://www.youtube.com/watch?v=chyVjtYb0EA&feature=youtu.be
4. make 2 automations and restart Home assistant

automation 1: (temperatuur above 12 degrees)

- alias: 'fridge_temp > 12'
  trigger:
    platform: numeric_state
    entity_id: sensor.temperature_<Xiaomi ID)>
    above: 12
  condition:
    condition: state
    entity_id: switch.sonoff1 (whatever name your sonoff has)
    state: 'off'
  action:
    - service: switch.turn_on
      entity_id: switch.sonoff1

automation 2: (temperatuur below 12 degrees)

- alias: 'fridge_temp <12'
  trigger:
    platform: numeric_state
    entity_id: sensor.temperature_(xiaomi ID)
    below: 12
  condition:
    condition: state
    entity_id: switch.sonoff1
    state: 'on'
  action:
    - service: switch.turn_off
      entity_id: switch.sonoff1



1 Like

With a small effort you could create just 1 automation ‘control fermentation temperature’ that combines these 2 using some templating.

I agree. It’s a bit lazy. I will fix this. Thank you for pointing this out

1 Like

Great work :wink:

1 Like

Great, but 12C is a bit warm for your fresh veg LOL.

1 Like

Very nice. I am about to do a similar project for my daughter to hatch eggs. Not knowing your outlets / extension cords, is there a ground wire in the cord? If so, I would think you should pass it on to the device. Again, very nice.

Any smart switch will do the trick, of course.

How do you heat it in winter? (It is winter now of course).

The fridge is only used for my Beer projects :yum: :beer:

My cellar has a constant temperature of 15 degrees celcius in winter time

Hi,

Just wondering why you didn’t use the generic thermostat? (https://www.home-assistant.io/components/climate.generic_thermostat/). Some time ago I did the same kind of automation and then found the generic thermostat, which is easier to use and you may even use it with some kind of input slider to change the target temperature without having to edit/restart HA.

I have these devices, and i find that there update time is not quick or regular enough to do automations on.

If you need to do something different, i would suggest the Sonoff TH10 (i think) which has a temp sensor that you can set the frequency or reporting.

What devices?

xiaomi aqara temperature sensor

Interesting Project! Do you have any problems with the sensors zigbee communication? I mean the button is in an enclosed (metal reinforced?) cage^^
Another thing I am asking myself, is it safe to use the fridge like that or could it be that you will damage the compressor over time?

3 Likes