SNMP Set - NoSuchName


#1

I am trying to just pass a simple value across and seem to be encountering a problem.
Any suggestions on this? I have confirmed the value being set is a Unsigned32

[
{
"oid": "1.3.6.1.4.1.29956.3.1.2.1.1.6.1",
"type": "Unsigned32",
"value": "9"
}
]

I am getting an error as "NoSuchName"


#2

I have not used that node, but I wonder whether it should be
"value": 9
as "9" is a string not an Unsigned 32.
Otherwise, in a terminal run

node-red-stop
node-red-start

and post us the log up to the error message.


#3

I changed to the following and now get a different error. Notwritable
[
{
"oid": "1.3.6.1.4.1.29956.3.1.2.1.1.6.1",
"type": "Unsigned32",
"value": 1
}
]

Sorry could you put in the right direction to what you mean by terminal? Sorry I am very new to this.


#4

where are you trying to set this?
What is your flow? Are you using node-red-node-snmp?


#5

In addition to @ukmoose's questions, what computer and operating system are you running on? A terminal window is a window where you type commands (a throwback to when a computer would have a keyboard/display known as a terminals to control the computer).


#6

Yes, I am using node-red-node-snmp

here is the section of the flow using this

[{"id":"81784ec4.abcd7","type":"snmp set","z":"5da188d7.2ed1e8","host":"172.22.66.247","community":"public","version":"2c","varbinds":"[\n {\n \"oid\": \"1.3.6.1.4.1.29956.3.1.2.1.1.6.1\",\n \"type\": \"Unsigned32\",\n \"value\": \"+msg.payload+\"\n }\n]\n","timeout":"5","name":"","x":371.10004806518555,"y":818.6000995635986,"wires":[]},{"id":"b0c093e0.c6768","type":"inject","z":"5da188d7.2ed1e8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":121.10000228881836,"y":810.2000122070312,"wires":[["81784ec4.abcd7"]]},{"id":"d73aa8d9.ad0bc8","type":"ui_slider","z":"5da188d7.2ed1e8","name":"","label":"Tx Power","group":"d0e4ebb1.e3cdb8","order":0,"width":0,"height":0,"passthru":true,"topic":"","min":0,"max":10,"step":1,"x":116.10000228881836,"y":867.0000152587891,"wires":[["81784ec4.abcd7"]]},{"id":"d0e4ebb1.e3cdb8","type":"ui_group","z":"","name":"Damascus Office","tab":"c0f6b35b.322ca","order":2,"disp":true,"width":"6","collapse":false},{"id":"c0f6b35b.322ca","type":"ui_tab","z":"","name":"RADIO MONITORING (SNMP)","icon":"dashboard"}]


#7

I am using Windows 7, I tried using putty as terminal. Not sure if it needs to be SSH, and trying 127.0.0.1 port 1880 would not work with putty.


#8

How do you start node-red?


#9

I start up with node.js then just type in node-red in Windows cmd prompt.


#10

That is the terminal window.


#11


#12

If you look back I asked that you run node-red-stop then node-red-start and post the log from that point so we can see the startup messages too. It is preferable to copy/paste the text rather than an image if possible.


#13

please read How to share code or flow json and the edit the code you posted


#14

The command node-red-stop & node-red-start do not work in the cmd prompt

Here is the log on startup though.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

Z:>node-red
9 Nov 09:59:33 - [info]

Welcome to Node-RED

9 Nov 09:59:33 - [info] Node-RED version: v0.19.4
9 Nov 09:59:33 - [info] Node.js version: v8.12.0
9 Nov 09:59:33 - [info] Windows_NT 6.1.7601 x64 LE
9 Nov 09:59:36 - [info] Loading palette nodes
9 Nov 09:59:42 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
9 Nov 09:59:47 - [info] Dashboard version 2.8.1 started at /ui
9 Nov 09:59:47 - [warn] ------------------------------------------------------
9 Nov 09:59:47 - [warn] [node-red/tail] Not currently supported on Windows.
9 Nov 09:59:47 - [warn] ------------------------------------------------------
9 Nov 09:59:47 - [info] Settings file : C:\Users\hugginsj.node-red\settings.js

9 Nov 09:59:47 - [info] Context store : 'default' [module=memory]
9 Nov 09:59:47 - [info] User directory : C:\Users\hugginsj.node-red
9 Nov 09:59:47 - [warn] Projects disabled : set editorTheme.projects.enabled=tru
e to enable
9 Nov 09:59:47 - [info] Flows file : C:\Users\hugginsj.node-red\flows_5CG73
847NH.json
9 Nov 09:59:47 - [warn]


Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

9 Nov 09:59:47 - [info] Starting flows
9 Nov 09:59:47 - [info] Started flows
9 Nov 09:59:47 - [info] Server now running at http://127.0.0.1:1880/


#15

OK, perhaps those don't work on Windows. I don't know.

Have you tried doing a get on that object? If that works ok then perhaps you do not have write access to the object.


#16

I have been able to GET values with no problem and when I walk the MIB file it shows read-write for that value. That is something to consider though, I will try a couple other values to see if I am able to write to any other values. I will try some different data types as well.


#17

I notice that in the flow you posted you have an inject and a slider feeding the snmp node. What are you using for the testing?


#18

I have been using inject


#19

The inject is configured to send a timestamp, not a value, or is the value defined in the node? I don't have the node installed so I can't see what you have configured.


#20

I was under the impression the value in the code was what number the node was pushing. If that is not the case then there lies my problem. In the case of the slider, it would have to be the msg.payload from that node. For the ease of getting it to work was trying just the inject. Here is the example given in the node information. I am trying to use OID of course the OID address, the type as datatype defined in MIB file, and value is what I want set to that specific OID. Is that how you are reading this, or am I in error?

    {
        "oid":   "1.3.6.1.2.1.1.5.0",
        "type":  "OctetString",
        "value": "host1"
    },
    {   "oid":   ... }
]