This is the one piece that I was really missing form Octoprint. The plugin that handled the TPLink wifi smart plug that my printer is connected to. In order to make this work, we need to use two GitHub Repos.
Get the IP of your smart plug
First, we are going to need to find the IP of your TP Link smart plug. The easiest way is to use the Fing app
Before you plug your smart plug to the wall, do a first scan of your network with Fing. Then plug it into the wall, wait for it to turn on and connect and scan again. the extra IP that pops up is your plug! Note that IP for later...
#[power]
#devices: printer, led
#printer_name: My Printer Name here
#printer_pin: 4
#printer_active_low: false
#led_name: Auto Shutdown
#led_pin: 5
#led_active_low: false