• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. nino kurtalj

    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
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    nino kurtalj

    @nino kurtalj

    0
    Reputation
    4
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    nino kurtalj Unfollow Follow

    Latest posts made by nino kurtalj

    • Getting total kWh from W readings

      I know how to calculate the kWh delta (the energy spent during the period) using Meta Data point. What I am not sure about is how to calculate the total kWh usage, I mean accumulating reading through time periods. What I am not sure about is how to get the last current kWh state and add the kWdelta to it and save it as a new value.

      Let's assume I have values in the W.

      // getting the current and the previous readings (W + time) 
      var lastW = p.lastValue(1);
      var nowW = p.lastValue(0);
      // getting epoche period in milliseconds 
      var period = nowW.time - lastW.time;
      //getting period in seconds
      periodS = period/1000
      // getting the W readings 
      var Wnow = nowW.value;
      var Wlast = lastW.value;
      // calculating the W delta
      Wdelta = Wnow - Wlast;
      // getting periods W seconds
      Wsdelta = Wdelta*periodS
      // getting Whdelta
      Whdelta = (1/3600)*Wsdelta 
      //getting kWhdelta
      kWhdelta=(1/1000)*Whdelta
      // so how I can get the last point kWh value  
      //assuming that the metadata point variable name is "my", should I return something like my.value + kWhdelta for the new value? 
      return my.value+kWhdelta;
      
      posted in How-To
      nino kurtaljN
      nino kurtalj
    • RE: How to Calculate kWh from kW

      @JoelHaggar
      the link is not working any more

      posted in Scripting general Discussion
      nino kurtaljN
      nino kurtalj