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

emcb-udp-coordinator

v1.0.0

Published

Module to discover, communicate, and and manage EM Nodes using the EM Local Communications Protocol (EMLCP) with both broadcast and unicast traffic.

Downloads

10

Readme

Energy Management Local Communications Protocol Node.JS SDK

npm version

This node module allows you to experiment with the Energy Management Local Communications Protocol, or EMLCP, to query and control EM Devices, or, in the context of this documentation EM Nodes, and provides an example implementation leveraging best practices.


Release Status

This Node.JS SDK, while a useful example of leveraging the protocol and utilizing best practices for common workflows, should be considered in an Alpha state and not suitable for production applications. However, the SDK is open-source and contributions to enhance the state of the SDK are encouraged!

Overview and Terminology

Relevant Documentation can be found at:

Terminology:

  • EMLCP: Energy Management Local Communications Protocol
  • EM Node: A generic name for an EM Device (including EMCBs) on the local network
  • EM Coordinator: A name for the coordinator that is utilizing the EM Local Communications Protocol to communicate with EM Nodes on the local network (this Node.JS SDK serves as an EM Coodinator)

NOTE: The implementation utilizes Emcb and EMCB as a prefix for several entities and constants, such as EmcbUDPbroadcastCoordinator and EMCB_UDP_MESSAGE_CODE_GET_DEVICE_STATUS, and this will be updated to use more generic EmNode and EM_LCP terminology throughout in a later release.

Installation

npm

npm install --save emcb-udp-coordinator

Manual

git clone https://github.com/EatonEM/emcb-udp-coordinator
cd emcb-udp-coordinator
npm install

Logging

This SDK exposes a pre-configured winston@3 logger. It also overrides console.log, etc. so that all logs are captured by winston.

These logs are written to both the console and to ./logs/ whenever the emcb-udp-coordinator is used to aid in debugging/understanding. See docs/api.md for more information.

Requirements

You will need the following installed in your environment:

  • Node.js and npm (Node Package Manager)
  • git

This library was last updated on macOS using node v20.9.0. (It was originally developed and tested on macOS using node v10.14.3) v16 or greater of Node.js is required.

Git

git should be available in your $PATH as npm might need it. You can find git at https://git-scm.com/.

Node

Node installation on Windows

The official Node.js website has an installer available for download.

Node installation on macOS

For macOS, the preferred installation method is to use nvm (Node Version Manager). You can install nvm and the latest version of node using these commands:

# Download and install nvm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

# Install node.
$ nvm install v20

# set the default `node` on your $PATH in your current terminal session to the version you just installed
$ nvm use v20

# set the default "node" on your $PATH for all future terminal sessions
$ nvm alias v20 default

Node installation on Ubuntu

You can install nodejs and npm easily with apt install, just run the following commands:

# Install Node.JS
$ sudo apt install nodejs

# Install NPM
$ sudo apt install npm

Other Operating Systems

You can find more information about the installation on the official Node.js website and the official NPM website.

If the installation was successful, you should be able to run the following command and get your version output

$ node --version
# v20.9.0

$ npm --version
# 10.2.4

If you need to update npm, you can make it using npm! After running the following command, simply reopen your terminal

# Update NPM
$ npm install npm -g