• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

New YouTube Channel: Brewski Tech (DIY Tech for Better Beer)

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

sharpk60

Member
Joined
Apr 14, 2010
Messages
21
Reaction score
5
Location
Noblesville, IN
Hey everyone!

Excited to announce my new YouTube channel: Brewski Tech! I'm combining homebrewing with DIY modern tech like Home Assistant + ESPHome to measure and improve our brews.

https://www.youtube.com/@BrewskiTech

First up: building a Home Assistant controlled fermentation chamber for precise temperature control!

My first video series is live now:
where I cover how to build the insulated box, the electronics, and Home Assistant automation.

If you're into homebrew and DIY tech, check it out, subscribe, and let me know what you think!

Cheers and happy tinkering!
 
Hi Whiskey River,

Let me know if you want to know something more specific, but I'm a software engineer that likes to play with Arduinos and Raspberry Pis. I've been brewing for 15+ years and I often try to combine my electronics tinkering with brewing because, why not?

About a year ago I had the realization that while brewing is a very DIY hobby, there isn't a lot of content out there that combines it with DIY electronics. So I thought I could document some of my projects and start putting them out there for other homebrewers to see. I've got a lot more projects in the pipeline...

I'm trying to also come at this from the idea that you shouldn't have to be an engineer to build your own brewing electronics, so I hope that my content is approachable for non-engineers. An important part of making this more approachable is using Home Assistant + ESPHome to make the brewing electronics. Even though Home Assistant is intended for home automation it works really well for making brewing gadgets: it's easy to use, reliable, and doesn't require knowledge of programming to make custom electronics or user interfaces.

I hope you'll give the channel a look, and let me know if you have any questions or comments.
 
Hey finally got around to going through your video. Thank you for putting up the resources in a separate page. I have recently tried going the route of HomeAssistant to control my fermenters. You have any other projects figured out?
 
Hi Indian_villager, thanks for watching. I'm glad you like the additional site for project resources; we thought that was important to do.

I've got a long list of future projects that are in various stages of completion. Next up will be some further improvements to the first project and also using similar hardware to control a proper fridge/freezer. Definitely stay tuned, we've got lots of great stuff coming out soon.
 
Inspired by your project I was actually looking at the following to control my two fermentation fridges and glycol chiller. There is a spot in your yaml file where you pull out the temperature variable to display it, can you point to the documentation you used to find this variable? Full disclosure, I am a complete noob.
https://www.amazon.com/Waveshare-Industrial-6-Channel-Interfaces-Protection/dp/B0CXPG4XGZ/ref=sr_1_1?crid=713DCKTZC789&dib=eyJ2IjoiMSJ9.QyOi-vt7LdKzm9fuZuoN0y8z5JpqVpNBVPrUC8SSOvyIsJDMJZJFCWODCspNVCxFHs5gYoith9oJAgOV7MWt5y6BmfsS7JZJfXptjS7GUbIoxWGeoOXSLxuAWHxHfBKy-i_Y973nwk3RzSTlnmAufL4QnQTMhjWh9YDuROjFlodYfS6jpO4eFbntyaQ9iDhrm0oD2bBitXSycO5dkXreLb3ql5sxZ_4elibqpqtkVpw.ftAy14k_nNzZN0XtZjkUnWLag8qDv6J40OFPgDLLgyU&dib_tag=se&keywords=waveshare+6+relay&qid=1749644136&sprefix=waveshare+6+relay,aps,172&sr=8-1

EDIT: Actually why the hell am I going to go through all that trouble. I'm just going to use the following power strip which has built in monitoring, and a separate esp to handle the temp and the display. I will glue **** together until I reach glory.
https://www.amazon.com/Kasa-Smart-P...49648089&sprefix=tp+link+strip,aps,392&sr=8-1
 
Last edited:
Inspired by your project I was actually looking at the following to control my two fermentation fridges and glycol chiller. There is a spot in your yaml file where you pull out the temperature variable to display it, can you point to the documentation you used to find this variable? Full disclosure, I am a complete noob.
https://www.amazon.com/Waveshare-Industrial-6-Channel-Interfaces-Protection/dp/B0CXPG4XGZ/ref=sr_1_1?crid=713DCKTZC789&dib=eyJ2IjoiMSJ9.QyOi-vt7LdKzm9fuZuoN0y8z5JpqVpNBVPrUC8SSOvyIsJDMJZJFCWODCspNVCxFHs5gYoith9oJAgOV7MWt5y6BmfsS7JZJfXptjS7GUbIoxWGeoOXSLxuAWHxHfBKy-i_Y973nwk3RzSTlnmAufL4QnQTMhjWh9YDuROjFlodYfS6jpO4eFbntyaQ9iDhrm0oD2bBitXSycO5dkXreLb3ql5sxZ_4elibqpqtkVpw.ftAy14k_nNzZN0XtZjkUnWLag8qDv6J40OFPgDLLgyU&dib_tag=se&keywords=waveshare+6+relay&qid=1749644136&sprefix=waveshare+6+relay,aps,172&sr=8-1

