Community Forum B.One Community Forum Zenner water meter payload

  • Zenner water meter payload

    Posted by Laxr7 on 23. February 2024 at 17:09

    Hello everyone

    Maybe one of you can help me.
    I would like to read Zenner Lora water meters into a private Lora network with a UG65.
    Item no.: ETK-MM-DN1580-LORA

    So far so good. But now I get very strange values.

    Decoder:

    /**
    * Payload Decoder for The Things Industries and similar network servers
    *
    * @product EDC Communication Module
    * @params
    * – fPort: 1
    * – bytes: Array of bytes
    */
    function Decode(fPort, bytes) {
    var decoded = {
    removal_detection: 0,
    battery_low: 0,
    battery_end_of_life: 0,
    hw_error: 0,
    coil_manipulation: 0,
    meter_values: []
    };

    if (fPort === 1) {
    // Status bytes decoding
    var statusByte = bytes[0];
    decoded.removal_detection = (statusByte & 0x01) ? 1 : 0;
    decoded.battery_low = (statusByte & 0x02) ? 1 : 0;
    decoded.battery_end_of_life = (statusByte & 0x04) ? 1 : 0;
    decoded.hw_error = (statusByte & 0x08) ? 1 : 0;
    decoded.coil_manipulation = (statusByte & 0x10) ? 1 : 0;

    // Meter values ​​decoding
    for (var i = 1; i< bytes.length; i += 4) {
    // Assuming meter values ​​are 32-bit unsigned integers
    var meterValue = (bytes[i] << 24) | (bytes[i+1] << 16) | (bytes[i+2] << 8) | bytes[i+3] ;
    decoded.meter_values.push(meterValue);
    }
    }

    return decoded;
    }

    ————–
    Now I get the following in response:

    Power

    Payload(b64)
    kiUgAgICAAEQAAWq5i4CAAA=

    Payload(hex)
    9225200202020001100005aae62e020000

    <div>and:
    </div>

    {
      "battery_end_of_life": 0,
      "battery_low": 1,
      "coil_manipulation": 1,
      "hw_error": 0,
      "meter_values": [
        622854658,
        33554704,
        371430,
        771883008
      ],
      "removal_detection": 0
    }

     

    Can someone tell me where the measured value is hidden? Or how do I have to convert what?

    <div> 😅< /div>

     

     

    Many thanks and greetings to you

    Laxr7 replied 1 month, 2 weeks ago 2 Members · 4 Replies
  • 4 Replies
  • Laxr7

    Member
    23. February 2024 at 17:30

    Here is a clearer overview of the payload

  • Community-Admin

    Administrator
    1. March 2024 at 13:34

    Hello @Laxr7,

    As you have unfortunately not yet received any feedback on this enquiry here in the forum, we would like to do so. As it turns out, you have already received the documents you need from your colleagues at ZENNER Support 🙂 We hope this helped you and that you were able to integrate the meters into the other network?

    Best regards!

    • Laxr7

      Member
      1. March 2024 at 13:54

      @Community

      Thank you very much, 🙏 yes, I received the documents and am already working on it.

      Wish you a nice weekend already

       

      Kind regards 🙏😄

    • Community-Admin

      Administrator
      8. March 2024 at 17:15

      Very good, then we wish you continued success with the information you received and a nice weekend too! 🙂

      Best regards

Log in to reply.