# xled2

> Library to control Twinkly LED lights

Latest version **1.3.0** (published 2023-03-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install xled2
pnpm add xled2
yarn add xled2
bun add xled2
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2023-03-08 |
| First published | 2023-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 41.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lexi Beavil |
| Maintainers | aeroniemi |
| Keywords | xled, x-led, twinkly, lights, led, control |

## Links

- npm: https://www.npmjs.com/package/xled2
- Repository: https://github.com/aeroniemi/xled-js
- Homepage: https://github.com/aeroniemi/xled#readme
- Issues: https://github.com/aeroniemi/xled-js/issues
- npm.io page: https://npm.io/package/xled2

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^1.3.2
- [delay](https://npm.io/package/delay.md) ^5.0.0

## Recent versions

- 1.3.0 (latest) — 2023-03-08
- 1.2.5 — 2023-02-20
- 1.2.4 — 2023-02-20
- 1.2.3 — 2023-02-19
- 1.2.2 — 2023-02-19
- 1.2.1 — 2023-02-17
- 1.1.0 — 2023-02-17
- 1.0.0 — 2023-02-13

## README

# xled-js

A NodeJS/typescript library similar to [scrool/XLED](https://github.com/scrool/xled) to control [Twinkly](https://twinkly.com/) LED lights.

## API Docs

- The api docs can be found at https://aeroniemi.github.io/xled-js

## Installation

### Via npm

`npm install xled2`

### From source

- `git clone https://github.com/aeroniemi/xled-js.git`
- `cd ./xled-js/`
- `npm install`

## Usage

```ts
import { Light, rgbColour } from "xled";

async function run() {
	// instantiate the device
	device = new Light("192.168.0.22");
	// get the device name
	console.log(`This device is called ${await device.getName()}`);

	// set device to red, full brightness
	await device.setBrightness(100);

	let red: rgbColour = {
		red: 255,
		green: 0,
		blue: 0,
	};
	await device.setMode("color");
	await device.setRGBColour(red);
}
run();
```

---
_Source: https://npm.io/package/xled2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
