Skip to content

Food Temperature Sensor — DIY Build Guide

A step-by-step guide to building a freezer-grade temperature monitor for the garage fridge and freezers using an ESPHome microcontroller + waterproof DS18B20 probes. One small board monitors all three appliances, runs on USB power (no batteries to die in the cold), stays fully local, and drops straight into the existing Food Temperature alerts, dashboard tiles, and Grafana panel.

Why replace the current sensors?

The garage units are ThirdReality 3RTHS0224Z indoor temp/humidity sensors running far below their rated range. The giveaway: their humidity reading inside the freezers is 81–87% (a real freezer's air is bone-dry — the element is frosting). Their battery and Zigbee radio also sit inside the metal box, which kills battery life and signal. The fix is a sensor whose electronics stay warm and dry outside the appliance, with only a probe (rated to −55 °C) inside.


How it works

   GARAGE WALL OUTLET                      APPLIANCE
   ┌──────────────┐                ┌───────────────────────┐
   │  5V USB       │   USB cable    │  (cold interior)      │
   │  charger      ├───────────────►│                       │
   └──────────────┘   ┌─────────┐   │   ┌───────────────┐   │
                      │ ESP32 / │   │   │ DS18B20 probe │   │
                      │ D1 mini ├───┼──►│ in water/glycol│  │
                      │(ESPHome)│   │   │ bottle (reads  │   │
                      └────┬────┘   │   │ food, not air) │   │
                           │        │   └───────────────┘   │
                    WiFi (local API)│   cable out through    │
                           │        │   the door gasket      │
                           ▼        └───────────────────────┘
                   Home Assistant
              (ESPHome integration, auto-discovered)
  • The DS18B20 is a 1-Wire digital sensor — several probes share one data pin, each with a unique 64-bit address. So one board monitors the fridge + fridge-freezer + deep freezer.
  • ESPHome talks to Home Assistant over its local encrypted API — no cloud, sub-minute updates.
  • USB-powered → no battery to die in the cold and nothing to maintain.

Bill of materials

Part Qty ~Cost Notes
ESP32 dev board (esp32dev) or Wemos D1 mini (ESP8266) 1 $4–8 Either works in ESPHome. ESP8266 is plenty for temperature; ESP32 gives headroom.
Waterproof DS18B20 probe (stainless tip, 1–3 m cable) 3 $3–5 ea One per appliance. Rated −55 °C to +125 °C, ±0.5 °C. Buy a 3-pack.
4.7 kΩ resistor (pull-up) 1 ¢ One per bus, not per probe. Skip it if you buy a DS18B20 adapter module with the resistor built in.
5 V USB charger + cable 1 $5 Any phone charger.
Dupont jumpers / mini protoboard / heat-shrink $5 For tidy, strain-relieved joints.

Total ≈ $20–30 for all three appliances. A solder-free DS18B20 adapter module (resistor pre-mounted) is the easiest route.


Before you start

Check these two things first

  1. Garage WiFi coverage. This is a WiFi device. If the garage is a WiFi dead spot but Zigbee is strong out there, use the OWON THS317-ET Zigbee probe sensor instead — same probe concept, Zigbee transport.
  2. A 5 V USB outlet within cable reach of the appliances.

ESPHome is already installed in this setup (it runs the garage door openers), so no new add-on is needed.


Step 1 — Wire it up

DS18B20 waterproof probe leads (colors vary by vendor — verify before connecting):

Wire Connects to
Red 3.3 V
Black / Blue GND
Yellow / White Data → GPIO4
  • Place one 4.7 kΩ resistor between the Data line and 3.3 V (the bus pull-up). Just one, even with three probes.
  • For multiple probes, join all Red → 3.3 V, all Black → GND, all Yellow → GPIO4 (shared 1-Wire bus):
 3.3V ──┬───────────────┬──────────── red (all probes)
        │              [4.7kΩ]
        │               │
 GPIO4 ─┴───────────────┴──────────── yellow/data (all probes)

 GND ───────────────────────────────── black (all probes)

Power the board from the 5 V USB port; the probes run off the board's 3.3 V pin.

Probe VDD is 3.3 V, not 5 V

Wire the probe's red lead to the board's 3.3 V pin. Feeding the probe 5 V is a common cause of stuck/garbage readings.


Step 2 — Create the device and discover probe addresses

In Home Assistant → ESPHome → New Device, name it garage-food-temp. Start with this config (addresses left out so the probes can be discovered):

substitutions:
  name: garage-food-temp
  friendly_name: Garage Food Temp

esphome:
  name: ${name}
  friendly_name: ${friendly_name}

esp32:
  board: esp32dev          # for a Wemos D1 mini, replace this block with:
  framework:               #   esp8266:
    type: esp-idf          #     board: d1_mini

logger:                    # required to read probe addresses on first boot

api:
  encryption:
    key: !secret garage_food_temp_api_key

ota:
  - platform: esphome
    password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "Garage-Food-Temp Fallback"

captive_portal:

one_wire:
  - platform: gpio
    pin: GPIO4

Flash it (USB the first time, OTA after), then open the device logs. ESPHome lists every probe it finds:

[one_wire]: Found sensors:
[one_wire]:   0x1c00000abcdef028
[one_wire]:   0x3b00000123456710
[one_wire]:   0x7a000009876543aa

Copy those addresses.

Which probe is which?

Warm one probe in your hand and watch which address's temperature climbs — or plug the probes in one at a time and label them as they appear.


Step 3 — Final config (3 probes, °F output, health signal)

Keep the esphome / esp32 / logger / api / ota / wifi / captive_portal blocks from Step 2, then replace the one_wire section with:

one_wire:
  - platform: gpio
    pin: GPIO4

sensor:
  - platform: dallas_temp
    address: 0x1c00000abcdef028     # deep freezer probe
    name: "Deep Freezer"
    unit_of_measurement: "°F"
    accuracy_decimals: 1
    update_interval: 60s
    filters:
      - lambda: return x * 9.0 / 5.0 + 32.0;   # DS18B20 reads °C → output °F

  - platform: dallas_temp
    address: 0x3b00000123456710     # fridge-freezer probe
    name: "Fridge Freezer"
    unit_of_measurement: "°F"
    accuracy_decimals: 1
    update_interval: 60s
    filters:
      - lambda: return x * 9.0 / 5.0 + 32.0;

  - platform: dallas_temp
    address: 0x7a000009876543aa     # refrigerator probe
    name: "Refrigerator"
    unit_of_measurement: "°F"
    accuracy_decimals: 1
    update_interval: 60s
    filters:
      - lambda: return x * 9.0 / 5.0 + 32.0;

  - platform: wifi_signal
    name: "Garage Food Temp WiFi"
    update_interval: 120s

binary_sensor:
  - platform: status
    name: "Garage Food Temp Status"   # online/offline health signal

Outputting °F natively (the lambda filter) makes the new entities match the existing sensors exactly, so the alert thresholds and dashboard tiles need no changes.

ESPHome secrets

garage_food_temp_api_key, ota_password, wifi_ssid, and wifi_password live in ESPHome's own secrets.yaml (the ESPHome add-on has a separate secrets file from Home Assistant's).


