I used the etekcity outlets here-
(ended up not combining it with a PIR sensor)
with instructions from here-
https://www.samkear.com/hardware/contro ... spberry-pi
If you read the whole article, you'll see that there is an included web page for turning on/off the outlets...it's basic but works.
it continues to work OK since then. It is controlled by a Pi Zero but I found if that Zero is multi-tasking with other stuff hanging off it that require power, then make sure you are using a "robust" power supply.