SpaceLogic KNX Forum
Schneider Electric SpaceLogic KNX forum to get support and share knowledge including selection, installation and troubleshooting for spaceLYnk, Wiser for KNX, eConfigure KNX, SpaceLogic KNX Hybrid module and other topics.
Link copied. Please paste this link to share this article on your social media post.
Hello
I have a UPS support SNMP and I need to connect with SL.
Could you share an example?
Link copied. Please paste this link to share this article on your social media post.
This is officially not supported, however it can be done if you have the libnetsnmp and luasnmp packages installed
Run as resident at 0 sec:
os.sleep(1)
if not devices then
require('snmp')
devices = {
{
ip = '192.168.1.1',
port = 161,
mapping = {
{ oid = '1.3.6.1.4.1.14988.1.1.3.8.0', addr = '32/0/0' },
{ oid = '1.3.6.1.4.1.14988.1.1.3.10.0', addr = '32/0/1' },
}
},
{
ip = '192.168.1.2',
mapping = {
{ oid = '1.3.6.1.4.1.14988.1.1.3.8.0', addr = '32/0/3' },
{ oid = '1.3.6.1.4.1.14988.1.1.3.10.0', addr = '32/0/4' },
}
},
{
ip = '192.168.1.3',
mapping = {
{ oid = '1.3.6.1.4.1.14988.1.1.3.8.0', addr = '32/0/5' },
{ oid = '1.3.6.1.4.1.14988.1.1.3.10.0', addr = '32/0/6' },
}
},
{
ip = '192.168.1.4',
mapping = {
{ oid = '1.3.6.1.4.1.14988.1.1.3.8.0', addr = '32/0/7' },
{ oid = '1.3.6.1.4.1.14988.1.1.3.10.0', addr = '32/0/8' },
}
},
}
end
for _, dev in ipairs(devices) do
local conn, err = snmp.open({
version = snmp.SNMPv1,
community = 'public',
port = dev.port or 161,
peer = dev.ip,
})
if conn then
for _, map in ipairs(dev.mapping) do
local res, err = conn:get(map.oid)
if res and res.value ~= nil then
grp.checkwrite(map.addr, res.value)
else
alert('SNMP read from %s %s failed (%s)', dev.ip, map.oid, tostring(err))
end
end
else
alert('SNMP connection to %s failed (%s)', dev.ip, tostring(err))
end
end
Link copied. Please paste this link to share this article on your social media post.
This is officially not supported, however it can be done if you have the libnetsnmp and luasnmp packages installed
Run as resident at 0 sec:
os.sleep(1)
if not devices then
require('snmp')
devices = {
{
ip = '192.168.1.1',
port = 161,
mapping = {
{ oid = '1.3.6.1.4.1.14988.1.1.3.8.0', addr = '32/0/0' },
{ oid = '1.3.6.1.4.1.14988.1.1.3.10.0', addr = '32/0/1' },
}
},
{
ip = '192.168.1.2',
mapping = {
{ oid = '1.3.6.1.4.1.14988.1.1.3.8.0', addr = '32/0/3' },
{ oid = '1.3.6.1.4.1.14988.1.1.3.10.0', addr = '32/0/4' },
}
},
{
ip = '192.168.1.3',
mapping = {
{ oid = '1.3.6.1.4.1.14988.1.1.3.8.0', addr = '32/0/5' },
{ oid = '1.3.6.1.4.1.14988.1.1.3.10.0', addr = '32/0/6' },
}
},
{
ip = '192.168.1.4',
mapping = {
{ oid = '1.3.6.1.4.1.14988.1.1.3.8.0', addr = '32/0/7' },
{ oid = '1.3.6.1.4.1.14988.1.1.3.10.0', addr = '32/0/8' },
}
},
}
end
for _, dev in ipairs(devices) do
local conn, err = snmp.open({
version = snmp.SNMPv1,
community = 'public',
port = dev.port or 161,
peer = dev.ip,
})
if conn then
for _, map in ipairs(dev.mapping) do
local res, err = conn:get(map.oid)
if res and res.value ~= nil then
grp.checkwrite(map.addr, res.value)
else
alert('SNMP read from %s %s failed (%s)', dev.ip, map.oid, tostring(err))
end
end
else
alert('SNMP connection to %s failed (%s)', dev.ip, tostring(err))
end
end
Link copied. Please paste this link to share this article on your social media post.
Thanks @Erwin-vd-Zwart
Do you plan to support it officially?
If I want to change the version, I just should change it from here:
version = snmp.SNMPv1,
Link copied. Please paste this link to share this article on your social media post.
No we will not support it officially, the typical market for this kind of solutions is BMS, and the we have an official supported SmartConnector for SNMP traps, so that is our preferred solution.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.