node-ddcci is currently only supported on Windows.
npm install @hensm/ddcci
const ddcci = require("@hensm/ddcci");
for (const monitor of ddcci.getMonitorList()) {
console.log(`${monitor} current brightness: ${ddcci.getBrightness(monitor)}`);
ddcci.setBrightness(monitor, 25);
}
-
Gets a list of the current connected monitors.
-
An array of
String
containing the monitor IDs.
-
An array of
-
Queries a monitor's brightness level.
-
monitorId
String
. ID of monitor for which to query the brightness.
-
An
integer
, typically between 0-100, representing the current brightness.
-
-
Queries a monitor's maximum brightness level.
-
monitorId
String
. ID of monitor for which to query the brightness.
-
An
integer
, typically between 0-100, representing the maximum brightness.
-
-
Sets a monitor's brightness level.
-
monitorId
String
. ID of monitor for which to set the brightness.level
integer
. Between 0-100 representing the new brightness level.
-
-
Queries a monitor's contrast level.
-
monitorId
String
. ID of monitor for which to query the contrast.
-
An
integer
, typically between 0-100, representing the current contrast.
-
-
Queries a monitor's maximum contrast level.
-
monitorId
String
. ID of monitor for which to query the contrast.
-
An
integer
, typically between 0-100, representing the maximum contrast.
-
-
Sets a monitor's contrast level.
-
monitorId
String
. ID of monitor for which to set the contrast.level
integer
. Between 0-100 representing the new contrast level.
-
-
Queries a monitor for a VCP code value.
-
monitorId
String
. ID of monitor for which to query the VCP feature.vcpCode
integer
. VCP code to query
-
An
array
of twointeger
values in the format of[currentValue, maxValue]
.
-
-
Sets the value of a VCP code for a monitor.
-
monitorId
String
. ID of monitor for which to set the VCP feature.vcpCode
integer
. VCP code to set.value
integer
. Value of the VCP code.
-
-
Refreshes the monitor list.