Working calculation of energyUsageByDay/Week/Month: 

getEnergyUsageByPeriod return at most 178560 measurements.

My guess was if we are not specified the limit value in the query.
Somewhere in Building Simulator (or else) have been set limit's default
into 20 measurements per request. Therefore we got wrong return value of
this getEnergyUsageBy.. in early version.. 

Rgds,Pu