Hello, I’m trying to calculate the time when my switch was ON for the last month using data from MySQL table for specific switch. The table looks like this.
I personally use persistence with InfluxDB and it works great for this kind of stuff. The query language is perfect for time series and you can easily “downsample”, e.g. create time series in which the time interval is fixed (like every 1 hour, or every 1 day, etc…) and the measure can be avg, sum, max, …