Easy way to get Light duration within specified timeframe?

Hi Ben,

I think that we’ve touch this topic a while ago.
Statistics for a device

I have several bulbs connected to my webthings gateway.
I would need an information how long each bulb was turn of within specified timeframe.

I have had a python script which reads this info form webthings db and export it to external sql db, however this solution was hard to maintain if the webthings gateway was far away from me.

The question is ‘what is the easiest way to get the information about the time the bulb was turned on’