To set up a virtual contact sensor or a virtual presence sensor use TAustin's vEdge Creator, (a virtual device generator for end users). The SmartThings Community page provides information and tips for installing the vEdge Creator utility. It can be sourced via the SmartThings vEdge Creator link
To setup the vEdge Creator utility take the following steps: