SNMP binding not updating switch state in sitemap

when running Pi 3/openHABian 2.3

using switch.items:
Switch Pump “Pump [%s]” { snmp="<[192.168.100.93:private:1.3.6.1.4.1.318.1.1.4.4.2.1.3.6:100:MAP(APCPDUOutletState.map)] >[OFF:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.6:2] >[ON:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.6:1]" }

using tank.sitemap
sitemap tank label=“tank” {

Frame label="tank" {
	Switch item=Pump
}

}

Switch state is not pupated with current position (on/off)

Debug (repeats every 1s):
2018-05-03 10:04:26.669 [DEBUG] [ab.binding.snmp.internal.SnmpBinding] - Item ‘Pump’ is about to be refreshed

2018-05-03 10:04:26.671 [DEBUG] [ab.binding.snmp.internal.SnmpBinding] - SNMP: Send PDU 192.168.100.93/161 GET[requestID=0, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.4.1.318.1.1.4.4.2.1.3.6 = Null]]

2018-05-03 10:04:26.789 [DEBUG] [ab.binding.snmp.internal.SnmpBinding] - Received PDU from ‘192.168.100.93/161’ 'RESPONSE[requestID=670533044, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.4.1.318.1.1.4.4.2.1.3.6 = 1]

does not work on 2.2 either.

Is there a configuration change I need to make to sitemap?

sitemap does not show the current state of the switch.

Expected behavior: sitemap reflects switch state (on/off)

Thank you for looking at this!

What is the actual state of the Pump Item? Look in events.log to see if it is changing states or not.

@rikoshak Thank you for looking

yes… when I turn the pump off… the events.log does reflect the change… i.e.

2018-05-03 10:04:26.789 [DEBUG] [ab.binding.snmp.internal.SnmpBinding] - Received PDU from ‘192.168.100.93/161’ 'RESPONSE[requestID=670533044, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.4.1.318.1.1.4.4.2.1.3.6 = 2] <- THIS CHANGES TO 2 when OFF… and 1 when ON in debug.

I hope that give you more info? thank you again!

After the state changes and you confirm that the Item changed state, does the correct state show in the sitemap after a reload of the page?

Also, I am not asking about the Debug logs. I’m asking about events.log. What does events.log say about Pump when the SnmpBinding says it is changing state?

@riksohak thank you for your patience and clarification.

Sitemap switch status/indicator does not change after a reload UNLESS I toggle the switch only through sitemap…

events.log only shows entry when the swtich is toggled through sitemap… there are no entries when the state is changed UNLESS it is changed via sitemap

2018-05-03 11:39:41.919 [ome.event.ItemCommandEvent] - Item ‘Pump’ received command ON
2018-05-03 11:39:41.931 [vent.ItemStateChangedEvent] - Pump changed from OFF to ON
OFF
2018-05-03 14:09:39.288 [ome.event.ItemCommandEvent] - Item ‘Pump’ received command OFF
2018-05-03 14:09:39.319 [vent.ItemStateChangedEvent] - Pump changed from ON to OFF

I hope I’m giving the needed clarification… if not… keep poking. Thank you!

OK, then the problem is either with the binding or with your Item configuration. The DEBUG log seems to indicate that the binding is working as expected so I’ll guess the problem is with the Item.

I do not use this binding so I’ll be of limited help. But post your Item definition again, only this time use How to use code fences.

like this?

tank.items:

Switch Office_Light "Office Light [%s]"  { snmp="<[192.168.100.93:private:1.3.6.1.4.1.318.1.1.4.4.2.1.3.19:100:MAP(APCPDUOutletState.map)] >[OFF:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.19:2] >[ON:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.19:1]" }

Switch ATO "ATO [%s]"  { snmp="<[192.168.100.93:private:1.3.6.1.4.1.318.1.1.4.4.2.1.3.22:100:MAP(APCPDUOutletState.map)] >[OFF:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.22:2] >[ON:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.22:1]" }

Switch Pump "Pump [%s]"  { snmp="<[192.168.100.93:private:1.3.6.1.4.1.318.1.1.4.4.2.1.3.6:100:MAP(APCPDUOutletState.map)] >[OFF:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.6:2] >[ON:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.6:1]" }

Switch MH "MH [%s]"  { snmp="<[192.168.100.93:private:1.3.6.1.4.1.318.1.1.4.4.2.1.3.17:100:MAP(APCPDUOutletState.map)] >[OFF:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.17:2] >[ON:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.17:1]" }

Switch Vortex "Vortex (off for 20m) [%s]"  { snmp="<[192.168.100.93:private:1.3.6.1.4.1.318.1.1.4.4.2.1.3.7:100:MAP(APCPDUOutletState.map)] >[OFF:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.7:2] >[ON:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.7:1]", expire="20m,command=ON" }

Switch Water_Change "Water Change (On for 5m) [%s]"  { snmp="<[192.168.100.93:private:1.3.6.1.4.1.318.1.1.4.4.2.1.3.8:100:MAP(APCPDUOutletState.map)] >[OFF:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.8:2] >[ON:192.168.100.93:private:.1.3.6.1.4.1.318.1.1.4.4.2.1.3.8:1]", expire="5m,command=OFF"  }

tank.sitemap

sitemap tank label="tank" {

	Frame label="tank" {

		Switch item=Office_Light 
		Switch item=Pump
		Switch item=ATO
		Switch item=Vortex
		Switch item=MH
		Switch item=Water_Change
 
	}
}

another user @hypfer mentioned he had to re-compile a jar to get this working… running 2.3, i thought I’d have the latest?

Let it be known.

Installing the “MAP” transform fixes this…