Find timerange based on the change of a value

Hi Anaisdg,

it didn’t really help me. I invested a lot of time to get flux running and I did get results like telling me the level change from on to off or from off to on, but as soon as I set the state change from any to any it fails .The expected result would be the start and end timestamp after the state change happens. So I’m looking at a machine that is turnedeither on or off during the day and I need that start and stop timestamp of the “off” durations to use that in another query.

In a seperate query I want to calculate information based on the timerange that I’m trying to get from the above query.

Is something like that possible ?

Thanks, Sven