Based on my MyPIR project with a Particle Photon, I copied it here with the components from a relay instead of MOSFETs.
Songle SRD-05VDC-SL-C Relay with 3 PINS
Except for the audible click of the circuit of the relay, it is easy to upgrade already existing and cheap LED sets (IR remote controller, LED strip and power supply) into the IoT world with an upgrade.
2 circuits are separated from each other: with 5V the Particle Photon receives commands and uses the light sensor and the PIR receiver to trigger the relay. The relay then connects the 12V circuit of the LED kit and switches the light on and off again after an adjustable time.
IR Controller and USB Adapter female
Temperature and Humidity
In addition, the temperature and humidity at the installation site are recorded as an option and transferred to your smartphone via Blync service.
If you do not want to stand up to switch the relay on and off with a button, you can also use your smartphone here.
Put the LED on/off from your Smartphone
For my motivation and my application scenario, please read the photon project.
I wish lots of success and a lot of light in dark corners!