Pi (or similar such as an esp8266) running something like a PIR sensor to detect room presence.
If no one detected for a period of, say 5 minutes, it sends a message to IFTTT to switch off your Tapo plug.
Could work the same for switching it on and you could limit the general timeframe it worked within…I.e. between 9am and 11pm and you could easily add a temperature sensor to limit the room temperature as well.
Total cost <£10 if you used an esp8266 (which would be my choice now.)
Tapo plugs work very well with IFTTT – I use them a lot for switching heaters on and off depending upon electricity prices.