MeteoRain automatic wireless rain gauge open message format

MeteoRain automatic rain gauge (pluviometer) wireless message format and its Java-Script decoder code is available as open-source because our customers have a wide range of applications for rain accumulation data.

We will still keep offering our allMETEO web portal platform as the default data solution for the MeteoRain IoT and MeteoHelix IoT weather stations. Making the MeteoRain and MeteoHelix message formats open and public will enable 3rd parties to build their own software applications and mobile apps as they see fit.

MeteoRain rain gauges are available in variants which meet the World Meteorological Organization (WMO) measurement precision standards for climatology and meteorology and also in cost sensitive variants to meet the demands of agriculture and other industrial and hobby uses where robustness and ease of use are paramount. Opening up the communication protocol will enable farmers, agronomists, meteorologists, oceanographers and private organizations to bring real benefits to their customers.

Build your own weather app with MeteoRain open data

MeteoRain IoT sigfox with a MeteoHelix IoT smart weather station in viticulture

MeteoRain IoT sigfox with a MeteoHelix IoT smart weather station in viticulture


MeteoRain wireleass automatic raingauge message format (3 byte for arbitrary transmit intervals)
Bits2 bits5 bits16 bits1 bits
Physical propertyMessage typeBatteryRain (revolving counter)open
Units VUnits are rain gauge resolution dependent & set on the server
Resolution10.051
Minimum value03 V00

Web based & Excel spreadsheet weather data message decoder/verifier


The Things Network Payload Decoder

MeteoHelix weather station payload message decoder JavaScript code can be pasted directly into your application on The Things Network LoRaWAN console.

Paste the unmodified javascript code into the decoder section of your the things network application.

Paste the unmodified javascript code into the decoder section of your the things network application.


Sigfox Network Payload Decoder

For Sigfox wireless network based MeteoHelix weather stations, this JavaScript code can be integrated into your application which receives the MeteoHelix message payload from the Sigfox Backend.


Open-Source Decoder JavaScript Code

Decoder for LoRaWAN and Sigfox MeteoRain automatic rain gauges:

var pos = 0;
var bindata = "";

var ConvertBase = function (num) {
    return {
        from : function (baseFrom) {
            return {
                to : function (baseTo) {
                    return parseInt(num, baseFrom).toString(baseTo);
                }
            };
        }
    };
};

function pad(num) {
    var s = "0000000" + num;
    return s.slice(-8);
}

ConvertBase.dec2bin = function (num) {
    return pad(ConvertBase(num).from(10).to(2));
};

ConvertBase.bin2dec = function (num) {
    return ConvertBase(num).from(2).to(10);
};

function data2bits(data) {
    var binary = "";
    for(var i=0; i<data.length; i++) {
        binary += ConvertBase.dec2bin(data[i]);
    }
    return binary;
}

function bitShift(bits) {
    var num = ConvertBase.bin2dec(bindata.substr(pos, bits));
    pos += bits;
    return Number(num);
}

function precisionRound(number, precision) {
  var factor = Math.pow(10, precision);
  return Math.round(number * factor) / factor;
}

function Decoder(bytes, port) {
  bindata = data2bits(bytes);
  
  //if(bytes.length != 12) return {"status": "ERROR", "describtion": "11 bytes are required"}
    Type =  bitShift(2);
    Battery = precisionRound(bitShift(5)*0.05+3, 1);
    Rain = precisionRound(bitShift(16), 1);

 
 
  decoded = {
    "Type": Type,
    "Battery": Battery,
    "Rain": Rain,
  };

  return decoded;
}