EDIT: Actually why the hell am I going to go through all that trouble. I'm just going to use the following power strip which has built in monitoring, and a separate esp to handle the temp and the display. I will glue **** together until I reach glory.
https://www.amazon.com/Kasa-Smart-Power-Strip-TP-Link/dp/B07G95FFN3/ref=sr_1_1?crid=3GJBS26P8J53N&dib=eyJ2IjoiMSJ9.Pu3qAdfRUbZigHfartrdGmt3GGTIv1hr-ta8NK039iXLyECiH1UpI3WN4DgYRmN7D2covLpFumqdG6-ppFfjem0kwLPzNZK0FXzQpThb3i1xCD1o0C49YaLde63OmtxQq3ym9pDm8yDf4bJ-3UbP3lhDDuktqBZxscY8okUEH6ygOwlJWRzAWIwT34Fle_WkBIowrwOOt0WPNRWsfBBTtrS7p0LCKHD70lAWvAfTtKitrG_VkDD8m_hSLChvxCShf5N5cpRd3z1yoMzRqVINZ7yiX1noluta5SiZfY1h-h0.By8jvasT2GYeLkXQWvQZGia7VD1bEOWfR2ERQ3Im53I&dib_tag=se&keywords=tp+link+strip&qid=1749648089&sprefix=tp+link+strip,aps,392&sr=8-1
The ESPHome documentation is really good and is available here: https://esphome.io/

The first hardware link you sent would probably work but would require significant changes to the yaml file.

The second link you sent would probably make things more difficult since that power strip can be used in Home Assistant, but would not be natively included with ESPHome. It's probably possible to make an ESPHome device talk to that power strip but it might be difficult to get the "glue logic" working. I wouldn't recommend it as a beginner project.

I've actually got a new video that I'm working on right now that will allow you to control a chest freezer or almost anything that plugs into a 110V plug. That may be more useful for what you're trying to do. I should have that video posted in the next week or so.
 
Tested this out on breadboard. Got it working by just defining a home assistant switch. So right now I have 2 temp sensors on the same esp32 that is hosting two thermostats. Now to see how annoying I want to be about the fans.

switch:
- platform: homeassistant
id: Test_Switch
entity_id: switch.(insertnamehere)
 
Tested this out on breadboard. Got it working by just defining a home assistant switch. So right now I have 2 temp sensors on the same esp32 that is hosting two thermostats. Now to see how annoying I want to be about the fans.

switch:
- platform: homeassistant
id: Test_Switch
entity_id: switch.(insertnamehere)
That's great! I'll have to remember that Home Assistant component for future ESPHome projects.

One thing to keep in mind with that setup, is if you have an Internet outage it may stop working until your internet connection is restored. Basically, Home Assistant/ESPHome has to talk to "the cloud" to turn on the power switch. It may not matter that much, but still something to be aware of.
 
That's great! I'll have to remember that Home Assistant component for future ESPHome projects.

One thing to keep in mind with that setup, is if you have an Internet outage it may stop working until your internet connection is restored. Basically, Home Assistant/ESPHome has to talk to "the cloud" to turn on the power switch. It may not matter that much, but still something to be aware of.
That is something that I will have to test out. Reason I went with the Tp-Link stuff was that I thought these plugs/strips could be addressed on the local network. I have used a TP link plug similarly to manage a 3D printer via octoprint.
 
That is something that I will have to test out. Reason I went with the Tp-Link stuff was that I thought these plugs/strips could be addressed on the local network. I have used a TP link plug similarly to manage a 3D printer via octoprint.
I just posted a new project video, which might be closer to what you're doing: . Hopefully it's helpful.
 
The TP link smart plugs and the power strip are locally addressed. Got to test this out yesterday by unplugging the modem from the network.
 
fwiw, I got into GOVEE smart plugs and have been quite happy with their infrastructure. The programming flexibility is spot on and of course it's subscription-free.

