This is an automated archive made by the Lemmit Bot.
The original was posted on /r/homeassistant by /u/war4peace79 on 2025-07-23 07:13:28+00:00.
Have you heard about our networking Lord and Savior, the mighty SNMP? :)
Most networking devices have a SNMP implementation. Some devices are obviously better than others, in that regard, but those who are worth their hide offer a wealth of information through this nice protocol.
Unfortunately, at the same time, the SNMP implementation is poorly documented for many devices, and getting relevant data out of them was usually a PITA. The fact that Home Assistant's SNMP integration is YAML-only adds to the setup complexity.. until now.
Enter LLMs, which, if used properly, can shorten configuration time by at least one order of magnitude.
General steps for SNMP integration into Home Assistant:
- Configure your devices to enable their SNMP. This step depends on each device, and there is no common ground between them. Some only support SNMP v1, others support v1 and v2, and others also support v3. I recommend using SNMP v3 wherever possible. The HA integration supports all versions.
- Use snmpwalk to parse and extract SNMP trees from each device, export the data into a CSV file, one file per device.
An example of snmpwalk command from a Windows machine, which exports SNMP data from an Ubiquiti USW-Aggregation device:
V:\Apps\snmp>SnmpWalk.exe -r:192.168.2.4 -v:3 -sn:username -ap:SHA -aw:password1 -pp:AES128 -pw:password2 -csv > USW-AGGREGATION.csv
- For each device, go to their web address and copy relevant data (data that you are interested in) from there, place it in a TXT or CSV file, one per device, this helps the LLM zero in to the correct SNMP codes for the data you are interested in. This step is not mandatory, but saves time in the long run. Don't worry about the data mismatching a little, compared to the SNMP exported CSV, any major LLM will be able to perform a fuzzy matching.
- Open the LLM solution of your choice; I used Google Gemini Pro 2.5 because it has a maximum token count of 1M, which ensures even large CSV files are completely parsed with room to spare. OpenAI free might struggle with this, though. Upload the CSV file and ask the LLM to generate a Home Assistant configuration for you.
Now, this is an important part: Describe the request as detailed and clearly as possible, with examples (this is where step 3 comes in). Here's how I asked Gemini (sorry, wall of text, but it is helpful if you want to use this route):
I have a Home Assistant server and two Ubiquiti Access Points.
The first Access point is the UniFi UAP-AC-Pro and the second Access Point is the UniFi U6-LR.
The local IP for the UAP-AC-Pro is 192.168.2.21
The local IP for the U6-LR is 192.168.2.22
I have configured snmp access for each of those Access Points and used snmpwalk to obtain CSV files with snmp data from each Access Point. I have attached the relevant CSV files for both Access Points.
Create sensors for each access point, using this data for each sensor:
Sensor format example for the UAP AC Pro:
- { platform: snmp, host: 192.168.2.21, username: username, auth_protocol: hmac-sha, auth_key: password, priv_protocol: aes-cfb-128, priv_key: password, scan_interval: 120, name: UAP AC Pro (relevant sensor name), unique_id: uap_ac_pro_relevant_sensor_name, baseoid: "(relevant_oid)" }
Sensor format example for the U6 LR:
- { platform: snmp, host: 192.168.2.22, username: username, auth_protocol: hmac-sha, auth_key: password, priv_protocol: aes-cfb-128, priv_key: password, scan_interval: 120, name: U6 LR (relevant sensor name), unique_id: u6_lr_relevant_sensor_name, baseoid: "(relevant_oid)" }
Sensors I am interested in, for each Access Point:
1. Device Name
2. Device Uptime
3. Device Temperature (if it exists)
4. Channel Usage
5. Client Count (Clients and Guests)
6. Wi-Fi Experience Index for 2.4 GHz and 5 GHz
7. Memory Usage
8. Load Average
9. Uplink Speed
10. Activity (represented by throughput in Kbps)
11. Air Stats (for 2.4 and 5 GHz)
12. WLAN Channel and Width
Example data from the device page in UniFi Controller, for UAP-AC-Pro:
- General section:
MAC Address: [mac_address]
WiFi Experience (2.4 GHz): 98%
WiFi Experience (5 GHz): 99%
Uptime: 147d 22h 8m 18s
Memory Usage: 43.2%
Load Average: 0.24 / 0.13 / 0.10
Clients: 16
Guests: 0
- Uplink section:
Uplink: -
Speed: GbE
Power: 0 W
Down Pkts / Bytes: 2,384,703,262 / 2.64 GB
Up Pkts / Bytes: 717,280,099 / 626 MB
Activity: 55.7 Kbps
- Air Stats 2.4 GHz:
Channel: 8(10,-1) HT40
Tx Pkts/Bytes: 301,870,011 / 95.8 GB
Rx Pkts/Bytes: 150,921,390 / 18.4 GB
Tx Retry/Dropped: 23.5% / 17.5%
Rx Retry/Dropped: 0.0% / 0.1%
Ch. Util. (Busy/Rx/Tx): 5% / 0% / 4%
Clients: 9
Guests: 0
- Air Stats 5 GHz:
Channel: 42(36,+1) VHT80
Tx Pkts/Bytes: 2,000,371,356 / 2.63 TB
Rx Pkts/Bytes: 512,852,920 / 148 GB
Tx Retry/Dropped: 6.3% / 0.0%
Rx Retry/Dropped: 0.0% / 0.2%
Ch. Util. (Busy/Rx/Tx): 2% / 0% / 1%
Clients: 7
Guests: 0
Similar structure for the U6-LR Access Point.
Now, this specific chat used up close to 195K tokens, and AFAIK ChatGPT Free maxes out at 128K tokens. You can go around it by using one conversation per device, provided the exported SNMP tree is not humongous.
You might also want to tell the LLM which custom cards you use in your HA installation and whether you have HACS installed. You can also tell it to be a Home Assistant expert and how to generate its answer, I am not going to go too in-depth with this because this post is already way too long.
Below, a couple screenshots of the result, in Home Assistant. The backgrounds were generated using Google Gemini Pro 2.5 as well.
If you have any questions, I would be more than happy to respond, to the best of my abilities. I hope this will be useful to someone :)
Wired devices dashboard page
Wireless devices dashboard page
Current sensor count