Could you explain which format the setup form is expecting? It doesn’t show me anything there except for a blank input field so I assumed it’s asking for the IP address of the router but then the configuration fails (perhaps it needs the user and password credentials as well?).
and is there any configuration required on the OpenWRT device itself?
edit: ok, I’ve installed mini_snmpd on OpenWRT and I can query it using snmpwalk from my computer but the integration still fails during setup.
2020-04-26 22:54:24 ERROR (MainThread) [custom_components.snmp_stats] Unable to connect to snmp: Traceback (most recent call last):
File "/config/custom_components/snmp_stats/config_flow.py", line 36, in async_step_user
SnmpStatisticsMonitor(ipaddress)
File "/config/custom_components/snmp_stats/sensor.py", line 121, in __init__
self.update_stats()#try this to throw error if not working.
File "/config/custom_components/snmp_stats/sensor.py", line 194, in update_stats
self.update_netif_stats()
File "/config/custom_components/snmp_stats/sensor.py", line 232, in update_netif_stats
'1.3.6.1.2.1.2.1.0' #v1, ifCount
File "/config/custom_components/snmp_stats/sensor.py", line 161, in get_bulk_auto
return __class__.get_bulk(target, oids, credentials, count, start_from, port, engine, context)
File "/config/custom_components/snmp_stats/sensor.py", line 155, in get_bulk
return __class__.fetch(handler, count)
File "/config/custom_components/snmp_stats/sensor.py", line 187, in fetch
raise RuntimeError('Got SNMP error: {0}'.format(error_indication))
RuntimeError: Got SNMP error: No SNMP response received before timeout
just tried that, same result. Also doesn’t show me the label unfortunately. Do you have a certain config for snmpd?
edit: I removed some packages on my OpenWRT and reinstalled snmpd and now the configuration succeeded and I can see data coming which is great! Unfortunately the values are a bit hit & miss though, the history graph shows spikes with extremely big negative values. probably it’s related to 32bit limitation causing a rollover of big values. do you know if this can be fixed on the router?
One of the most useful integrations I found so far, thank you so much for your work.
I just installed it via HACS and I have all the sensors ready and working. Just one question: I see the code extracts only 3 cpu load averages, and I have an opnsense running on a dedicated server with a 4 core CPU. Would it be possible to discover ALL the cpu OIDs and prepare sensors for each?
Hello!
Do you still maintain this integration? I tried adding it as a custom repostitory in HACS but do not see any way to configure it with the IP address of my router.