Skip to main content Microfireย 

Mod-NTC for Home Assistant



๐Ÿ“’ Datasheet

Datasheet

PDF DOC HTML

In this write-up, we will install ESPHome to get NTC temperature measurements into Home Assistant.

  • We will be working in a terminal and using a few commands
  • You'll need a Home Assistant installation running
  • An ESP-device
  • A Mod-NTC module and preferably a carrier board


These instructions are for the CLI version of ESPHome. You can also copy and paste the YAML into the ESPHome addon within Home Assistant and avoid the CLI completely.



1.

๐Ÿ“ฆ Install ESPHome

Follow the instructions on the ESPHome website.

2.

๐Ÿ Start a project

Type in the terminal. Make sure the path on the terminal is where you want the project to be. Follow the steps, and there should be a .yaml file in the directory you ran the command in. For this write-up, it will be mod-ntc.yaml. If you type you should see the project compile.

3.

๐Ÿ”Œ Connections

  • Wiring for ESP32 and the sensor module
    Module
    Controller
    GND ground
    VCC 3.3 - 5 volt power supply
    SCL SCL
    SDA SDA
    PROBE_1 either probe wire
    PROBE_2 either probe wire
  • Wiring for ESP32 and the sensor module
    Carrier Board
    Controller
    GND ground
    VIN 3.3 - 5 volt power supply
    SCL SCL
    SDA SDA
    1W optional 1-wire device signal line
    EN optional EN wire, drive HIGH to disable both power modules
    Carrier 1W Header
    1-Wire Sensor
    GND ground
    VCC 3.3 - 5 volt power supply
    SIG signal data line for 1-Wire sensor

    Probe connection is made with the SMA connector, using a SMA-BNC Bulkhead or similar.


4.

๐Ÿ”ข Code

We'll use an external sensor component to get the Mod-NTC module working. This is done by adding some lines to the YAML.


The YAML file should be changed to the following:

1
substitutions:
2
  friendly_name: Microfire Mod-NTC
3
  device_name: microfire-mod-ntc
4
esphome:
5
  name: $device_name
6
esp32:
7
  board: esp32dev
8
  framework:
9
    type: arduino
10
logger:
11
api:
12
ota:
13
wifi:
14
  ssid: !secret wifi_ssid
15
  password: !secret wifi_password
16
  ap:
17
    ssid: $device_name
18
    password: !secret wifi_failover
19
captive_portal:
20

21
# import the mod-ntc component
22
external_components:
23
  - source:
24
      type: git
25
      url: https://github.com/u-fire/ESPHomeComponents/
26

27
# https://esphome.io/components/i2c.html
28
i2c:
29
  sda: 21
30
  scl: 22
31

32
sensor:
33
  - platform: mod_ntc
34
    id: ntc
35
    name: Temperature
36
    beta: 3950
37

38
button:
39
  - platform: factory_reset
40
    name: Restart with Factory Default Settings

Make sure you change the wifi section to your network and password if you aren't using a secrets.yaml. Check that the i2c section is using the correct pins.



5.

โžก๏ธ Upload

Type . It will compile the project and ask you which serial device to upload the code to. After that, you'll see the ESP debug output. If everything goes to plan, you should see a device has been discovered in Home Assistant.



6.

๐Ÿ  Home Assistant

From within Home Assistant, press Settings > Devices & Services and find the device in the ESPHome integration box. Click it and then click where it says 1 Device. You should see a screen with all the information, Mod-NTC measurement, and some buttons to calibrate and reset the device. You can create dashboards, scripts, and anything else Home Assistant can do from here.

There is more documentation and examples for various combinations of sensors/modules on our ESPHomeComponents GitHub repo

.




Related items