Add watt values in a defined time

Hello everyone , I have several tp-link sockets where they are monitored regularly for current consumption. I would like to add up for example , in some sockets a consumption interval in watts, ampom : a refrigerator power outlet from 18:00 to 21:00 , having the total result of only that time of my interest . How can I do that?