Skip to content

💥 lightweight JavaScript interface for Hyperion

License

Notifications You must be signed in to change notification settings

mav2010/hyperion-js-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💥 lightweight JavaScript interface for Hyperion

Install

npm version

npm install hyperion-js-api

Features

  • Control color and brightness of tv backlight.
  • Switch ambilight on/off. (optional)
  • Get current state/color

Basic Usage

const hyperion = new (require('hyperion-js-api'))("20.1.0.142",19444);
hyperion.setOn();
hyperion.getOn((error, response) => {
});
hyperion.setOff();
hyperion.setColor(hyperion.color.rgb(255, 0, 0));
hyperion.getColor((error, response) => {
});
hyperion.setBrightness(hyperion.color.value());
hyperion.getBrightness((error, response) => {
});
hyperion.setHue(hyperion.color.hue());
hyperion.getHue((error, response) => {
});
hyperion.setSaturation(hyperion.color.saturationv());
hyperion.getSaturation((error, response) => {
});

Tests

Find more examples in "test" directory.

Enter you hyperion server connection in package.json, and run some tests!

  "hyperion": {
    "host": "20.1.0.138",
    "port": "19444"
  }

run a single test from commandline with:

mocha test/hyperion.spec.js -g "setOff should switch off"

License

See the LICENSE file for license rights and limitations (MIT).

About

💥 lightweight JavaScript interface for Hyperion

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%