ScoobyTchotchke / node-dymo

Node.js wrapper for Dymo Scales
7 stars 3 forks source link

node-dymo

node-dymo is a Node.js wrapper that reads from a Dymo brand USB scale. The wrapper provides several events as well as methods to read measurements from the scale.

Dependencies

Libusb is included as a submodule. On Linux, you'll need libudev to build libusb. On Ubuntu/Debian: sudo apt-get install build-essential libudev-dev

Windows

Use Zadig to install the WinUSB driver for your USB device. Otherwise you will get LIBUSB_ERROR_NOT_SUPPORTED when attempting to open devices.

Quick Examples

dymo.on('online', function() {
  console.log('scale was connected/powered on'); // ## ounces(/grams);
});

dymo.on('weight-change', function(obj) {
  console.log(obj.value + ' ' + obj.system); // ## ounces(/grams);
});

console.log(dymo.getWeight()); // { value: 10, system: 'grams' }

Methods

node-dymo provides three methods you can call at any time:

Events