Skip to content

A simple client to query information about a SyncThru printer

License

Notifications You must be signed in to change notification settings

dcop/node-syncthru-client

Repository files navigation

Build Status

node-syncthru-client

A TypeScript port of PySyncThru.

The app currently supports:

  • Toner level (Black, Magenta, Cyan, Yellow)
  • Model name

Example usage

const client = new SyncThruClient("http://my-local-printer");

const syncThruResponse: SyncThruResponse = await client.rawGet(); // gets the raw file returned from the printer
const syncThruModel: SyncThruModel = await client.get(); // gets a custom model object based on printer response

console.log(syncThruResponse.toner_black.remaining) // outputs 28
console.log(syncThruModel.blackTonerLevel()) // outputs 28

About

A simple client to query information about a SyncThru printer

Resources

License

Stars

Watchers

Forks

Packages

No packages published