Step 4 — Calibrate (optional)

DS18B20s are usually accurate out of the box, but you can verify with an ice-water bath: fill a cup with crushed ice and a little water, stir, submerge the probe for ~30 s. It should read 32 °F / 0 °C. To correct any offset, add to that probe's filters:

    filters:
      - lambda: return x * 9.0 / 5.0 + 32.0;
      - offset: 0.4        # °F — nudge until it reads 32.0 in ice water

Step 5 — Physical install

Read food, not air

Drop the stainless probe tip into a small sealed bottle of water or food-grade propylene glycol sitting among the food. It then tracks food temperature, so brief door-opens barely move it — the warm spikes that look alarming on the chart disappear.

  • Cable routing: run the thin cable out through the door gasket — fridge/freezer seals close around a thin wire without breaking the seal.
  • Mount the board on top of or behind the appliance, and add strain relief so the cable can't pull the probe out of the bottle.

Step 6 — Cut over in Home Assistant

The Food Temperature alerts, the Climate-tab tiles, and the Grafana Garage Food Temperature panel all key off these entity IDs:

  • sensor.freezer_temperature_sensor_temperature — deep freezer
  • sensor.refrigerator_freezer_temperature_sensor_temperature — fridge-freezer
  • sensor.refrigerator_temperature_sensor_temperature — fridge

To swap with zero edits to automations or tiles, give the new ESPHome entities those same IDs:

  1. Confirm the new entities report sane values (e.g. sensor.garage_food_temp_deep_freezer).
  2. Remove or disable the old ThirdReality device in Settings → Devices (this frees up the old entity IDs).
  3. For each new entity: Settings → Entities → (entity) → ⚙ → Entity ID → rename it to the matching ID above.
  4. Refresh the test fixture so CI stays green:
    make snapshot     # regenerates tests/fixtures/entities.txt (needs HA_URL + HA_TOKEN)
    git add tests/fixtures/entities.txt
    
    If you pair the board before renaming, temporarily list the new IDs in tests/fixtures/entities_allow.txt.

One required automation edit

The old sensors had a battery entity; this USB build does not. In automations.yaml (the Food Temperature section), delete the health_battery trigger in each of the three automations — it references sensor.*_battery, which no longer exists and would fail the entity-reference test. The existing health_offline trigger still works; you can optionally repoint it at binary_sensor.garage_food_temp_status for a faster offline signal.


Troubleshooting

Symptom Cause / fix
Reads −196 °F / −127 °C Probe not found — check the 4.7 kΩ pull-up, the data wire on GPIO4, and 3.3 V / GND.
Stuck at 185 °F / 85 °C DS18B20 power-on default — it never finished a conversion. Usually power/wiring; confirm the probe runs on 3.3 V.
Only one probe appears Each needs a unique address in the config — re-read the boot logs.
Entity goes unavailable Weak garage WiFi — check sensor.garage_food_temp_wifi; relocate the board or add a mesh node.
Values show in °C Keep the lambda filter and unit_of_measurement: "°F".

Summary

  • ≈ $20–30, about 30–45 minutes of work (less with a solder-free DS18B20 module).
  • No batteries, fully local, freezer-accurate, and one board covers all three appliances.

Related pages: Climate & Comfort · Automations Reference · Grafana Analytics