Simplify trigger logic to port-only matching and improve Samsung detection
This commit is contained in:
@@ -4,34 +4,26 @@ FastAPI dashboard and polling service for Alienware-only KVM switching.
|
||||
|
||||
## Trigger Logic
|
||||
|
||||
The Samsung monitor is trigger-only and uses fixed input codes:
|
||||
The app targets Alienware AW3423DWF for switching and uses Samsung as trigger-only.
|
||||
|
||||
- Tower trigger: `15`
|
||||
- Laptop trigger: `19`
|
||||
Monitor filtering:
|
||||
|
||||
Each installation of this tool is for one device only. The UI lets you choose:
|
||||
- Alienware target monitor: description contains `AW3423DWF`
|
||||
- Samsung trigger monitor: Samsung-only descriptions (`SAM...` / `SAMSUNG`)
|
||||
- Other non-Alienware DDC monitors are ignored for trigger selection
|
||||
|
||||
- this device role: `tower` or `laptop`
|
||||
- this device Alienware target port:
|
||||
Configure only one value per machine:
|
||||
|
||||
- `DP1`
|
||||
- `DP2`
|
||||
- `HDMI`
|
||||
- this device Alienware target port: `DP1`, `DP2`, or `HDMI`
|
||||
|
||||
The device role can also still be provided by:
|
||||
Samsung trigger input codes mapped by port:
|
||||
|
||||
- environment variable `KVM_DEVICE_ROLE`
|
||||
- or `config.json` field `device_role`
|
||||
- `DP1` -> `15`
|
||||
- `DP2` -> `19`
|
||||
- `HDMI` -> `17`
|
||||
|
||||
Valid values are:
|
||||
|
||||
- `tower`
|
||||
- `laptop`
|
||||
|
||||
Examples:
|
||||
|
||||
- Tower role with UI port `DP1` -> on Samsung trigger `15`, send `DDM.exe /MNT:AW3423DWF /WriteActiveInput DP1`
|
||||
- Laptop role with UI port `DP2` -> on Samsung trigger `19`, send `DDM.exe /MNT:AW3423DWF /WriteActiveInput DP2`
|
||||
- If Samsung trigger input matches this device port code, the app runs `DDM.exe /MNT:AW3423DWF /WriteActiveInput <PORT>`.
|
||||
- If it does not match, the app waits.
|
||||
|
||||
Retry behavior:
|
||||
|
||||
@@ -66,22 +58,6 @@ uv run monitorcontrol_main.py
|
||||
|
||||
### Easiest option: Startup folder
|
||||
|
||||
You can now set the role in the UI, so this step is optional.
|
||||
|
||||
If you prefer a default role before opening the dashboard, set it for that Windows user:
|
||||
|
||||
Tower machine:
|
||||
|
||||
```powershell
|
||||
[System.Environment]::SetEnvironmentVariable("KVM_DEVICE_ROLE", "tower", "User")
|
||||
```
|
||||
|
||||
Laptop machine:
|
||||
|
||||
```powershell
|
||||
[System.Environment]::SetEnvironmentVariable("KVM_DEVICE_ROLE", "laptop", "User")
|
||||
```
|
||||
|
||||
1. Press `Win + R`
|
||||
2. Run:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user