Eagle-200 Local API InstantaneousDemand variable not showing negative value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gregtd
    Junior Member
    • Nov 2017
    • 3

    Eagle-200 Local API InstantaneousDemand variable not showing negative value

    I wrote a quick ruby program to retrieve the InstantaneousDemand value from the Eagle-200 Local API. It appears when the Eagle-200 is reading the meter when I'm consuming the positive value is correct. But when my solar panels are returning electricity to the grid the InstantaneousDemand value is still positive.

    Is there another variable I have to retrieve to determine the direction the electricity is flowing to/from the meter?

    I figured I ask here before I send Rainforest a Tech Support ticket.

    Thank you
    Greg
  • SunEagle
    Super Moderator
    • Oct 2012
    • 15123

    #2
    The only way to get an accurate reading of the electricity in both directions is to use 2 sets of CT's and 2 meters.

    A CT is directional and will provide false information if the flow of electricity is opposite of the direction of the "arrow" on the CT.

    The POCO's "smart" meter is designed to understand and measure the flow of electricity in either direction but they are not cheap or easy to obtain.

    Comment

    • gregtd
      Junior Member
      • Nov 2017
      • 3

      #3
      Thank you for the quick response.

      The data that is pushed from the Eagle-200 to RainForest's Cloud website shows the correct positive and negative values in their graph, see attachment. But when I view the HTTP response from the Local API access I get this output.

      <Device>
      <DeviceDetails>
      <Name>Power Meter</Name>
      <HardwareAddress>0x00135001017be412</HardwareAddress>
      <NetworkInterface>0xd8d5b9000000ee27</NetworkInterface>
      <Protocol>Zigbee</Protocol>
      <NetworkAddress>0x0000</NetworkAddress>
      <Manufacturer>Generic</Manufacturer>
      <ModelId>electric_meter</ModelId>
      <LastContact>0x5a36ded2</LastContact>
      <ConnectionStatus>Connected</ConnectionStatus>
      </DeviceDetails>
      <Components>
      <Component>
      <HardwareId></HardwareId>
      <FixedId>0</FixedId>
      <Name>Main</Name>
      <Variables>
      <Variable>
      <Name>zigbee:InstantaneousDemand</Name>
      <Value>4294966.529000 kW</Value>
      </Variable>
      </Variables>
      </Component>
      </Components>
      </Device>

      How is Rainforest Cloud's service getting the negative value?
      Attached Files

      Comment

      • sensij
        Solar Fanatic
        • Sep 2014
        • 5074

        #4
        The Eagle-200 doesn't use CT's, so no worries there. It looks like a bad hex to decimal conversion. 0xffffffff is 4294967295 for an unsigned int, or -1 for a signed int.

        To get the right negative value, you can probably subtract 4294967.295 from the value you are seeing.
        Last edited by sensij; 12-17-2017, 07:22 PM.
        CS6P-260P/SE3000 - http://tiny.cc/ed5ozx

        Comment

        • gregtd
          Junior Member
          • Nov 2017
          • 3

          #5
          Thank you, that helped out. The local value when compared to the RainForestCloud website is only off by 1Watt. For now this works!

          Comment

          • SunEagle
            Super Moderator
            • Oct 2012
            • 15123

            #6
            Originally posted by sensij
            The Eagle-200 doesn't use CT's, so no worries there. It looks like a bad hex to decimal conversion. 0xffffffff is 4294967295 for an unsigned int, or -1 for a signed int.

            To get the right negative value, you can probably subtract 4294967.295 from the value you are seeing.
            Ah. My mistake. I did not realize the Eagle 200 communicates with the POCO meter using Zigbee so no need for CT's.

            Comment

            Working...