I found a workaround.
Create an appliance module and assign a house and unit codes that does not belong to anything, like P1
Create a macro and Select Use Security, Set Trigger to the DS10A and select "Sensor Triggered", drag the appliance module to the workspace and select "On".
Create another macro and Select Use Security, Set Trigger to the DS10A and select "Sensor Closed", drag the appliance module to the workspace and select "Off".
Now when the window opens, you'll get - recvplc, p1, On
When the window closes, you'll get - recvplc, p1, Off
Hope this makes sense and helps someone.