Then buy commerical modules that do that.
If you want to learn electronics you have to start at the basics. Resistors capacitors inductors, the true meaning of what AC and DC mean. Transformers, diodes, transistors, opamps etc...
Even basic timers and sensors make people scared when they relize the complexity of the systems required to actually make it work well in a real world situation.
The only 'shortcuts' of understanding in electronics are Integrated circuits and those add an entire other universe of complexity to the situation even aside from the 'basics'