Skip to content

About

An extensible ethernet / wifi temperature sensor monitoring platform for ESP32

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

ESP SNMP Temperature Monitor

Overview

This project was created as a cheaper alternative to commercial thermal sensors for data centre use. The system is aimed at using the SNMP protocol for monitoring temperatures in server racks.

Features

The system is based on the Olimex ESP32-POE ESP32 module, or alternatively the WT32-ETH01 ethernet ESP32 module. These both supply a hard-wired connection into the monitoring/management network where WiFi is not usually employed. The system does have the option for WiFi configuration, which is also used for initial setup.

The button is used to reset the settings. Pressing this button and holding it for 5 seconds at power on will reset the settings to default. While the device is running, holding the button for 5 seconds reboots it (the error LED flashes while the button is held), and shorter presses are ignored. A reboot started this way, or from the web UI, never triggers the factory reset, even if the button is still held as the device restarts. The default mode is set automatically on first boot within the Preferences library.

The platform supports the Dallas 1-wire DS18B20 sensor set (https://www.analog.com/media/en/technical-documentation/data-sheets/ds18b20.pdf) It will discover up to 10 devices (configurable in prefs.h), and the embedded 1-wire serial numbers are stored within the preferences to ensure consistent SNMP indexes within the table. Up to 20 devices are remembered. These can also be named with a friendly name, so that display shows something reasonable such as "Rack 1G, Front"

Sensors are discovered once, at startup. After adding or replacing a sensor, reboot the device (from the web UI, or by holding the button for 5 seconds) to pick it up. A sensor that is removed while running stays in the SNMP table with a read error status until the next reboot.

The SNMP OID consists of a prefix 1.3.6.1.4.1.53165.1.1.1 (enterprises.mortonLights.sensorNetPro.thermalSensorTable.thermalSensorTableEntry) There are five columns in this table, each indexed by the sensor's SNMP index (the same value as column 1)

  • 53165.1.1.1.1 - SNMP Index for discovery
  • 53165.1.1.1.2 - Friendly name of sensor
  • 53165.1.1.1.3 - Serial number of sensor (the 1-wire ROM address, as 16 hex digits)
  • 53165.1.1.1.4 - Temperature in hundredths of degrees Celsius -> This needs to be divided by 100 to get the actual temperature
  • 53165.1.1.1.5 - Sensor status: 1 = OK, 2 = read error (the temperature column then holds the last good reading)

Sensor types

DS18B20 temperature sensors are the only type supported so far, but the firmware is built around a generic sensor interface (include/sensor.h) so that others can be added. Each type gets its own SNMP table under 1.3.6.1.4.1.53165.1 with the same five columns (index, name, serial, value, status), with values scaled by 100. The thermal table is .1, and .2 to .99 are reserved for further types. To add a type:

  1. Implement SensorType for it (see src/ds18b20.cpp), and add an instance to sensorTypes[] in src/main.cpp.
  2. Give it the next free table number, and add its table to the MIB.
  3. Show it in the web UI. The JSON API already lists each type's sensors under <type>SensorData, but the page only displays thermalSensorData today.

Hardware

The wiring for the sensors, button and LEDs on each board is in electronics/README.md. A carrier PCB is planned, but its KiCad design hasn't been started.

MIB

The MIB is in mibs/SENSORNETPRO-MIB.txt. Copy it into your SNMP manager's MIB directory to see named objects (for example thermalSensorTemperature) instead of numeric OIDs. With net-snmp:

snmpwalk -v2c -c public -M +./mibs -m +SENSORNETPRO-MIB <device> SENSORNETPRO-MIB::thermalSensorTable

The device's sysObjectID is 1.3.6.1.4.1.53165.0.1 (sensorNetProDevice).

OID allocation

Private Enterprise Number 53165 is allocated by the mrlp-infra repository (ADR 0036). It delegates two sub-identifiers to this project, and this project manages everything inside them (the master record is mibs/SENSORNETPRO-MIB.txt):

Arc Use
1.3.6.1.4.1.53165.0 sysObjectID values (.0.1 is sensorNetProDevice)
1.3.6.1.4.1.53165.1 SensorNetPro MIB: .1.1 thermal table, .1.2 to .1.99 reserved for further sensor types, .1.100 conformance

Anything outside these two arcs, including .2 to .99, must be allocated in ADR 0036 first. Numbers are never reused.

License

The project is licensed under the terms of the General Public License v3 as detailed in the LICENSE file

Copyright

Copyright © 2023-2026 Michael Junek.

Building

See BUILDING.md for building, flashing and updating the firmware and web interface.

Each supported board has its own PlatformIO environment. esp32poe is the default:

  • Olimex ESP32-POE: pio run -e esp32poe
  • WT32-ETH01: pio run -e wt32-eth01 (provisional pin map, see platformio.ini)

Firmware updates

Once the default admin password has been changed, the device can be updated over the network:

  • From the web UI: Admin → Firmware Update. Upload firmware.bin for the firmware, or spiffs.bin for the web interface. If the web interface is ever missing, the same upload form is built into the firmware at http://<device>/update.
  • From PlatformIO, using the admin password: PLATFORMIO_UPLOAD_FLAGS="--auth=<admin password>" pio run -e esp32poe -t upload --upload-port <device IP> (or -t uploadfs for the web interface).

Devices flashed before OTA support was added need one USB upload of both the firmware and the filesystem, because the partition table changed. Settings are kept. See BUILDING.md.

Status

Updated 2026-Oct-24: The firmware is feature complete for DS18B20 temperature monitoring over SNMP, with web configuration and network updates. The serious bugs from the initial commit have been fixed (see OUTSTANDING_ISSUES.md), and it builds for both boards on Arduino-ESP32 3.3.

Still to do:

  • Test the current firmware on real hardware. The recent fixes have been checked by building and by host-side tests, not yet on a device.
  • Confirm the WT32-ETH01 pin map, which is provisional.
  • Design the carrier PCB (see electronics/README.md).

About

An extensible ethernet / wifi temperature sensor monitoring platform for ESP32

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages