10.07.2019, 21:07
Hello forum partners. Now I have two devices. The first is a projector which has an SNMP communication and I want to turn on and off, change the video input for which I have to write a value in the respective OIDs. I tested the projector both by writing and reading the SNMP variables by means of an SNMP management software and it works without any problem, but with the LM I have made a script by event to turn it on, but it does not work for me. On the other hand I have a team that uses SNMP Version 3 which replaces the community by user name, an authentication code, a privacy code and the protocol of these (MD5, SHA, DES, AES) which is not compatible with the current code, in addition to having some Tramps which I have to be aware of and I do not know how to do it, so if they have any way of doing it, it would be very helpful. I include the code I did to write about an SNMP OID, which does not work for me. Thank you and I am attentive to your comments.
Code:
val=event.getvalue()
--Abrir una sesión con snmp
require "snmp"
ups1, err = snmp.open{
version = snmp.SNMPv1,
community = "public",
port = 161,
peer = "192.168.0.243",
}
assert(ups1, err)
if value==true then
vbind, err = ups1:set("1.3.6.1.4.1.1248.4.1.1.2.1.0", 1)
else
vbind, err = ups1:set("1.3.6.1.4.1.1248.4.1.1.2.1.0", 0)
end
ups1:close()