Hi
i use LibreNMS to monitor my home networks. LibreNMS is a fantastic free tool for network monitoring and can be found here: www.librenms.org.
I thought I’d have a go at adding snmp to a LocalBytes plug so LibreNMS can see a little more about the plug other than the ping it is currently performing. I thought I’d post what I did, just in case anyone else is considering the same.
I’ve used Aquaticus’ snmp module, which can be found here (including the OIDs supported): https://aquaticus.info/snmp.html
To add an snmp server to a LocalBytes ESPHome device add the following code to the device’s yaml configuration file within ESPHome:
external_components:
source: github://aquaticus/esphome-snmp
snmp:
contact: Me
location: Here
The snmp module doesn’t allow configuration of snmp version or authentication details, it just supports snmp v2c with the snmp community string “public”.
After compiling and installing on a Local Bytes plug an snmpwalk of the plug provides these details:
root@LMS:~# snmpwalk -v2c -c public plug1
iso.3.6.1.2.1.1.1.0 = STRING: "ESPHome version 2024.9.1 compiled Oct 6 2024, 10:07:54, Board esp01_1m"
iso.3.6.1.2.1.1.2.0 = OID: iso.3.9999.8266
iso.3.6.1.2.1.1.3.0 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.1.4.0 = STRING: "Me"
iso.3.6.1.2.1.1.5.0 = STRING: "esp-w-plug1"
iso.3.6.1.2.1.1.6.0 = STRING: "Here"
iso.3.6.1.2.1.1.7.0 = INTEGER: 64
iso.3.6.1.2.1.25.1.1.0 = Timeticks: (14573) 0:02:25.73
iso.3.6.1.2.1.25.2.2 = INTEGER: 160
iso.3.6.1.2.1.25.2.3.1.1.1 = INTEGER: 1
iso.3.6.1.2.1.25.2.3.1.1.2 = INTEGER: 2
iso.3.6.1.2.1.25.2.3.1.3.1 = STRING: "FLASH"
iso.3.6.1.2.1.25.2.3.1.3.2 = STRING: "SPI RAM"
iso.3.6.1.2.1.25.2.3.1.4.1 = INTEGER: 1
iso.3.6.1.2.1.25.2.3.1.4.2 = INTEGER: 1
iso.3.6.1.2.1.25.2.3.1.5.1 = INTEGER: 1048576
iso.3.6.1.2.1.25.2.3.1.5.2 = INTEGER: 0
iso.3.6.1.2.1.25.2.3.1.6.1 = INTEGER: 594128
iso.3.6.1.2.1.25.2.3.1.6.2 = INTEGER: 0
As above, the snmp OIDs can be found at the module’s home-page.