Cheers!
 
Lets see if the code populates here correctly. Aside from the code I also have an automation in home assistant such that if the temp sensors become "unavailable" for 30s or more, all affiliated smart plugs are shut down. FYI this controller is set up for two different ferm chambers "Brown" and "Keg"

esphome:
name: fermentercontroller
friendly_name: Fermenter Controller


esp32:
board: esp32dev
framework:
type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
encryption:
key: "get your own"

ota:
- platform: esphome
password: "get your own"

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password


# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Test Fallback Hotspot"
password: "no"

one_wire:
- platform: gpio
pin: GPIO23
switch:
- platform: homeassistant
id: Brown_Cool
entity_id: switch.fermenters_plug_1
- platform: homeassistant
id: Brown_Heat
entity_id: switch.fermenters_plug_2
- platform: homeassistant
id: Keg_Cool
entity_id: switch.fermenters_plug_5
- platform: homeassistant
id: Keg_Heat
entity_id: switch.fermenters_plug_6
- platform: gpio
pin: GPIO32
id: Brown_Fan
name: "Brown Fan"
- platform: gpio
pin: GPIO33
id: Keg_Fan
name: "Keg Fan"

sensor:
- platform: dallas_temp
address: use your own
resolution: 10
name: Brown Temp
id: brown_temp
update_interval: 10s
- platform: dallas_temp
address: use your own
resolution: 10
name: Keg Temp
id: keg_temp
update_interval: 10s


climate:
#Brown Fermenter
- platform: thermostat
name: "Brown Fermenter"
id: Brown_Fermenter
default_preset: FermentationChamber
on_boot_restore_from: memory
visual:
min_temperature: -0
max_temperature: 40
temperature_step: 0.1
sensor: brown_temp
cool_deadband: 0.5
cool_overrun: -0.1
heat_deadband: 0.5
heat_overrun: -0.1
min_cooling_off_time: 600s
min_cooling_run_time: 180s
min_heating_off_time: 10s
min_heating_run_time: 10s
min_idle_time: 1s
cool_action:
- switch.turn_on: Brown_Cool
- switch.turn_on: Brown_Fan
- switch.turn_off: Brown_Heat
heat_action:
- switch.turn_on: Brown_Heat
- switch.turn_off: Brown_Cool
- switch.turn_off: Brown_Fan
idle_action:
- switch.turn_off: Brown_Cool
- switch.turn_off: Brown_Heat
- switch.turn_off: Brown_Fan
preset:
# Custom Preset
- name: FermentationChamber
mode: HEAT_COOL
default_target_temperature_high: 18
default_target_temperature_low: 18
#Kegerator Fermenter
- platform: thermostat
name: "Keg Fermenter"
id: Keg_Fermenter
default_preset: FermentationChamber
on_boot_restore_from: memory
visual:
min_temperature: -0
max_temperature: 40
temperature_step: 0.1
sensor: keg_temp
cool_deadband: 0.5
cool_overrun: -0.1
heat_deadband: 0.5
heat_overrun: -0.1
min_cooling_off_time: 600s
min_cooling_run_time: 180s
min_heating_off_time: 10s
min_heating_run_time: 10s
min_idle_time: 1s
cool_action:
- switch.turn_on: Keg_Cool
- switch.turn_on: Keg_Fan
- switch.turn_off: Keg_Heat
heat_action:
- switch.turn_on: Keg_Heat
- switch.turn_off: Keg_Cool
- switch.turn_off: Keg_Fan
idle_action:
- switch.turn_off: Keg_Cool
- switch.turn_off: Keg_Heat
- switch.turn_off: Keg_Fan
preset:
# Custom Preset
- name: FermentationChamber
mode: HEAT_COOL
default_target_temperature_high: 18
default_target_temperature_low: 18


i2c:
sda: GPIO21
scl: GPIO22

