This node module allows you to experiment with the EMCB UDP API to query and control Energy Management Circuit Breakers and provides an example implementation leveraging best practices.
NOTE - The UDP API of the EMCB is currently in Beta. To use this module, you must have an EMCB that has been enrolled in the UDP API Beta. For more information, contact Eaton.
npm install --save emcb-udp-master
$ git clone https://github.com/EatonEM/emcb-udp-master $ cd emcb-udp-master $ npm install
How to use
Relevant Documentation can be found at:
- docs/API.md: Complete API documentation for this library
- docs/EMCB UDP API.pdf: Complete API documentation for the EMCB UDP API protocol used on the local network that this library is implemented against.
- EMCB Cloud API: Complete Cloud API documentation, including the steps required to setup UDP Keys on individual EMCBs which is needed to use this code!
- Examples/README.md: Contains documentation on the provided examples and the necessary steps to begin leveraging them.
These logs are written to both the console and to
./logs/ whenever the
emcb-udp-master is used to aid in debugging/understanding. See docs/API.md for more information.
You will need the following installed in your environment:
- Node.js and npm (Node Package Manager)
This library has been developed and tested on macOS using node v10.14.3. v10 or greater of Node.js is required.
git should be available in your
npm might need it. You can find git at https://git-scm.com/.
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/creationix/nvm/v0.34.0/install.sh | bash # Install node. $ nvm install v10 # set the default `node` on your $PATH in your current terminal session to the version you just installed $ nvm use v10 # set the default "node" on your $PATH for all future terminal sessions $ nvm alias v10 default
Node installation on Ubuntu
You can install nodejs and npm easily with apt install, just run the following commands:
$ sudo apt install nodejs $ sudo apt install npm
Other Operating Systems
If the installation was successful, you should be able to run the following command and get your version output
$ node --version v10.14.3 $ npm --version 6.1.0
If you need to update
npm, you can make it using
npm! After running the following command, simply reopen your terminal
$ npm install npm -g