• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Calculating energy consumption for off-peak hour, peak hour, today, yesterday, current month and previous month

    How-To
    4
    7
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ramhuzainiR
      ramhuzaini
      last edited by

      Hi there,

      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.

      best regards
      Ramhuzaini

      1 Reply Last reply Reply Quote 0
      • G
        Gordoe
        last edited by

        Is your kWh energy consumption accumulating or is it interval data. You'll want to take a look at the Metadata Datasource.

        MattFoxM 1 Reply Last reply Reply Quote 0
        • MattFoxM
          MattFox @Gordoe
          last edited by

          Expanding on what Gordoe set, look at mango javascript under the help. You will want to pull by certain time frames. To make things easier, use the momentJS library stored in a global variable to help configure your times.
          You will want to look at the pointValuesBetween method. You can also perform rollup queries if desired.

          Fox

          Do not follow where the path may lead; go instead where there is no path.
          And leave a trail - Muriel Strode

          ramhuzainiR 1 Reply Last reply Reply Quote 0
          • ramhuzainiR
            ramhuzaini
            last edited by

            Hi Gordoe,
            The energy consumption in accumulating form

            1 Reply Last reply Reply Quote 0
            • ramhuzainiR
              ramhuzaini @MattFox
              last edited by

              Thanks @mattfox for the information. I will try to explore the things you said.

              1 Reply Last reply Reply Quote 0
              • C
                cooldjmc
                last edited by

                @mattfox
                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.
                Thank you.

                1 Reply Last reply Reply Quote 0
                • MattFoxM
                  MattFox
                  last edited by MattFox

                  var pointValues = myContextPoint.getPointValuesBetween(fromTimestampInMilliseconds,toTimestampInMilliseconds);
                  print(pointValues);
                  

                  Fox

                  Do not follow where the path may lead; go instead where there is no path.
                  And leave a trail - Muriel Strode

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post