Sensor-BLE decoder catalog (example)

An example catalog of sensor-ble decoders. Use this repository as a template to publish your own.

Add to Sensor-BLE

1 decoder · machine-readable: decoders.json · Sensor Logger: copy a decoder URL into Custom Decoders → Add Decoder.

QR code: sensorble://catalog?url=https%3A%2F%2Fmhaberler.github.io%2Fsensor-ble-decoder-catalog%2F
Scan to add this catalog

RuuviTag (RAWv2, example) v1.0.0

Temperature, humidity, pressure, acceleration, battery and movement from RuuviTag data format 5.

Decodes the RuuviTag data format 5 ("RAWv2") broadcast by current RuuviTag firmware. Readings the tag reports as unavailable decode to null.

This is the example decoder of the template: copy it, rename decoderName, change the decoding, and replace the tests with vectors from your device.

decoderName
ruuvi_example
Matches
manufacturer: 9904
Author
Michael Haberler
License
MIT
Tags
ruuvi environment example
sha256
1f2c2115f65202a19c3c24b92cb63d454c91d0a9ae77e542f7e17bbe1fa04a76
view source
4 test vectors
[
  {
    "given": {
      "manufacturerData": "99040512fc5394c37c0004fffc040cac364200cdcbb8334c884f"
    },
    "expected": {
      "temperature_C": 24.3,
      "humidity_percent": 53.49,
      "pressure_hPa": 1000.44,
      "acceleration_x_mg": 4,
      "acceleration_y_mg": -4,
      "acceleration_z_mg": 1036,
      "battery_mV": 2977,
      "txPower_dBm": 4,
      "movementCounter_dimensionless": 66,
      "measurementSequence_dimensionless": 205,
      "macAddress": "cb:b8:33:4c:88:4f"
    }
  },
  {
    "given": {
      "manufacturerData": "9904057ffffffefffe7fff7fff7fffffdefefffecbb8334c884f"
    },
    "expected": {
      "temperature_C": 163.835,
      "humidity_percent": 163.835,
      "pressure_hPa": 1155.34,
      "acceleration_x_mg": 32767,
      "acceleration_y_mg": 32767,
      "acceleration_z_mg": 32767,
      "battery_mV": 3646,
      "txPower_dBm": 20,
      "movementCounter_dimensionless": 254,
      "measurementSequence_dimensionless": 65534,
      "macAddress": "cb:b8:33:4c:88:4f"
    }
  },
  {
    "given": {
      "manufacturerData": "9904058001000000008001800180010000000000cbb8334c884f"
    },
    "expected": {
      "temperature_C": -163.835,
      "humidity_percent": 0,
      "pressure_hPa": 500,
      "acceleration_x_mg": -32767,
      "acceleration_y_mg": -32767,
      "acceleration_z_mg": -32767,
      "battery_mV": 1600,
      "txPower_dBm": -40,
      "movementCounter_dimensionless": 0,
      "measurementSequence_dimensionless": 0,
      "macAddress": "cb:b8:33:4c:88:4f"
    }
  },
  {
    "given": {
      "manufacturerData": "9904058000ffffffff800080008000ffffffffffffffffffffff"
    },
    "expected": {
      "temperature_C": null,
      "humidity_percent": null,
      "pressure_hPa": null,
      "acceleration_x_mg": null,
      "acceleration_y_mg": null,
      "acceleration_z_mg": null,
      "battery_mV": null,
      "txPower_dBm": null,
      "movementCounter_dimensionless": null,
      "measurementSequence_dimensionless": null,
      "macAddress": "ff:ff:ff:ff:ff:ff"
    }
  }
]