View on GitHub

FridgeTroll

ESPHome-based smart controller for SECOP compressor-driven refrigerators, providing advanced temperature management, stall detection, and telemetry.

FridgeTroll

An ESPHome-based smart controller for SECOP compressor-driven refrigerators, providing advanced temperature management, stall detection, and telemetry.

Overview

FridgeTroll is designed as an off-the-shelf, installable firmware primarily targeted at the SECOP 101N2000 compressor controller (though it should work with most modern SECOP controllers). It replaces the standard mechanical thermostat with an ESP32, offering fine-grained control over compressor speed, dedicated fridge and compressor fan management, and rich telemetry for Home Assistant via InfluxDB and native ESPHome APIs.

Installation

You can use the button below to install the pre-built firmware directly to your device via USB from the browser.

Bill of Materials (BOM)

To build the FridgeTroll hardware interface, you will need:

Interfacing with the SECOP Controller

The SECOP controller provides several pins that need to be interfaced with the ESP32. Due to voltage differences (the SECOP can Output 12V/24V on some pins), opto-isolation is required for the compressor control signals and the door switch to protect the ESP32.

1. Compressor Enable (Pin T)

The compressor turns on when Pin C is connected to Pin T (or driven by a PWM signal).

2. Compressor PWM (Pin P)

This pin dictates the compressor speed.

3. Compressor Fan

Controls the cooling fan for the compressor itself.

4. Door Switch

Monitors if the fridge door is open.

5. Fridge Fan (Internal)

Controls the circulation fan inside the fridge compartment.

Physical Installation & Wiring

Component Mounting

A successful FridgeTroll installation requires precise placement of sensors and fans for optimal thermal control:

Parasitic Wiring for DS18B20

To simplify wiring, the DS18B20 sensors are intended to be used in Parasitic Power Mode. This allows all sensors to share a single data line and ground.

Cable Routing Tips

Reusing existing paths can save significant time and avoid drilling into the fridge chassis:

Software Configuration

Once FridgeTroll is installed and connected to your network, most configuration can be handled directly through the built-in Web UI.

1. Setting Sensor IDs

FridgeTroll uses DS18B20 1-Wire sensors, each of which has a unique 64-bit hardware address. To map your physical sensors to the correct software entities (Fridge, Freezer, Compressor, Ambient):

  1. Open the FridgeTroll Web UI in your browser.
  2. Navigate to the Debug Tools section.
  3. Click the Dump Sensor IDs button.
  4. Open the ESPHome logs (either via the web interface or serial monitor). You will see a list of discovered sensor addresses in the format 0xXXXXXXXXXXXXXXXX.
  5. Match these addresses to your physical sensors (you can dip a sensor in warm water to see which one fluctuates in the logs).
  6. Scroll to the Sensor Addresses section in the Web UI.
  7. Paste the 18-character hex address (including the 0x prefix) into the corresponding text field for each sensor.
  8. The changes are applied immediately; no restart is required for sensor mapping.

2. Telemetry & Logging (UDP)

FridgeTroll can send high-frequency telemetry to InfluxDB and system logs to a Syslog server via UDP. These settings are found in the UDP Configuration section.

[!IMPORTANT] Changes to UDP settings require a device restart to take effect. Use the Restart button in the Host section after saving your changes.

3. Tuning Performance

The Settings section allows you to fine-tune the cooling algorithm without reflashing:

Advanced: ESPHome Package Integration

If you manage your smart home devices through a centralized ESPHome dashboard or configuration directory, you can cleanly integrate FridgeTroll as an ESPHome Package. This allows you to compile from source, keep your custom credentials secure in a centralized secrets.yaml, and disable the standalone Improv provisioning service since credentials are pre-configured.

Example Configuration (ESPHome/config/fridgetroll.yaml)

To extend FridgeTroll as a package and override Wi-Fi, API, and OTA configurations:

packages:
  # Reference the base fridgetroll.yaml package file
  fridgetroll: !include ../../FridgeTroll/fridgetroll.yaml

# Remove Improv Serial and Improv Wi-Fi provisioning components (not needed for centralized configs)
improv_serial: !remove
esp32_improv:
  !remove # Supply your network credentials from your central secrets.yaml


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

ota:
  - platform: esphome
    password: !secret ota_password

api:
  reboot_timeout: 0s
  encryption:
    key: !secret api_encryption_key

Once configured, you can build, flash, and manage your FridgeTroll node alongside all your other ESPHome nodes:

esphome run fridgetroll.yaml