diff --git a/io/snmp/README.md b/io/snmp/README.md index 41e26cd7..7dd5062d 100644 --- a/io/snmp/README.md +++ b/io/snmp/README.md @@ -9,6 +9,9 @@ fetch values from SNMP enabled hosts. Supports v1, v2c and v3. * SNMP table - Simple SNMP oid table fetcher * SNMP walker - Simple SNMP oid walker fetcher +## v2 Breaking Change +v2 has a breaking change in that the single snmp node no longer tries to stringify an octet string type (04). This makes it consistent with the other nodes in this bundle. this means the user now has to convert to a string if required but has better control of how they wish to do that. + Install ------- diff --git a/io/snmp/package.json b/io/snmp/package.json index 3df8a7cf..e64f3ec0 100644 --- a/io/snmp/package.json +++ b/io/snmp/package.json @@ -1,9 +1,9 @@ { "name" : "node-red-node-snmp", - "version" : "1.0.6", + "version" : "2.0.0", "description" : "A Node-RED node that gets and sets SNMP oid values. Supports v1, v2c and v3", "dependencies" : { - "net-snmp" : "^3.8.2" + "net-snmp" : "^3.9.0" }, "repository" : { "type":"git", diff --git a/io/snmp/snmp.js b/io/snmp/snmp.js index 22549fb5..3853e5fa 100644 --- a/io/snmp/snmp.js +++ b/io/snmp/snmp.js @@ -253,9 +253,9 @@ module.exports = function (RED) { node.error(SNMP.varbindError(vb), msg); vb._error = SNMP.varbindError(vb); //add _error to msg so users can determine the varbind is not valid } - else { - if (vb.type == 4) { vb.value = vb.value.toString(); } - } + // else { + // if (vb.type == 4) { vb.value = vb.value.toString(); } + // } vb.tstr = SNMP.ObjectType[vb.type]; } msg.payload = varbinds;