npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

advlib-esp

v1.3.0

Published

Wireless advertising packet decoding library for EnOcean Alliance devices via the EnOcean Serial Protocol (ESP). We believe in an open Internet of Things.

Downloads

37

Readme

advlib-esp

Wireless advertising packet decoding library for EnOcean Alliance devices via the EnOcean Serial Protocol (ESP). advlib-esp can be used standalone or, more commonly, as a processor module of the protocol-agnostic advlib library.

Overview of advlib-esp

advlib-esp is a lightweight Node.js package that implements the subset of ESP3 specific to sensor data and radio-identification, and can be extended with libraries to decode EnOcean Equipment Profiles (EEP).

| Library | Decodes | |:--------|:--------| | advlib-eep-vld | Variable-length data (VLD) telegrams | | advlib-eep-4bs | 4-byte sensor (4BS) telegrams | | advlib-eep-rps | Rocker position switch (RPS) telegrams | | advlib-eep-msc | Manufacturer-specific communication (MSC) telegrams |

Installation

npm install advlib-esp

Hello advlib-esp!

const advlib = require('advlib-esp');

const LIBRARIES = [ require('advlib-eep-vld'),
                    require('advlib-eep-4bs'),
                    require('advlib-eep-rps'),
                    require('advlib-eep-msc') ];

let packet = '55000707017ad5090591ee968001ffffffff47003c';
let processedPacket = advlib.process(packet, LIBRARIES);

console.log(processedPacket);

Which should yield the following console output:

{ type: "RADIO_ERP1",
  dataLength: 7,
  optionalLength: 7,
  telegramType: "1BS",
  deviceIds: [ "0591ee96/7" ],
  isContactDetected: [ true ],
  uri: "https://sniffypedia.org/Organization/EnOcean_Alliance/" }

Options

advlib-esp supports the following options for its process function:

| Property | Default | Description | |:-----------------------|:--------|:------------------------------------| | ignoreProtocolOverhead | false | Ignore non-sensor & non-identifier properties (type, dataLength, optionalLenth, telegramType, etc.) | | isERP1PayloadOnly | false | Interpret data as an ERP1 payload only (i.e. only the data portion of the RADIO_ERP1 ESP packet) | | deviceProfiles | {} | Map or Object of devices indexed by device signature and containing EEP types to facilitate decoding |

For example, to ignore the Enocean Serial Protocol (ESP) overhead, and to provide only an ERP1 payload, and to specify the profile for the given device (or simply for all devices):

let payload = 'd29165c02963e4f5d8000414006980';
let deviceProfiles = { "04140069/7": { eepType: "D2-14-41" } };
let options = {
    ignoreProtocolOverhead: true,
    isERP1PayloadOnly: true,
    deviceProfiles: deviceProfiles
};
let processedPacket = advlib.process(payload, LIBRARIES, options);

Which should yield the following console output:

{ deviceIds: [ "04140069/7" ],
  acceleration: [ -0.01, -0.045, 1.02 ],
  illuminance: 331,
  isContactDetected: [ false ],
  isMotionDetected: [ false ],
  relativeHumidity: 75.5,
  temperature: 18.1
  uri: "https://sniffypedia.org/Organization/EnOcean_Alliance/" }

Note that each device signature in the deviceProfiles is a combination of the 32-bit EnOcean Unique Radio Identifier of the device and "/7" which specifies the EURID-32 type.

Supported EnOcean Equipment Profiles

1BS (1-Byte Sensor) EEPs, as listed in the table below, are currently supported directly by advlib-esp. Other telegram types are supported by extension of the libraries described above.

| EEP | Profile Name | |:---------|:---------------------| | D5-00-01 | Single Input Contact |

See www.reelyactive.com/pareto/anywhere/devices/enocean-alliance/ for a list of all EEPs supported by our Pareto Anywhere open source IoT middleware.

Contributing

Discover how to contribute to this open source project which upholds a standard code of conduct.

Security

Consult our security policy for best practices using this open source software and to report vulnerabilities.

License

MIT License

Copyright (c) 2022-2024 reelyActive

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.