hi,
i upgraded from openhab version 1.3 to 1.5 and had to modfiy my configurations for snmp binding ... i do net get it running ...
my new system:
- snmp forwarder listening on 162
- forwards snmp traps to 10162
- openhab listens on 10162
root@openhab:~# netstat -lnp | grep 162
udp 0 0
0.0.0.0:162 0.0.0.0:* 2659/snmptrapd
udp6 0 0 :::10162 :::* 2222/java
root@openhab:~#
- openhab runs on user openhab
i try to send snmp trap from another machine to openhab-machine, directly to 10162 oder 162 with forwarding nothing works...
12:26:39.252491 IP (tos 0x0, ttl 63, id 0, offset 0, flags [none], proto UDP (17), length 97)
openhab.seume70.efficient-energies.de.seume70.34183 > openhab.seume70.10162: { SNMPv1 C=openhab { Trap(53) E:prime.2.2.1.11.8 192.168.10.102 warmStart[specific-trap(1)!=0] 4530300 E:prime.2.2.1.11.8="20.1" } }
12:26:39.261794 IP (tos 0x0, ttl 63, id 0, offset 0, flags [none], proto UDP (17), length 95)
openhab.seume70.efficient-energies.de.seume70.47436 > openhab.seume70.10162: { SNMPv1 C=openhab { Trap(51) E:prime.2.2.1.10.8 192.168.10.102 warmStart[specific-trap(1)!=0] 4530300 E:prime.2.2.1.10.8="52" } }
i´m using coimmunity string openhab as you may see in above telegrams
forwarded telegrams can´t be dumped ...
12:30:52.739871 IP (tos 0x0, ttl 63, id 0, offset 0, flags [none], proto UDP (17), length 97)
openhab.seume70.efficient-energies.de.seume70.34630 > openhab.seume70.snmp-trap: { SNMPv1 C=openhab { Trap(53) E:prime.2.2.1.11.8 192.168.10.102 warmStart[specific-trap(1)!=0] 4555600 E:prime.2.2.1.11.8="20.0" } }
12:30:52.751321 IP (tos 0x0, ttl 63, id 0, offset 0, flags [none], proto UDP (17), length 95)
openhab.seume70.efficient-energies.de.seume70.43475 > openhab.seume70.snmp-trap: { SNMPv1 C=openhab { Trap(51) E:prime.2.2.1.10.8 192.168.10.102 warmStart[specific-trap(1)!=0] 4555600 E:prime.2.2.1.10.8="52" } }
Apr 6 12:30:52 openhab snmptrapd[2659]: 2014-04-06 12:30:52 192.168.10.102(via UDP: [10.100.1.102]:52267->[10.100.60.10]) TRAP, SNMP v1, community openhab#012#011iso.3.6.1.4.1.47.2.2.1.10.6 Warm Start Trap (1) Uptime: 12:39:16.00#012#011iso.3.6.1.4.1.47.2.2.1.10.6 = STRING: "50"
Apr 6 12:30:52 openhab snmptrapd[2659]: 2014-04-06 12:30:52 192.168.10.102(via UDP: [10.100.1.102]:34630->[10.100.60.10]) TRAP, SNMP v1, community openhab#012#011iso.3.6.1.4.1.47.2.2.1.11.8 Warm Start Trap (1) Uptime: 12:39:16.00#012#011iso.3.6.1.4.1.47.2.2.1.11.8 = STRING: "20.0"
Apr 6 12:30:52 openhab snmptrapd[2659]: 2014-04-06 12:30:52 192.168.10.102(via UDP: [10.100.1.102]:43475->[10.100.60.10]) TRAP, SNMP v1, community openhab#012#011iso.3.6.1.4.1.47.2.2.1.10.8 Warm Start Trap (1) Uptime: 12:39:16.00#012#011iso.3.6.1.4.1.47.2.2.1.10.8 = STRING: "52"
How can i debug snmp binding ? does somebody know where is the error ?
i tried with different addresses and cumunity setting in my items-file nothing in event/openhab log ...
root@openhab:/home/openhab/server/configurations/items# cat ws444pc.items
Number WS444_Sensor0_Temperatur "Sensor 0 [%.1f °C]" <temperature> (Status) { snmp="<[10.100.60.10:openhab:1.3.6.1.4.1.47.2.2.1.11.0:0]" }
Number WS444_Sensor0_Feuchte "Sensor 0 [%.1f %%]" <temperature> (Status) { snmp="<[localhost:openhab:1.3.6.1.4.1.47.2.2.1.10.0:0]" }
Number WS444_Sensor1_Temperatur "Sensor 1 [%.1f °C]" <temperature> (Status) { snmp="<[192.168.10.102:openhab:1.3.6.1.4.1.47.2.2.1.11.1:0]" }
Number WS444_Sensor1_Feuchte "Sensor 1 [%.1f %%]" <temperature> (Status) { snmp="<[10.100.1.102:openhab:1.3.6.1.4.1.47.2.2.1.10.1:0]" }
nothing snmp related in openhab.log exept:
/var/log/openhab.log [----] 0 L:[ 1+ 8 9/643] *(665 /65547b) 0049 0x031
Listening for transport dt_socket at address: 8001
12:00:08.188 INFO o.o.c.internal.CoreActivator[:61] - openHAB runtime has been started (v1.5.0).
12:00:12.236 INFO o.o.i.s.i.DiscoveryServiceImpl[:72] - mDNS service has been started
12:00:14.278 INFO o.o.io.rest.RESTApplication[:141] - Started REST API at /rest
12:00:19.377 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'demo.sitemap'
12:00:19.656 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'persistence.sitemap'
12:00:19.894 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'db4o.persist'
12:00:19.947 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'rrd4j.persist'
12:00:20.001 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'temperatur.items'
12:00:20.073 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'greent.items'
12:00:20.084 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'date.items'
12:00:20.094 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'kostal.items'
12:00:20.113 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'proplanta.items'
12:00:20.125 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'ws444pc.items'
12:00:20.207 INFO o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'gasbezug.items'
12:00:22.721 INFO o.o.u.w.i.s.WebAppServlet[:79] - Started Classic UI at /
openhab.app12:00:27.901 INFO o.o.c.s.AbstractActiveService[:169] - HTTP Refresh Service has been started
12:00:28.247 INFO o.o.b.s.internal.SnmpBinding[:402] - Didn't find SNMP timeout or configuration is invalid -> timeout set to 1500
12:00:28.248 INFO o.o.b.s.internal.SnmpBinding[:417] - Didn't find SNMP retries or configuration is invalid -> retries set to 0
12:00:28.253 INFO o.o.c.s.AbstractActiveService[:169] - SNMP Refresh Service has been started
12:00:28.295 INFO runtime.busevents[:26] - GasImpulse state updated to 0