По инструкции в WiKi прикручиваю snmp девайс (температуру, давление, влажность отдает)
В веб-морде - неверный конфиг. Не открывается.
Работать тоже не работает ничего.
OID верные. Проверил iReasoning MIB browser
Где косяк?
действия, которые сделаны - ниже все.
Подправил конфиг /etc/wb-mqtt-snmp.conf
wb-mqtt-snmp.conf
{
“debug”: false,
“devices”: [
{
“address”: “10.11.0.32”,
“device_type”: “art-greenhouse-snmp”
}
]
}
Сделал шаблон /usr/share/wb-mqtt-snmp/templates/config-art-greenhouse-snmp.json
config-art-greenhouse-snmp.json
{
“device_type”: “art-greenhouse-snmp”,
“snmp_version”: “2c”,
“oid_prefix”: “SNMPv2-MIB”,
“community”: “art-home”,
“snmp_timeout”: 5,
“channels”: [
{
“name”: “out_temp”,
“oid”: “.1.3.6.1.4.1.17095.1.2.0.0”,
“type”: “text”,
“poll_interval”: 1000
},
{
“name”: “out_humidity”,
“oid”: “.1.3.6.1.4.1.17095.1.2.8”,
“type”: “text”,
“pool_interval”: 1000
},
{
“name”: “greenhouse_temp”,
“oid”: “.1.3.6.1.4.1.17095.1.2.31”,
“type”: “text”,
“pool_interval”: 1000
},
“name”: “greenhouse_humidity”,
“oid”: “.1.3.6.1.4.1.17095.1.2.40”,
“type”: “text”,
“pool_interval”: 1000
}
]
}
Перезапустил сервис invoke-rc.d wb-mqtt-snmp restart
MIB файл скопировал в /root/.snmp/mib/smeteo.mib
smeteo.mib
– SMALL_METEO SNMP STACK SMIV1 SPECIFICATION CONTROL MIB
SMALL_METEO-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY,enterprises,
IpAddress ,Integer32 FROM SNMPv2-SMI
– Gauge, TimeTicks FROM RFC1155-SMI
DisplayString FROM SNMPv2-TC
OBJECT-TYPE FROM RFC-1212
NOTIFICATION-TYPE FROM SNMPv2-SMI
– TRAP-TYPE FROM RFC-1215
SnmpSecurityModel,
SnmpMessageProcessingModel,
SnmpSecurityLevel,
SnmpAdminString FROM SNMP-FRAMEWORK-MIB
KeyChange FROM SNMP-USER-BASED-SM-MIB
TEXTUAL-CONVENTION FROM SNMPv2-TC
MODULE-COMPLIANCE, OBJECT-GROUP ,
NOTIFICATION-GROUP FROM SNMPv2-CONF;
info MODULE-IDENTITY
LAST-UPDATED “20012013”
ORGANIZATION “SMALL_METEO”
CONTACT-INFO “www.elephant.embedders.org”
DESCRIPTION “SMALL-METEO MIB for SNMP application.”
REVISION “20012013”
DESCRIPTION “The MIB module for 1.70.”
::= { small-meteo 1 }
small-meteo OBJECT IDENTIFIER ::= { enterprises 17095 }
product OBJECT IDENTIFIER ::= { info 1 }
sensor OBJECT IDENTIFIER ::= { info 2 }
name OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
“Name of product.”
::= { product 1 }
version OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
“Version string.”
::= { product 2 }
date OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
“Date of version”
::= { product 3 }
contact OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
“contact url”
::= { product 4 }
– socket 1 –
sensor0 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“temperature sensor socket1”
::= { sensor 0 }
senserror0 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“error socket1”
::= { sensor 1 }
sensor1 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“humidity sensor socket1”
::= { sensor 8 }
senserror1 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“error sensor socket1”
::= { sensor 9 }
– socket 2 –
sensor2 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“temperature sensor socket2”
::= { sensor 32 }
senserror2 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“error sensor socket2”
::= { sensor 31 }
sensor3 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“humidity sensor socket2”
::= { sensor 40 }
senserror3 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“error sensor socket2”
::= { sensor 41 }
– socket 3 –
sensor4 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“temperature sensor socket3”
::= { sensor 64 }
senserror4 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“error sensor socket3”
::= { sensor 65 }
sensor5 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“pressure HPa socket3”
::= { sensor 72 }
senserror5 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“error socket3”
::= { sensor 73 }
sensor6 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“pressure mmHg socket3”
::= { sensor 80 }
senserror6 OBJECT-TYPE
SYNTAX DisplayString (SIZE (0…15))
ACCESS read-only
STATUS mandatory
DESCRIPTION
“error socket3”
::= { sensor 81 }
END