display:
- platform: lcd_pcf8574
dimensions: 20x4
address: 0x27
lambda: |-
it.print(0, 0,"Device Temp State");
it.printf(0, 1,"Brown Box:%.1f %s", (id(brown_temp).state) * 9 / 5 + 32, (id(Brown_Fermenter).action == CLIMATE_ACTION_IDLE) ? "Idle" :
(id(Brown_Fermenter).action == CLIMATE_ACTION_HEATING) ? "Heat" :
(id(Brown_Fermenter).action == CLIMATE_ACTION_COOLING) ? "Cool" :
"Unknown");
it.printf(0, 2,"Kegerator:%.1f %s", (id(keg_temp).state) * 9 / 5 + 32, (id(Keg_Fermenter).action == CLIMATE_ACTION_IDLE) ? "Idle" :
(id(Keg_Fermenter).action == CLIMATE_ACTION_HEATING) ? "Heat" :
(id(Keg_Fermenter).action == CLIMATE_ACTION_COOLING) ? "Cool" :
"Unknown");
#The lambda calls down below make up for the fact if the Kasa Plug was already on, and the esp boots into idle,
#the Kasa Plug will retain its last commanded state, not the current state the controller is trying to go for
#Similarly if it boots into cool or heat, this ensures the Plug is actually in the appropriate state
interval:
- interval: 10s
then:
- lambda: |-
if (id(Brown_Fermenter).action == climate::CLIMATE_ACTION_COOLING &&
!id(Brown_Cool).state) {
id(Brown_Cool).turn_on();
}
if (id(Keg_Fermenter).action == climate::CLIMATE_ACTION_COOLING &&
!id(Keg_Cool).state) {
id(Keg_Cool).turn_on();
}


if (id(Brown_Fermenter).action == climate::CLIMATE_ACTION_HEATING &&
!id(Brown_Heat).state) {
id(Brown_Heat).turn_on();
}
if (id(Keg_Fermenter).action == climate::CLIMATE_ACTION_HEATING &&
!id(Keg_Heat).state) {
id(Keg_Heat).turn_on();
}


if (id(Brown_Fermenter).action == climate::CLIMATE_ACTION_IDLE &&
id(Brown_Heat).state) {
id(Brown_Heat).turn_off();
}
if (id(Brown_Fermenter).action == climate::CLIMATE_ACTION_IDLE &&
id(Brown_Cool).state) {
id(Brown_Cool).turn_off();
}
if (id(Keg_Fermenter).action == climate::CLIMATE_ACTION_IDLE &&
id(Keg_Cool).state) {
id(Keg_Cool).turn_off();
}
if (id(Keg_Fermenter).action == climate::CLIMATE_ACTION_IDLE &&
id(Keg_Heat).state) {
id(Keg_Heat).turn_off();
}
 
@Indian_villager Thanks for the research on this! I liked it so much I made a video on using your smart plug idea to add a ESPHome controlled heat wrap to my fermenter design.


Good update,
however I think you are missing a few edge cases. The cool action also should have a heater off just in case.

Additionally there is no safety for power loss recovery. That is what the last section of the code I have up there works to do. I have since updated mine to take care of a few more edge cases. The code I put up regularly looks at the state the controller is an and compares to the plug. This is to protect against the case where you were in heat mode, the power goes out, and then when power comes on your controller is seeing sufficient temperature to start in the idle case. If your smart plug defaults to the last state when regaining power your controller will be in idle and your heater will be on and you could end up overheating.
 
Good update,
however I think you are missing a few edge cases. The cool action also should have a heater off just in case.

Additionally there is no safety for power loss recovery. That is what the last section of the code I have up there works to do. I have since updated mine to take care of a few more edge cases. The code I put up regularly looks at the state the controller is an and compares to the plug. This is to protect against the case where you were in heat mode, the power goes out, and then when power comes on your controller is seeing sufficient temperature to start in the idle case. If your smart plug defaults to the last state when regaining power your controller will be in idle and your heater will be on and you could end up overheating.
Good point on the turning off the heater in the cool_action, I'll add that.

I'm a little concerned about adding the lambda logic for power loss scenarios. Wouldn't "on_boot_restore_from: memory" and/or "restore_mode" in the switch component prevent this kind of power loss related out-of-sync issue? Have you seen an out-of-sync scenario happen on power loss even with these restore settings?

The reason I'm asking is that I'm a little concerned that the lambda logic would interfere with things like restore functionality and "startup_delay" that is meant to protect against compressor fast-cycling.
 
Good point on the turning off the heater in the cool_action, I'll add that.

I'm a little concerned about adding the lambda logic for power loss scenarios. Wouldn't "on_boot_restore_from: memory" and/or "restore_mode" in the switch component prevent this kind of power loss related out-of-sync issue? Have you seen an out-of-sync scenario happen on power loss even with these restore settings?

The reason I'm asking is that I'm a little concerned that the lambda logic would interfere with things like restore functionality and "startup_delay" that is meant to protect against compressor fast-cycling.
Startup delay would keep the state in "Idle" so the lambda logic would keep stuff off.
 

Latest posts

Back
Top