You’re not telling us much about what your problem is.
Let’s go one step at a time.
Your Contact Item should tell you the state of the pulse relay. So poke the button on the relay to make it operate, and look for updates in the events.log
If that’s not working, you look at the hardware and biding configuration.
Okay, so your Contact is working? But you don’t like the icon?
copy some icon to icons/classic/ as myfunnyicon.svg or .png, whichever you use.
copy the “light bulb off” that you want to myfunnyicon-closed.svg / png
Update the Item to use <myfunnyicon>
Now when the Item is state CLOSED it will show the bulb off icon.
Otherwise it will show the other one.
Sometimes with small edits to Items, like icons, you will need to reboot the system to get it working right.
Okay, so no events in the events.log for your Contact Item. Did ask about this before.
I can see your ‘pulse’ Item going on and off. Is your physical step relay clonking on and off?
Meter at the input pin on your board. Does it change when the step relay is changed?
If it does, you’ll need to look more closely at the binding. I can’t help with that.
Blockquote 2019-02-12 21:36:40.488 [ERROR] [ome.core.thing.link.ThingLinkManager] - Exception occurred while informing handler: This GPIO pin [GPIO B0] does not support the pull resistance specified [down]
com.pi4j.io.gpio.exception.UnsupportedPinPullResistanceException: This GPIO pin [GPIO B0] does not support the pull resistance specified [down]
I saw too much cartoons when was child
Or probably during a sweet dream i have read PULL_DOWN.
ps.: on mcp23017 binding’s page have read OFF or PULL_UP as input. OFF equals to PULL_DOWN?
Yes. That’s because you don’t have a pull-down to make it properly 0v when the external contact is open, and the wire is just floating…
Googling tells me MCP23017 chip has no pull down feature. So you still can’t make it up.
OFF in the binding means OFF, no pull-up. Absence of pull-up is NOT a pull-down, it means no pull at all.
You can either add a physical pull-down resistor to the circuit, linking the input to 0V.
Or - this is what I would do - rewire the extra contact on the step relay to 0V instead of 5V.
Enable PULL_UP in your binding configuration.
Now when you meter, you should see 5V (from the pull-up) or 0V (from the contact) and the MCP23017 should have a changing input to pass to openHAB.
Next you need to work out if Item OPEN or CLOSED means light on or off, and fix your rules and icons to suit.
I think if you plan on using rules I’ve suggested before for controlling step relays, there is going to be a problem. You cannot send commands to an openHAB Contact type Item.
I’d try creating a new Switch type Item linked to the same channel as your Contact type. I don’t know if that will work with the MCP23017 binding, let’s find out.
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