Server Room Thermometer (SNMP) - Using Domotz
by Pilgrim in Circuits > Audio
66 Views, 0 Favorites, 0 Comments
Server Room Thermometer (SNMP) - Using Domotz
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
- ESP32-P4-ETH (PoE) - programmed using the Arduino IDE
- Adafruit Sensirion SHT45 (these were not in stock at the time so I used a BME280) *
- Dupont, female-female jumper cables
- ESP32 Dev board case (Case for Waveshare ESP32-S3 Ethernet Board with POE and DHT22, by Enderman3933)
- 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
- Open Arduino IDE
- Go to:
- In “Additional Board Manager URLs”, add:
- Click OK
- Now install the ESP32 boards:
Search for:
Click Install
Step 3 – Install Required Libraries
Go to:
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
- Ensure you install the SNMP_Agent library that supports ESP32
- Some older SNMP libraries do not support Ethernet properly
- The correct library includes functions like: addGaugeHandler(...)
Step 4 – Select the Correct Board
Go to:
Select your ESP32 board, for example:
- ESP32 Dev Module
- WT32-ETH01
- 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
- The ESP32 sensor is online and visible in Domotz
- SNMP Status shows READ and Authentication: V2
- SNMP Community is set to public
Step 1 – Open the Device in Domotz
- Log in to Domotz
- Select the site
- Click the ESP32 sensor device
- 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)
- Name: Rack Temperature
- OID: .1.3.6.1.4.1.49701.1.0
- Output Type: Numeric
Humidity Sensor
- Name: Rack Humidity (x10 %RH)
- OID: .1.3.6.1.4.1.49701.1.1
- Output Type: Numeric
Pressure Sensor (Pa / x10 hPa)
- Name: Rack Pressure
- OID: .1.3.6.1.4.1.49701.1.2
- Output Type: Numeric
Step 3 – Save and Verify
- Save each sensor
- Wait for the next polling cycle (default is 30 minutes)
- 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:
- Temperature
- Humidity
- Pressure
Optional
To reuse this configuration for future sensors:
- On the same device page, select Create a Profile from Device
- Save the profile
- Apply it to other ESP32 sensors as they are deployed
You could also add a general SNMP sensor
- Sensor Name: Status (or Sensor Status)
- Description: ESP32 sensor health
- OID:1.3.6.1.4.1.49701.1.99
- 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.
Downloads
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:
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.