Calculating energy consumption for off-peak hour, peak hour, today, yesterday, current month and previous month
I have data point that read energy consumption (kwH) from a power meter. I would like to know how can I divide the data into off-peak hour consumption and peak-hour consumption. In addition, I would also like to calculate the total consumption for today, yesterday, current month and previous month. I am still quite new with mango. Can somebody assist me on this matter or share any link that can be helpful for solving my problem.
Is your kWh energy consumption accumulating or is it interval data. You'll want to take a look at the Metadata Datasource.
You will want to look at the pointValuesBetween method. You can also perform rollup queries if desired.
The energy consumption in accumulating form
Thanks @mattfox for the information. I will try to explore the things you said.
Hi, i'm new to Mango can you please give an example using pointValuesBetween(from, to) function for this case. I have intented to understand but without success.
var pointValues = myContextPoint.getPointValuesBetween(fromTimestampInMilliseconds,toTimestampInMilliseconds); print(pointValues);