# pharos-controllers

> TypeScript library to control Pharos Lighting controllers via the HTTP rest API

Latest version **1.2.1** (published 2026-04-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install pharos-controllers
pnpm add pharos-controllers
yarn add pharos-controllers
bun add pharos-controllers
```

## Health

**Score 55/100 (C)** — status: active.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2026-04-19 |
| First published | 2023-06-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 35.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jonas Hartmann |
| Maintainers | hartmann-jonas |
| Keywords | pharos, designer2, expert |

## Links

- npm: https://www.npmjs.com/package/pharos-controllers
- Repository: https://github.com/hartmann-jonas/pharos-controllers
- Homepage: https://github.com/hartmann-jonas/pharos-controllers#readme
- Issues: https://github.com/hartmann-jonas/pharos-controllers/issues
- npm.io page: https://npm.io/package/pharos-controllers

## Dependencies (2)

- [isip](https://npm.io/package/isip.md) ^0.0.1
- [tslib](https://npm.io/package/tslib.md) ^2.5.3

## Recent versions

- 1.2.1 (latest) — 2026-04-19
- 1.2.0 — 2025-11-20
- 1.1.2 — 2023-09-21
- 1.1.0 — 2023-06-10
- 1.0.3 — 2023-06-09
- 1.0.1 — 2023-06-08
- 1.0.0 — 2023-06-08

## README

# pharos-controllers

![GitHub issues](https://img.shields.io/github/issues/hartmann-jonas/pharos-js)
![npm](https://img.shields.io/npm/dt/pharos-controllers)
![npm](https://img.shields.io/npm/v/pharos-controllers)
![GitHub](https://img.shields.io/github/license/hartmann-jonas/pharos-controllers)

Library written in TypeScript to control Pharos Lighting controllers via the HTTP rest API.

## Available commands

- authenticate()
- logout()

### ONLY DESIGNER

- getTimelines()
- getGroups()
- getScenes()
- getTriggers()
- controllTimeline()
- controlGroup()
- controlScene()
- controlTrigger()
- beacon()

### ONLY EXPERT

- getSpaces()
- controlSpace()
- controlScene()

## Example Designer:

```js
import { DesignerClient } from 'pharos-controllers'

const controller = new DesignerClient('192.168.0.10')

async function example() {
	await controller.authenticate('admin', 'admin')
	// returns success true/false if false an error is returned as well

	const timelines = await controller.getTimelines()
	// returns success and all timelines

	const groups = await controller.getGroups('1-10')
	// returns success and groups 1 through 10

	await controller.controlTimeline('start', { num: 7 })
	// starts timeline number 7 and returns success true/false

	await controller.controlTimeline('release', { fade: 5 })
	// releases all timelines with a fade of 5 seconds

	await controller.controlTimeline('set_rate', { num: 3, rate: '0.5' })
	// sets the rate of timeline 3 to 50% of the default rate

	const logout = await controller.logout()
	// returns success true/false
}

example()
```

## Example Expert:

```js
import { ExpertClient } from 'pharos-controllers'

const controller = new ExpertClient('192.168.0.20')

async function example() {
	await controller.authenticate('admin', 'admin')
	// returns success true/false if false an error is returned as well

	await controller.getSpaces('1-3')
	// returns info about space 1 till 3

	await controller.controlScene('recall', { num: 5 })
	// recalls scene 5 and returns success true/false

	await controller.controlSpace('master_intensity', { num: 3, level: 82.3 })

	await controller.logout()
	// returns success true/false
}
```

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