SNMP 2.x issue

Something is wrong with the channel config. I‘ll check what the problem is.

Ok. Easy. UNDEF is not a valid hexadecimal string, so the conversion fails. What do you want to achieve by setting “Off-value” to UNDEF?

I thought I needed to specify the value as UNDEF, should it instead be left blank for the exception value to override when it fails to find the OID?

Also with the release of M3, is it easier to troubleshooting this on M2 or M3?

It‘s not mandatory to define a OFF value. If it‘s either a value for ON and not existing otherwise overriding exception is enough.

Since you are using a customized bundle anyway M2 or M3 makes no difference.

Alright so removing all the channels and setting them back up without a value for the OFF state now results in all of the items providing a state of OFF. I can pull the hex values on the test system with a snmpwalk so I know which item to be looking at, but it remains stuck in a state of OFF.

Some of the variations of the hex string have been with periods, colons, slashes, no spaces; some provided “illegal value configuration for channel” at the WARN level.
Unsure if I’m doing something dumb again? :wink:

Disregard most of the above, it seems after I roamed between APs the values were picked up and I have an ON state on one of the APs. I’ll let it simmer for a bit and look through the even logs to verify if it is flipping all of the items!

1 Like

@J-N-K Hi

It is possible to create binding with following rules?
-one thing with two community like community_read=‘public’ and community_write=‘private’

currently i created two things one for read second for write but since they used equal ip addresses configuration I am receiving errors with timeout

Why would you want to do that? I can‘t see why someone with write-access to a device should not have read-access. So a read-only Community and a read/write Community should be defined on the device and you should use the read/write community for OH.

Please better articulate your use case and perhaps we can help you

@J-N-K@ @Andrew_Rowe

I have UPS device with hard coded community values …
Most of READ operations use PUBLIC community…
but for changing UPS output ports (switching off connected devices) I need use PRIVATE community (WRITE)
so for the same OID I need use TWO communities…(PRIVATE community cannot read values)

BTW: It was possible with SNMP binding 1.x…

Why can’t you use the private SNMP community to read and write, while I’m not well versed in all SNMP devices in the world; I have never come across one that refuses to read an OID value using a single community.

What hardware are you working with, and what are you trying to accomplish?

Sorry, that implementation is bullsh*t. Communities have been introduced to provide security (even if that is not at a very high level). Hardcoding them is totally contradicting that and having one community for read and one for write is even more ridiculous. I’ll not implement workarounds for faulty software.

Thank you for your “help”, switching back to binding “1.x” since there was options to use different communities and protocol versions

@Roberto2, just simply create another “SNMP Target” thing for the same device/IP address, where you can specify different community and version. Then create channels for your PRIVATE values. (I tried to create it and OH allowed me to do it).
Yes, you will have two things created for the same device, but it is invisible from the sitemap viewpoint.

In regards what @anonymous.one was trying to achieve in this threat:
I am using Aruba Instant AP. I have the same behaviour, where there is a valid OID when a device is associated with the AP and after disassociating the OID does not exist. I can read IP address, MAC address, device name, etc. for each connected device from the OID table.

I followed the documentation for SNMP Binding but after many hours of troubleshooting reading of the SNMP values did not work. After reading this threat I did the following:

  • I removed the SNMP thing from the xyz.things file
  • I created the “SNMP Target” thing in the PaperUI: Configuration -> Things -> + (with SNMP version and community)
  • I created channels within the thing. I used datatype of “IP address”. I used decimal format of an IP (X.X.X.X) and there was no need for map transformation to hexadecimal format.
    note: I created MAC address allocation for the devices, but I could use MAC address OID without IP allocation.
  • I updated the xyz.items file with the newly generated thing name and channels
  • Binding started to work flawlesly.

Thank you @J-N-K for your work and @anonymous.one for the information exchange.

2 Likes

Never a problem, whole point is to share information and provide ways to help one another as there is no one size that fits all for home automation. :wink: Glad the info helped you migrate to the 2.x binding.

1 Like