<apologies if this is a repeat. my earlier reply seems to have been lost>
If I understand you correctly, you are monitoring a beehive's production by reporting its weight at 60 minute intervals. However, when maintenance is performed on the hive, e.g. adding or removing a rack, the weight measurement no longer represents the growth of the hive. Traditionally this has been handled by some type of reset switch at the hive to reset the measurement to a baseline.
I might suggest a different approach to the reset, entirely in software. At the database side, rather than tracking the total weight at each interval, track the change in weight since the last measurement. Then an unexpectedly large change can be used to note a maintenance event and that change can be ignored. The subsequent changes in weight would remain entirely relevant.