JSPM

bresserweathersensorlw-codec

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q25974F
  • License MIT

LoRaWAN Codec API compliant codec for BresserWeatherSensorLW

Package Exports

  • bresserweathersensorlw-codec
  • bresserweathersensorlw-codec/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bresserweathersensorlw-codec) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

BresserWeatherSensorLW LoRaWAN Payload Codec

LoRaWAN Codec API compliant codec for BresserWeatherSensorLW.

This package provides uplink and downlink encoding/decoding functions for use with The Things Network, The Things Stack, Helium, and other LoRaWAN platforms.

Features

  • Uplink decoding: Converts sensor payload bytes to JSON objects.
  • Downlink encoding: Converts JSON commands to bytes for device control.
  • Downlink decoding: Converts downlink bytes to JSON for verification.
  • LoRaWAN Codec API compliant: Works with TTN, TTS, and similar platforms.

Installation

npm install bresserweathersensorlw-codec

Usage

const codec = require('bresserweathersensorlw-codec');

// Decode uplink
const uplink = codec.decodeUplink({ bytes: Buffer.from([/* uplink bytes */]), fPort: 1 });
console.log(uplink);

// Encode downlink
const downlink = codec.encodeDownlink({ data: { sleep_interval: 300 }, fPort: 0x31 });
console.log(downlink);

// Decode downlink
const decodedDownlink = codec.decodeDownlink({ bytes: Buffer.from([0x01, 0x2C]), fPort: 0x31 });
console.log(decodedDownlink);

API

Decodes uplink payload bytes to a JSON object.

Encodes a JSON object to downlink payload bytes.

Decodes downlink payload bytes to a JSON object.

File Structure

bresserweathersensorlw-codec/
  ├── package.json
  ├── index.js
  ├── README.md
  ├── downlink_formatter.js
  ├── uplink_formatter.js
  └── test/
    └── codec.test.js

License

MIT © 2025 Matthias Prinke