I still use webCoRE for all my logic… In that case, you could have one command sent when his PC is turned on, and another when he shuts down. Let webCoRE keep track by way of a variable, and then at your designated time, simply check to see the state of the variable. This is much easier coding than if you want to send a query to his machine, wait for a response, and then do something.
Sample code to get you started:
The main code back to webCoRE are the lines starting with “WC - PC is currently”
(Both are found by right clicking > Add action > EventGhost > Python Command)
WC - PC is currently (turned ON)
import urllib; urllib.urlopen('https://api.smartthings.com/api/token/123abc/smartapps/installations/456def/execute/:789ghi:?PcLocked=false&PcOff=false')
WC - PC is currently (turned OFF)
import urllib; urllib.urlopen('https://api.smartthings.com/api/token/123abc/smartapps/installations/456def/execute/:789ghi:?PcLocked=true&PcOff=true')
They both point to the same piston, but use different arguments, so different portions of the piston run depending on the circumstances.
You may want to hide the EG icon in his tray, because if he manually exits the app, it will send the OFF command to webCoRE (thereby defeating your monitoring)