Server Room Thermometer (SNMP) - Using Domotz

by Pilgrim in Circuits > Audio

66 Views, 0 Favorites, 0 Comments

Server Room Thermometer (SNMP) - Using Domotz

20260505_111915.jpg
20260505_111725.jpg

I neededing somethinig to monitor the temperature and humidity in our server rooms. There are products available out there but I was looking for something cheap and simple.

This solution was setup to work with https://www.domotz.com/.

Supplies

  1. ESP32-P4-ETH (PoE) - programmed using the Arduino IDE
  2. Adafruit Sensirion SHT45 (these were not in stock at the time so I used a BME280) *
  3. Dupont, female-female jumper cables
  4. ESP32 Dev board case (Case for Waveshare ESP32-S3 Ethernet Board with POE and DHT22, by Enderman3933)
  5. 3D printer

* I initially tried a TMP117 but it appears that they knock-offs are missing some required resistors but simply do not work like one would expect.

As I currently do not have a 3D printer, I used a local service (3D Printing Service in New Zealand | Instant Quotes | extruder.co.nz) which provided a quality print with great service, at a good price.

This particular model was not created with a sensor in mind so I will simply drill a hole in the lid to make room for the cables. At a later date I might design my own case that accomodates the sensor better.

Model obtained from: Waveshare ESP32-S3-POE-ETH Case by Hooba | Download free STL model | Printables.com

Setting Up the Aurduino IDE

Step 1 – Install Arduino IDE

Download and install the Arduino IDE:https://www.arduino.cc/en/software


Step 2 – Add ESP32 Board Support

  1. Open Arduino IDE
  2. Go to:
File → Preferences
  1. In “Additional Board Manager URLs”, add:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  1. Click OK
  2. Now install the ESP32 boards:
Tools → Board → Boards Manager

Search for:

ESP32 by Espressif Systems

Click Install

Step 3 – Install Required Libraries

Go to:

Sketch → Include Library → Manage Libraries

Install the following libraries:

Core Libraries

Adafruit BME280 - Temperature / Humidity / Pressure sensor

Adafruit Unified Sensor - Required dependency

SNMP_Agent - Patrick Lafontaine (or compatible fork) - SNMP server functionality


Important Notes

  1. Ensure you install the SNMP_Agent library that supports ESP32
  2. Some older SNMP libraries do not support Ethernet properly
  3. The correct library includes functions like: addGaugeHandler(...)

Step 4 – Select the Correct Board

Go to:

Tools → Board

Select your ESP32 board, for example:

  1. ESP32 Dev Module
  2. WT32-ETH01
  3. Olimex ESP32-POE

⚠️ Choose the exact model matching your hardware.

Step 5 – Configure Board Settings

Recommended settings:

Upload Speed: 115200

CPU Frequency: 240 MHz

Flash Frequency: 80 MHz

Flash Mode: QIO

Partition Scheme: Default

Core Debug Level: None

Hardware Setup

Attached PoE model to the ESP32 dev board, bolting it in using the screws provided.

Edit the source code (as discussed in step 2) and upload it to the ESP 32. Using the serial montiro in the Arduino IDE, confirm that the sensor is working.

If necessary solder the header pins to the boards.

Using the dupont cables, connect the 3.3V, ground, SCL and SDA pins on the sensor to the same pins on the ESP dev board.

Plug the the ESP into a switch port that provides PoE, setup the Domotz collectors (see step 2) and you should be good to go.

Software and Domotz Configuration

Domotz Setup Guide – ESP32 Environmental Sensor

This guide explains how to configure Domotz to display Temperature, Humidity, and Pressure data from an ESP32 environmental sensor using SNMP.

Prerequisites

  1. The ESP32 sensor is online and visible in Domotz
  2. SNMP Status shows READ and Authentication: V2
  3. SNMP Community is set to public

Step 1 – Open the Device in Domotz

  1. Log in to Domotz
  2. Select the site
  3. Click the ESP32 sensor device
  4. Open the SNMP tab

Domotz will automatically discover standard SNMP tables, but custom environmental sensors must be added manually.

Step 2 – Add Custom SNMP Sensors

Click + Add SNMP Sensors, then choose:

Define your own OID Sensor

Temperature Sensor (x10 °C)

  1. Name: Rack Temperature
  2. OID: .1.3.6.1.4.1.49701.1.0
  3. Output Type: Numeric

Humidity Sensor

  1. Name: Rack Humidity (x10 %RH)
  2. OID: .1.3.6.1.4.1.49701.1.1
  3. Output Type: Numeric

Pressure Sensor (Pa / x10 hPa)

  1. Name: Rack Pressure
  2. OID: .1.3.6.1.4.1.49701.1.2
  3. Output Type: Numeric

Step 3 – Save and Verify

  1. Save each sensor
  2. Wait for the next polling cycle (default is 30 minutes)
  3. Or click Retry SNMP to update immediately

Domotz does not allow us to format the outputs so a temperature of 24.3 °C will show as 243 with Humidity and Pressure also displaying in a similar way.

The device page will now show live graphs for:

  1. Temperature
  2. Humidity
  3. Pressure

Optional

To reuse this configuration for future sensors:

  1. On the same device page, select Create a Profile from Device
  2. Save the profile
  3. Apply it to other ESP32 sensors as they are deployed

You could also add a general SNMP sensor

  1. Sensor Name: Status (or Sensor Status)
  2. Description: ESP32 sensor health
  3. OID:1.3.6.1.4.1.49701.1.99
  4. where 1 = Healthy / OK and 0 (or missing) = Fault / sensor error / firmware issue

Notes

Domotz does not automatically create sensors for custom enterprise SNMP OIDs. This is expected behaviour and ensures sensor units and scaling are correct.

Once configured, the device behaves like a fully managed environmental monitor.

Troubleshooting

Use an SNMP tool (e.g. SnmpWalk) to confirm the device is working:

Example command: snmpwalk -v2c -c public <device-ip> 1.3.6.1.4.1.49701

Expected output:

.1.3.6.1.4.1.49701.1.0 = Gauge32: 259
.1.3.6.1.4.1.49701.1.1 = Gauge32: 402
.1.3.6.1.4.1.49701.1.2 = Gauge32: 10311
.1.3.6.1.4.1.49701.1.99 = Gauge32: 1


Finishing Up

It is worth comparing the values that you get against calibrated a thermometer so that you can adjust any alerting values accordingly.


You can now set up your alerts based on what max/min values you want your enironment to run at.