Musson Industrial's Embr-SNMP Module (BETA)

So, I finally got back home and some time to play with this again.
Running v0.4.1 and I'm still getting the PDU encoding too big warning when trying to enable some tags (both integers and strings).

You made it sound like maybe the OID tree should be browsable now in the quick client, but I only show the diagnostics folder with Address, Connected, and Status tags.

Tried it with a Cisco, MikroTik, and opnSense. (all 3 only show those 3 diagnostics tags, but only testing the strings with the Cisco right now).

1 Like

It’s got to be this beta, it’s not merged yet.

Working really well now. I have one string on the Cisco that if I put it in the same tag group as the others, it breaks all of them, but that's not a huge deal. Great work otherwise!!

The OPC quick client with this Cisco is virtually unusable though due to the sheer amount of OIDs it has. Not sure if it's possible to represent them as a structured tree that can be dynamically built so you can drill down into it rather than representing as one long list?

It's the identity OID of 1.3.6.1.2.1.1.1.0
Using your diagnostics, it shows it's a datatype of OctetString with an expected size of 256. String itself is 253 characters when read.

3 Likes

:tada:

I’m open to this, but my concern is that the tree would be super deep. Maybe some type of collapsed tree, where nodes with only one child are merged? I’m open to really any suggestions.

Cool this gives me something to go on, thanks.

Yeah, that's probably better because otherwise there are many instances where you'd drill down several levels before anything relevant is listed.

Will you be adding support for MIB file upload or auto walking when opening the device in the opc tag browser?

1 Like

I would encourage you to add a request to the github page for this, with specifics on what you envision for this functionality, as well as how you think it might work.

Also, given bmusson is working on this for free, sponsoring this project will give him more reasons to look into additional features.

3 Likes

At the moment, I have no immediate intentions of adding MIB device support.

Existing JVM MIB device parser libraries either:

  1. Suck.
  2. Are not licensed in a way that’s compatible with Embr.

So in order to add this feature, Embr would need its own MIB parser. While that does sound fun to write, the Effort:Result ratio is too high for me to consider it right now.

PRs are always welcome though.

I think that's why commercial SNMP module offerings end up using/buying the paid part of SNMP4J.

Maybe somebody can start throwing some tokens at the problem :upside_down_face:

2 Likes

100%

The grammar isn’t horrible, I think it’d be a viable option.

If I had to implement this feature today, I’d probably use pysmi (supports Python 2.4 - 3.7) to output JSON, then consume that.

When Fable 5 comes back:

Port this Python SNMP MIB parser to Java 17: GitHub - etingof/pysmi: SNMP MIB parser · GitHub

Check on it the next day.

If someone wants to offer that, DM me.
I’ll happily trade you some Embr license keys.

I'll give it go and let you guys know.

Okay here is it GitHub - Liam-Hendricks/JSMIparser · GitHub

1 Like

Hey @bmusson, I'm connected to a device via v2c and see it's connected and seeing these:
image

but my test tag is stuck in Uncertain_InitialValue and not sure why. I've set it to a number of OIDs, including the health check one in the device config (it's the default: 1.3.6.1.2.1.1.2.0)


(I've tried different data types too, if it matters)

I don't see any other trace or otherwise logs other than the health check ones, under the SnmpDeviceImpl logger

Edit: wait up, I've set all the other loggers to TRACE...
Nope, these just show the Diagnostics logs now too. If I try filtering the logs to "1.3.6.1.2.1.2.2.1.8.8" which i've set as the OID for one tag, there are no results

Edit2: I set the tag group the tag is using from subscribed to polled and now it's working. Is this required?

No, it should not be required.

The driver should be polling the device at the subscription rate. If there's nothing in the logs for that OID, then it probably means something is messed up with the subscription.

What version are you running?

Running the v8.3 version in your OP, 0.2.0 (b2025100601)
Ignition v8.3.7

Try this one:

It still hasn't been merged due to a lack of commitment lol.

I'll test after lunch! However, I'm using your module in this instance to prove comms because I can't get snmp working in another horrible scada platform. I've got more working in ignition with your module in 10mins than I have in 4 hrs with this other rubbish platform.. And to think it was once my favourite platform. So naive

3 Likes

I do this with SNMP and also ModbusTCP all the time, all it takes is a 2 min Docker container and a module install...