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 🙏

© 2026 – Pkg Stats / Ryan Hefner

divoom-times-gate-client

v1.0.1

Published

Client library for controlling Divoom devices via divoom-times-gate-server, divoom-times-gate-5g-server, or divoom-ble-server

Readme

divoom-times-gate-client

Client library for controlling any Divoom device from any Node.js application.

Works with all three server daemons — connect it to whichever matches your device:

| Server | Device | |--------|--------| | divoom-times-gate-server | Times Gate (standard, MQTT) | | divoom-times-gate-5g-server | Times Gate 5G (HTTP) | | divoom-ble-server | Pixoo, Pixoo64, Timebox, Ditoo (BLE) |

Installation

npm install divoom-times-gate-client

Quick start

const DivoomClient = require('divoom-times-gate-client');

const device = new DivoomClient({
  host: '192.168.1.50',  // IP of the machine running divoom-times-gate-server
});

await device.connect();
console.log('Connected. Device ID:', device.deviceId);

await device.setBrightness(80);
await device.sendText('Hello!');
await device.setScoreboard(3, 1);

const timer = await device.getTimer();
console.log('Timer:', timer);

Constructor options

new DivoomClient({
  host:            '127.0.0.1',  // server host
  port:            3000,         // server WebSocket port
  responseTimeout: 5000,         // ms to wait for device replies
})

Events

device.on('heartbeat',          msg => console.log('Signal:', msg.WifiSingal));
device.on('deviceConnected',    msg => console.log('Device came online'));
device.on('deviceDisconnected', msg => console.log('Device went offline'));
device.on('message',            msg => console.log('Response:', msg));
device.on('disconnected',       ()  => console.log('Lost connection to server'));

API reference

Connection

await device.connect()     // connect to server, resolves when ready
device.disconnect()        // close connection
device.deviceId            // device ID (available after connect)
device.userId              // user ID (available after connect)

Screen

device.setScreen(true)          // turn on
device.setScreen(false)         // turn off
device.setBrightness(80)        // 0–100
await device.getScreenState()   // → { OnOff, ... }
device.setProduceTime(60)       // seconds per item

Clock faces & channels

device.setClockFace(clockId, lcdIndex?)
device.set5LcdChannelType(channelType, lcdIndependence?)
device.set5LcdWholeClockId(clockId)

Equalizer

await device.getEqPosition()
device.setEqPosition(position)

RGB & Ambient light

await device.getRGBInfo()
device.setRGBInfo({ Brightness: 100, Color: '#ff0000', ColorCycle: 0, OnOff: 1 })

await device.getAmbientLight()
device.setAmbientLight({ Brightness: 100, Color: '#ffffff', SelectEffect: 0 })

Night preview

device.setNightPreview(30)
device.exitNightPreview()

Drawing / Pixel art

device.sendDrawInfo(opts)
device.exitDraw()
device.setDrawSpeedMode(mode)
device.sendDrawByLcdIndex(lcdIndex, opts)

Voice / Text

device.sendText('Hello world!')
device.setVoicePixel(opts)

Danmaku

device.sendDanmaku('Hi!')
device.sendRandomFace()

Tools

await device.getTimer()
device.setTimer({ Minute: 5, Second: 0, Status: 1 })   // Status: 0=stop 1=start

await device.getStopwatch()
device.setStopwatch(1)   // 0=stop 1=start 2=reset

await device.getScoreboard()
device.setScoreboard(3, 1)   // blue, red

await device.getNoiseStatus()
device.setNoiseStatus(true)

Tomato timer

device.startTomato(opts)
device.listenTomato(opts)
device.setTomatoVolume(80)
device.deleteTomato(id)

Alarms

device.listenAlarm(opts)
device.setAlarmVolume(80)

Photos & Albums

device.playAlbum(albumId)
device.setAlbumCover(albumId, fileId)
device.deletePhoto(fileId)
device.removePhotoFromAlbum(albumId, fileId)
device.sendPhotoToAlbum(albumId, fileId)

Playlist

device.sendPlaylist(opts)

Calendar

device.enterGoogleCalendar(opts)
device.enterOutlookCalendar(opts)

Related

License

MIT