Solved.
for complete resolution i attach all settings.
Final Schema
file.things
Thing mcp23017:mcp23017:chip20 "MCP23017 chip 20" [address=20,bus=1] {
Type output_pin : output#A0 [default_state="HIGH", active_low="y"]
Type output_pin : output#A1 [default_state="HIGH", active_low="y"]
Type output_pin : output#A2 [default_state="HIGH", active_low="y"]
Type output_pin : output#A3 [default_state="HIGH", active_low="y"]
Type output_pin : output#A4 [default_state="HIGH", active_low="y"]
Type output_pin : output#A5 [default_state="HIGH", active_low="y"]
Type output_pin : output#A6 [default_state="HIGH", active_low="y"]
Type output_pin : output#A7 [default_state="HIGH", active_low="y"]
Type input_pin : input#B0 [pull_mode="PULL_UP"]
Type input_pin : input#B1 [pull_mode="PULL_UP"]
Type input_pin : input#B2 [pull_mode="PULL_UP"]
Type input_pin : input#B3 [pull_mode="PULL_UP"]
Type input_pin : input#B4 [pull_mode="PULL_UP"]
Type input_pin : input#B5 [pull_mode="PULL_UP"]
Type input_pin : input#B6 [pull_mode="PULL_UP"]
Type input_pin : input#B7 [pull_mode="PULL_UP"]
}
file.items
Contact GF_LaundryRoom_Light "Luce Lavanderia" <myfunnyicon> (GF_LaundryRoom, gLight) ["Lighting"] {channel="mcp23017:mcp23017:chip20:input#B0"} //, autoupdate="false"} //C5r8 L13
Switch GF_LaundryRoom_Pulse "Pulsante Luce Lavanderia" <wallswitch> (GF_LaundryRoom, gPulse) {channel="mcp23017:mcp23017:chip20:output#A0"}
file.rules (for latching relays)
rule "Init" //set on pulse to on after a system restart.
when
System started
then
//createTimer(now.plusSeconds(60))
gPulse.members.filter[i|i.state==NULL].forEach[j| j.sendCommand(ON)]
gPulsedim.members.filter[l|l.state==NULL].forEach[k| k.sendCommand(ON)]
end
rule "pulse gPulse group" // rule for gPulse group to release the button after push
when
Member of gPulse received command OFF
then
var pulseitem_name = triggeringItem
Thread::sleep(300)
pulseitem_name.sendCommand(ON)
end
Many Thanks to @rossko57