How to SNMP bind Denkovi devices

Hi Friends.
I’m trying to interface a relay board from Denkovi via snmpget/snmpset

I can do the job running shell commands like following but I’ve found no exemples about how to do the same in openHAB.
Here are one snmpget and one snmp set exemples.
As you can see there is a ‘-c 000000000000’ in the snmp get and a ’ i 1’ ant the end of the snmpset.
I don’t know how to represent this in a openHAB item.

thanks for your help.
Ciao.
Marco

Get P5.8 - This will read digital output P5.8 level
snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.8.0

Set P5.8 - This will set pin 1 from digital output port P5 in ‘1’ (High level)
snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.8.0 i 1

Here is the full manual of this device.

I’m not an expert but if you throw the below items in an item file it should work for you.

Number pctrlP5pin8_level  "any label"  {snmp="<[172.16.100.2:000000000000:.1.3.6.1.4.1.19865.1.2.2.8.0:10000]"}


Switch pctrlP5pin8  "Any Label"  {snmp=">[ON:172.16.100.2:private:.1.3.6.1.4.1.19865.1.2.2.8.0:1] >[OFF:172.16.100.2:private:.1.3.6.1.4.1.19865.1.2.2.8.0:0]"}

In theory, based on the wiki this should work also. I’m guessing it would also update the switch item.

Switch pctrlP5pin8 “Any Label” {snmp="<[172.16.100.2:private:.1.3.6.1.4.1.19865.1.2.2.8.0:10000] >[ON:172.16.100.2:private:.1.3.6.1.4.1.19865.1.2.2.8.0:1] >[OFF:172.16.100.2:private:.1.3.6.1.4.1.19865.1.2.2.8.0:0]"}

1 Like

BTW - The wiki for the SNMP binding. https://github.com/openhab/openhab/wiki/Snmp-Binding

Thanks Kerwin
It is working like a charm
Here is what I put in the Items file.

Thanks a lot!!!

Switch Pump1 “Pump1 [%d]” {snmp="<[172.16.100.4:000000000000:.1.3.6.1.4.1.19865.1.2.2.1.0:10000] >[ON:172.16.100.4:private:.1.3.6.1.4.1.19865.1.2.2.1.0:1] >[OFF:172.16.100.4:private:.1.3.6.1.4.1.19865.1.2.2.1.0:0]"}
Switch Pump8 “Pump8 [%d]” {snmp="<[172.16.100.4:000000000000:.1.3.6.1.4.1.19865.1.2.2.8.0:10000] >[ON:172.16.100.4:private:.1.3.6.1.4.1.19865.1.2.2.8.0:1] >[OFF:172.16.100.4:private:.1.3.6.1.4.1.19865.1.2.2.8.0:0]"}

Hi @Marcotglb
How is the Denkovi working for you now after allmost a year? Is it stable and no problems? I am planing to use one unit in my openHAB

Vegard,
currenlty I’m not using the Denkovi board with OpenHab.
But I can say I’m using 4 Denkovi boards with a java application that
drives them the same way and I had no problems in 3 years working.

ciao

Nice, thanks for the feeback. I’ll tink i am going to order one now.

Hi Vegard, what’s your experience using the Denkovi board with OpenHAB? I’m about to order one as well.

Hi Mariobrx

I did not by the Denkovi, but i do not remember why. I ended upp with a dS2824 board instead.
This is working perfect with modbus tcp/ip.

http://www.robot-electronics.co.uk/ds2824-24-x-16a-ethernet-relay.html