App Request - Switch on time counter


I am looking for an app that can tell me how long a switch has been on over the course of a few weeks.

I have a rock tumbler and would like to turn it on either at night or when I have left the house, otherwise it will be off. The first stage of tumbling requires a coarse grit and runs for about 10 days. I cant run it for 10 days straight but I can run it at various different times that accumulate to 10 days.

I am using a Leviton 15 Amp Decora Smart Plug-in Outlet -

Can anyone point me in the right direction. Is it possible to store state like this within a smart things app?

Sure. If you create a smartapp and listen to the “on” and “off” events from the outlet (from the switch capability), you can accumulate and display the elapsed time between “on” and “off” events (or time since the last “on” event, if it is still on)