Creating an alert involving motion

The SmartAlarm app might do what you want: https://github.com/statusbits/smartalarm/.

Full (long) discussion here: Smart Alarm is here