Smartthings motion settings

Step 1:

Get ST

Step 2:

connect devices

Step 3:

Install Rule machine as it’s really one of the only smartapps you need, including the requested rules you posted, and much much more.