Monitorian Documentation

repository·master·Indexed 26 days ago

https://github.com/emoacht/monitorian

A Windows desktop utility for adjusting the brightness and contrast of multiple DDC/CI enabled monitors individually or simultaneously. Includes documentation on installation, command-line interface (CLI) options for brightness and contrast, troubleshooting external monitor detection, and configuring advanced JSON-based conditional, time, and key commands.

Tokens
2.7K
Snippets
5
Records
15
Agent score
39%

What's inside Monitorian

  1. Set up the Monitorian development environment

    master

    To develop Monitorian, follow these steps:

    1. Install Visual Studio.
    2. Install required components via the Visual Studio Installer:
      • .NET Framework 4.8 SDK
      • .NET Framework 4.8 targeting pack (Version must match the TargetFrameworkVersion in the .csproj files).
      • Windows 10 or 11 SDK (Version must be 10.0.19041.0 or newer).
    3. Install Extension: Open Extension Manager in Visual Studio and install HeatWave for VS2022.
    4. Load and Restore: Open /Source/Monitorian.sln, right-click the solution in Solution Explorer, and select Restore NuGet Packages.
  2. Extract Monitorian executable files from MSI

    master

    If you need to place the executable files manually, you can extract them from the .msi installer using msiexec with the following command:

    msiexec /a [source msi file path] targetdir=[destination folder path (absolute path)] /qn

    Important Notes:

    • The settings file is created at: [system drive]\Users\[user name]\AppData\Local\Monitorian\
    • Enabling 'Start on sign in' adds a registry value to: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
    msiexec /a [source msi file path] targetdir=[destination folder path (absolute path)] /qn
  3. Record and copy operation logs for troubleshooting

    master

    To debug issues where monitor states are not reflecting correctly, you can record operations to a log file.

    1. Open the hidden menu.
    2. Check Record operations to log.
    3. Perform the actions that trigger the issue.
    4. Once the issue occurs, use Copy accumulated log to retrieve the operation.log.
  4. Add support for new languages (Globalization)

    master

    To add a new language, add a Resources (.resx) file to the /Source/Monitorian.Core/Properties folder. The app selects the language automatically based on the user's environment.

    • Naming Convention: Resources.[language-culture].resx (e.g., Resources.en-US.resx).
    • Implementation: The name/value pairs in your file must match the keys in the default Resources.resx to override them.
  5. Install Monitorian

    master

    Monitorian can be installed via the Microsoft Store, Winget, or a standalone installer.

    Requirements

    • Windows 7 or newer
    • .NET Framework 4.8
    • External monitors must be DDC/CI enabled.

    Installation Methods

    • Microsoft Store: Search for 'Monitorian' in the Windows Store.
    • Winget:
      winget install Monitorian -s msstore
    • Standalone Installer: Download the .zip containing the installer from the GitHub releases page.
    winget install Monitorian -s msstore
  6. Use Probe to check monitor compatibility

    master

    You can check the compatibility of your monitor using probe.log. This log includes raw information on monitors and their DDC/CI capabilities.

    To generate this log:

    1. Open the hidden menu (click the app title 3 times).
    2. Tap Probe into monitors.
  7. Set persistent command-line arguments

    master
    You can store persistent arguments in the hidden menu so they are applied every time the app starts. For example, to force the app to use English, enter /lang en in the Command-line arguments box within the hidden menu.
  8. Configure Time Commands

    master

    Time commands execute a sequence of actions at a specific daily time.

    Requirements:

    • The commands must be defined in a JSON array.
    • DueTimeHours: 0-23.
    • DueTimeMinutes: 0-59.
    • DurationMinutes: 1-1439. This defines a window after the due time. If the system starts or resumes within this window, the commands will execute. If the system starts after this window, they will not.
    • Loading a new set of time commands will overwrite previous ones with the same due time.

    JSON Schema for Commands:

    • Option: SetBrightness or SetContrast
    • DeviceInstanceId: String ID or null (for all).
    • IsAll: Boolean.
    • Value: Integer (0-100).
    [
      {
        "DueTimeHours": 9,
        "DueTimeMinutes": 0,
        "DurationMinutes": 60,
        "Commands": [
          {
            "Option": "SetBrightness",
            "DeviceInstanceId": "[Device Instance ID of monitor 1]",
            "IsAll": false,
            "Value": 40
          }
        ]
      }
    ]
  9. Configure Key Commands (Hotkeys)

    master

    Key commands execute actions when a specific hotkey combination is pressed.

    Requirements:

    • The commands must be defined in a JSON array.
    • KeyGesture: A combination of modifier keys (Alt, Ctrl, Shift, Windows) and a key, delimited by + (e.g., Ctrl+Alt+O).
    • Description: A string describing the hotkey.
    • Hotkeys must be enabled in Key Settings within the application.
    • If a hotkey is already used by the OS or another app, it cannot be set.
    • Increment/Decrement brightness commands are only repeatable if the entire command set for that key consists of increment/decrement actions.

    Available Command Options:

    • SetBrightness
    • SetContrast
    • SetInput (Used to change monitor input source)
    • IncrementBrightness
    • DecrementBrightness
    [
      {
        "KeyGesture": "Ctrl+Alt+Y",
        "Description": "Monitor 1 to HDMI 1",
        "Commands": [
          {
            "Option": "SetInput",
            "DeviceInstanceId": "[Device Instance ID of monitor 1]",
            "IsAll": false,
            "Value": 17
          }
        ]
      }
    ]
  10. Configure Conditional Commands

    master

    Conditional commands execute a sequence of actions when a specific monitor's brightness reaches a certain value.

    Requirements:

    • The commands must be defined in a JSON array.
    • Each set requires a ConditionalDeviceInstanceId (the monitor being watched), a ConditionalValue (the brightness threshold from 0-100), and a Commands array.
    • To execute multiple commands for the same condition, include them in a single set.
    • If the conditional monitor is in unison (mirrored), commands will not execute.
    • While a conditional command is executing, other conditional, time, or key commands are suppressed.

    JSON Schema for Commands:

    • Option: SetBrightness or SetContrast
    • DeviceInstanceId: String ID of the target monitor, or null to target all monitors.
    • IsAll: Boolean; if true, applies to all monitors.
    • Value: Integer (0-100).
    [
      {
        "ConditionalDeviceInstanceId": "[Device Instance ID of monitor 1]",
        "ConditionalValue": 50,
        "Commands": [
          {
            "Option": "SetBrightness",
            "DeviceInstanceId": "[Device Instance ID of monitor 2]",
            "IsAll": false,
            "Value": 100
          },
          {
            "Option": "SetContrast",
            "DeviceInstanceId": "[Device Instance ID of monitor 2]",
            "IsAll": false,
            "Value": 50
          }
        ]
      }
    ]
  11. Troubleshoot external monitor detection

    master

    Monitorian only shows external monitors that are controllable via DDC/CI. If a monitor is not appearing, check the following:

    1. DDC/CI Support: Ensure the monitor model supports DDC/CI.
    2. OSD Settings: Check the monitor's On-Screen Display (OSD) menu to ensure DDC/CI is set to ON.
    3. Hardware/Connection:
      • The PC connector must support DDC/CI.
      • Cables, converters, or docking stations must be compatible (Thunderbolt/USB-C cables are generally compatible, but converters often are not).
      • Surface Dock and Surface Dock 2 are known to be compatible.
    4. Hardware Issues: Check for contact failure in older connectors or issues with the monitor/PC hardware.