ESP-Now device using for detecting motion. Please see the following articles first:

This software is written using the same hardware. But now can handle both types.

Requires the following libraries:

WifiConfig and DebugUtils. Make sure both are installed in your Arduino Library.

Other libraries used are downloadable via the Library Manager:

ArduinoJson: https://arduinojson.org/

 

Download the source and binary here.