hensm-ddcci
v0.1.7
Published
NodeJS DDC/CI library
Readme
node-ddcci
Installation
node-ddcci is currently only supported on Windows.
npm install @hensm/ddcciUsage
const ddcci = require("@hensm/ddcci");
for (const monitor of ddcci.getMonitorList()) {
console.log(`${monitor} current brightness: ${ddcci.getBrightness(monitor)}`);
ddcci.setBrightness(monitor, 25);
}Docs
getMonitorList()Gets a list of the current connected monitors.
Return value
An array ofStringcontaining the monitor IDs.
getBrightness(monitorId)Queries a monitor's brightness level.
Parameters
monitorIdString. ID of monitor for which to query the brightness.
Return value
Aninteger, typically between 0-100, representing the current brightness.
getMaxBrightness(monitorId)Queries a monitor's maximum brightness level.
Parameters
monitorIdString. ID of monitor for which to query the brightness.
Return value
Aninteger, typically between 0-100, representing the maximum brightness.
setBrightness(monitorId, level)Sets a monitor's brightness level.
Parameters
monitorIdString. ID of monitor for which to set the brightness.levelinteger. Between 0-100 representing the new brightness level.
getContrast(monitorId)Queries a monitor's contrast level.
Parameters
monitorIdString. ID of monitor for which to query the contrast.
Return value
Aninteger, typically between 0-100, representing the current contrast.
getMaxContrast(monitorId)Queries a monitor's maximum contrast level.
Parameters
monitorIdString. ID of monitor for which to query the contrast.
Return value
Aninteger, typically between 0-100, representing the maximum contrast.
setContrast(monitorId, level)Sets a monitor's contrast level.
Parameters
monitorIdString. ID of monitor for which to set the contrast.levelinteger. Between 0-100 representing the new contrast level.
_getVCP(monitorId, vcpCode)Queries a monitor for a VCP code value.
Parameters
monitorIdString. ID of monitor for which to query the VCP feature.vcpCodeinteger. VCP code to query
Return value
Anarrayof twointegervalues in the format of[currentValue, maxValue].
_setVCP(monitorId, vcpCode, value)Sets the value of a VCP code for a monitor.
Parameters
monitorIdString. ID of monitor for which to set the VCP feature.vcpCodeinteger. VCP code to set.valueinteger. Value of the VCP code.
_refresh()Refreshes the monitor list.
