#WARNING: PACKAGE IS NOT SUPPORTED ANYMORE.
This is an early version. Still to do a lot. Testing, documentation and implementing more functionality.
$ npm install --save hyperion-ng-api
const HyperionNg = require('hyperion-ng-api');
//Host, Port, WsTan, Priority (Use 1 if you want to overwrite WebUI priority. Remember WebUI is always priority 1.)
hyperion = new HyperionNg('192.168.178.23', 19444, 666, 1);
hyperion.getServerInfo(function (err, data){
(err) ? console.log(err) : console.log(data);
})
0.0.4 (2018-06-07): Added functions "getStartupEffect" and "playStatupEffect"
0.0.3 (2018-06-01): Added more documentation. Deleted a duplicated function
0.0.2 (2018-06-01): Small file changes
0.0.1 (2018-06-01): First Version
- disableHyperion
- enableHyperion
- disableLedDevice
- enableLedDevice
- getServerInfo
- getAllComponents
- getAllEffects
- getStartupEffect
- getAllGrabbers
- getAllLedDevices
- getLedMappingType
- getAllPriorities
- getSysInfo
- getServerConfig
- getServerConfigSchema
- setMappingTypeMulticolor
- setMappingTypeUnicolor
- setMappingType
- setComponentState
- setColor
- setColorToBlackPermanently
- setEffect
- setBrightness
- setSourceToAutoSelection
- setSource
- clearPriority
- clearApiPriority
- clearAllPriority
- playStatupEffect
- sendToHyperion
disableHyperion: Disables all activated components. The Ng-Way to switch off.
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
enableHyperion: Enables all previous activated components. The Ng-Way to switch on.
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
disableLedDevice: Disables the LED Device. You can see this as "send color black"
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
enableLedDevice: Activates the LED Device.
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getServerInfo: Get the server info JSON. All information you need from hyperion. There are more functions available to wrap this. Eg: getAllEffects
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getAllComponents: Get all components. Wrap function for getServerInfo
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getAllEffects: Get all effects. Wrap function for getServerInfo
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getStartupEffect: Gets the effect which is used for startup
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getAllGrabbers: Get all Grabbers. Wrap function for getServerInfo
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getAllLedDevices: Get all led devices. Wrap function for getServerInfo
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getLedMappingType: Get the current led mapping type. Wrap function for getServerInfo
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getAllPriorities: Get all priorities. Wrap function for getServerInfo
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getSysInfo: Get system information about the operating system of hyperion.ng instance
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getServerConfig: Gets the current config file
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
getServerConfigSchema: Gets the current config schema
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
setMappingTypeMulticolor: Set the Led Mapping Type to multicolor (classic atmolight)
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
setMappingTypeMulticolor: Set the Led Mapping Type to unicolor (one color calculated and send to ALL leds)
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
setMappingType: Set the Led Mapping type. Currently 'unicolor_mean' and 'multicolor_mean' is supported. Inserting something other will likely result in an error
Parameters
Returns Function callback return string from hyperion.ng
setComponentState: Sets a component to true or false
Parameters
comp
string The component. You can use getAllComponents to get the names.state
boolean true or falsecallback
Function
Returns Function callback return string from hyperion.ng
setColor: Sets the color for a given priority and duration
Parameters
Returns Function callback return string from hyperion.ng
setColorToBlackPermanently: Sets the color to black with duration 0
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
setEffect: Sets an effect.
Parameters
effectName
string You can use getAllEffects to get the nameduration
number in seconds. Use 0 for infinitecallback
Function
Returns Function callback return string from hyperion.ng
setBrightness: Set the led brightness
Parameters
Returns Function callback return string from hyperion.ng
setSourceToAutoSelection: Activates autoselection
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
setSource: set a source (priority) to active
Parameters
Returns Function callback return string from hyperion.ng
clearPriority: clears the given priority
Parameters
Returns Function callback return string from hyperion.ng
clearApiPriority: clears the priority which is used by this api
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
clearAllPriority: clears all priority
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
playStatupEffect: plays the startup effect with configured time
Parameters
callback
Function
Returns Function callback return string from hyperion.ng
sendToHyperion: Main function to communicate with hyperion.ng. This function is calles by the other functions. If you know the commands you want to call on hyperion side you can call this function directly.
Parameters
Returns Function callback return string from hyperion.ng