So i enabled SNMP on my Advanced Tomato router, then i used Getif to verify that its up and running, i also tried to query my connected devices with oid .1.3.6.1.2.1.4.22.1.2
and it worked.
So i added the following to my configuration
device_tracker:
- platform: snmp
host: 192.168.0.1
community: readonly
baseoid: .1.3.6.1.2.1.4.22.1.2
i also tried without the initial dot on the baseoid.
But when starting home assistant i get the following error
17-03-11 11:11:53 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform snmp
Traceback (most recent call last):
File "C:\Users\xbmc\AppData\Local\Programs\Python\Python36-32\lib\site-packages\homeassistant\components\device_tracker\__init__.py", line 165, in async_setup_platform
None, platform.get_scanner, hass, {DOMAIN: p_config})
File "C:\Users\xbmc\AppData\Local\Programs\Python\Python36-32\lib\concurrent\futures\thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\xbmc\AppData\Local\Programs\Python\Python36-32\lib\site-packages\homeassistant\components\device_tracker\snmp.py", line 45, in get_scanner
scanner = SnmpScanner(config[DOMAIN])
File "C:\Users\xbmc\AppData\Local\Programs\Python\Python36-32\lib\site-packages\homeassistant\components\device_tracker\snmp.py", line 77, in __init__
data = self.get_snmp_data()
File "C:\Users\xbmc\AppData\Local\Programs\Python\Python36-32\lib\site-packages\homeassistant\components\device_tracker\snmp.py", line 115, in get_snmp_data
self.auth, self.host, self.baseoid)
File "C:\Users\xbmc\AppData\Roaming\.homeassistant\deps\pysnmp\entity\rfc3413\oneliner\cmdgen.py", line 221, in nextCmd
**kwargs):
File "C:\Users\xbmc\AppData\Roaming\.homeassistant\deps\pysnmp\hlapi\asyncore\sync\cmdgen.py", line 355, in nextCmd
lookupMib=options.get('lookupMib', True)))
File "C:\Users\xbmc\AppData\Roaming\.homeassistant\deps\pysnmp\hlapi\asyncore\cmdgen.py", line 352, in nextCmd
options.get('cbFun'), options.get('cbCtx'))
File "C:\Users\xbmc\AppData\Roaming\.homeassistant\deps\pysnmp\entity\rfc3413\cmdgen.py", line 258, in sendVarBinds
v2c.apiPDU.setVarBinds(reqPDU, varBinds)
File "C:\Users\xbmc\AppData\Roaming\.homeassistant\deps\pysnmp\proto\api\v1.py", line 136, in setVarBinds
varBindList.getComponentByPosition(idx), varBind
File "C:\Users\xbmc\AppData\Roaming\.homeassistant\deps\pysnmp\proto\api\v1.py", line 43, in setOIDVal
verifyConstraints=False)
TypeError: setComponentByType() got multiple values for argument 'verifyConstraints'
I ran check_config
and it gave me no errors so what am i missing?
Python: 3.6.0
Home Assistant: 0.39.3