I’m running OH2.3 and I have the SNMP binding installed and working, and I’m starting to play with getting some items set up to monitor a few things on my network. However, I’m having issues with data types. If an item returns an integer or string, I’m fine - I just use number or string and I’m off. However, several things I’ve looked at have data types other than integer or string, specifically:
Counter32 - just a large integer (0 to 4294967295)
Hex-STRING - two digit hex string - 00 through ff although I’ve only seen numbers in testing with my device
Timeticks - non-negative integer (range is 0 to 2e32 - 1) - this is going to be the hardest to deal with as it’s designed to show a time duration in mS
With these, if I use number, I get “NULL” when displaying in my test page within habpanel. If I set them to string, I get “Null” when displaying in habpanel. The all caps version is consistent with something completely wrong with an item, IE not set up correctly. The “Null” makes me think it’s atleast trying, but can’t handle the data for some reason. Anyone have a solution/work-around for this?
I’m using snmpwalk on the same linux box as OH is installed on for testing, and it sees the data fine. Here’s a couple things I’m looking at:
danny@Server-Linux18:~$ snmpwalk -v1 -c string 192.168.xxx.xxx 1.3.6.1.4.1.41112.1.6.2.1.1.6
iso.3.6.1.4.1.41112.1.6.2.1.1.6.1 = Counter32: 3559486313
danny@Server-Linux18:~$
danny@Server-Linux18:~$ snmpwalk -v1 -c string 192.168.xxx.xxx 1.3.6.1.2.1.1.3
iso.3.6.1.2.1.1.3.0 = Timeticks: (743893) 2:03:58.93
danny@Server-Linux18:~$
danny@Server-Linux18:~$ snmpwalk -v1 -c string 192.168.xxx.xxx 1.3.6.1.4.1.11.2.3.9.4.2.3.3.5.1.2
iso.3.6.1.4.1.11.2.3.9.4.2.3.3.5.1.2.1 = Hex-STRING: 80
danny@Server-Linux18:~$
Additionally, I have a question about the SNMP binding information located at:
In the GET, it lists an “update” field. Most examples I’ve seen have it at 10000. What is this value exactly? I’m guessing it’s the time between polls in mS (so 10000 would be 10 sec), but I haven’t seen anything that actually says what it is…
Thanks,
Danny