Change the status of a contact item

Hello,

Please let me know if is possible to change the status of a contact item by using a script/rule…

Thank you,
Marian

It is possible…

Thank you,

I implement this item/rule and is not working:
Contact OUT1 “OUT1 [%s]” { zwave=“13:1:command=SENSOR_BINARY,respond_to_basic=TRUE” }
Contact OUT2 “OUT2 [%s]” { zwave=“13:2:command=SENSOR_BINARY,respond_to_basic=TRUE” }

rule "test"
When
item LED8 changed
then

if(LED8.state == ON ) {
OUT1.sendCommand(CLOSED);
OUT2.sendCommand(CLOSED);
}
else
{
OUT1.sendCommand(OPEN);
OUT2.sendCommand(OPEN);
}

Please let me know what is wrong… I want indirectly to control OUT1 and OUT2 when the switch item (LED8) is press.

Thank you,
Marian

I don’t think you can send a command to a zwave sensor device. You can use postUpdate and that will change the state of the Contacts internal to OH.