Community Forum B.One Community Forum Zenner Wasserzähler Payload

  • Zenner Wasserzähler Payload

    Erstellt von Laxr7 am 23. Februar 2024 um 17:09 Uhr

    Hallo Zusammen

    Eventuell kann mir jemand von euch weiterhelfen.
    Ich möchte gerne Zenner Lora Wasserzähler in ein pivat Lora Network mit einem UG65 einlesen.
    Artikel-Nr.: ETK-MM-DN1580-LORA

    Soweit so gut. Nun erhalte ich aber sehr komische Werte.

    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;
    }

    ————–
    Nun erhalte ich folgendes als Antwort:

    Power

    Payload(b64)
    kiUgAgICAAEQAAWq5i4CAAA=

    Payload(hex)
    9225200202020001100005aae62e020000

    <div>und:
    </div>

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

    Kann mir jemand sagen wo sich der Messwert versteckt? Oder wie ich was umrechnen muss?

    <div>😅 </div>

    Vielen Dank und Grüsse an euch

    Laxr7 antwortete 5 Stunden, 41 Minuten zuvor 5 Mitglieder · 11 Antworten
  • 11 Antworten
  • Laxr7

    Mitglied
    23. Februar 2024 um 17:30 Uhr

    Hier noch der Payload etwas übersichtlicher

  • Community Admin

    Administrator
    1. März 2024 um 13:34 Uhr

    Hallo @Laxr7 ,

    da du hier im Forum leider noch keine Rückmeldung bekommen hast zu dieser Anfrage, wollten wir dies einmal noch gerne tun. Wie sich ergeben hat, hast du ja die benötigten Dokumente inzwischen bereits von den Kollegen des ZENNER Supports erhalten🙂. Wir hoffen, dass dir damit geholfen wurde und du die Zähler in das andere Netzwerk einbinden konntest?

    Herzliche Grüße!

    • Laxr7

      Mitglied
      1. März 2024 um 13:54 Uhr

      @Community-Admin

      Besten Dank, 🙏 ja habe die Dokumente erhalten und bin bereits dran.

      Wünsche bereits ein schönes Wochenende

      Freundliche Grüsse 🙏😄

      • Community Admin

        Administrator
        8. März 2024 um 17:15 Uhr

        Sehr gut, dann wünschen wir dir weiterhin gutes Gelingen mit den erhaltenen Informationen und ebenfalls ein schönes Wochenende! 🙂

        Herzliche Grüße

  • DEMCAK

    Mitglied
    13. Mai 2024 um 15:16 Uhr

    Hi do you had any luck with creation of payload decoder?

    Im looking for it also.

    Can you help me?

    Thank you

    • Laxr7

      Mitglied
      5. Juni 2024 um 11:08 Uhr

      Hi,

      yes it worked. why don’t you write me a PM

      peace🙏

      • DEMCAK

        Mitglied
        17. Oktober 2024 um 14:09 Uhr

        function decodeUplink(input) {

        var bytes = input.bytes;

        var status = bytes[0]; // Assuming the first byte contains the status summary bits

        var data = {

        removal_detection: (status & 0x01) >> 0,

        battery_low: (status & 0x02) >> 1,

        battery_end_of_life: (status & 0x04) >> 2,

        hw_error: (status & 0x08) >> 3,

        currently_unused: (status & 0x10) >> 4,

        coil_manipulation: (status & 0x20) >> 5,

        transceiver_monitoring_flag1: (status & 0x40) >> 6,

        transceiver_monitoring_flag2: (status & 0x80) >> 7,

        // … other status bits

        };

        // Assuming the next bytes contain meter values in SP12 format

        var meterValues = [];

        for (var i = 1; i < bytes.length; i += 4) {

        // Day value (4 bytes) assuming little-endian

        var meterValue = bytes[1] + (bytes[2] << 8) + (bytes[3] << 16) + (bytes[4] << 24);

        meterValues.push(meterValue);

        }

        data.meter_values = meterValues;

        return {

        data: data,

        };

        }

  • Balle-Larsen

    Mitglied
    2. September 2025 um 16:36 Uhr

    Hello Laxr7 & community,

    I am trying to the same thing as you did.
    I am using a Mikrotik LR8 and a Zenner IUWS v1.8.5
    The IUWS is sitting on the table, so it shows dry_pipe, and zero water volume.

    I have the join and accept part in place, I have the decrypt key and I receive the up-payload.

    I can’t decode pipe_dry correctly with the decoder shown, or other decoders for that matter…
    I guess there are other differencies on the IUWS model, so are there more documentation than the Radio_communication-scenario-list-IUW_IUWS.pdf show.
    It is not giving the full dataframe schema…
    Or even better, is there a decoder for the IUWS cold water meter?

    Kind regards,
    Balle-Larsen

    • Community Admin

      Administrator
      19. September 2025 um 20:38 Uhr

      Hello @Balle-Larsen , perhaps @Laxr7 still has some helpful information for you based on his experience (if you haven’t already been in contact with him directly). Otherwise, we can also recommend that you contact ZENNER Support at support@zenner.com. They will certainly be able to help you further, possibly with additional relevant documents.

      Warm regards!

  • greedy

    Mitglied
    25. September 2025 um 10:47 Uhr

    Hello,

    I’m alos trying to integrate water meter Zenner, model IUWS DN15 R500 FK into my gateway and i want to ask where do you get the documentation for the payload codec or a codec from? (i think all zenner water meter IUWS use the same codec)

    Can anyone help me with this?

    Thank you.

    • Community Admin

      Administrator
      25. September 2025 um 11:27 Uhr

      Hi @greedy , the best way as mentioned before should be to directly contact the ZENNER Support at support@zenner.com. They can give you all available documents for that.

      Warm regards 🙋‍♂️

Log in to reply.