Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?
If you are experiencing any issues with your desktop wallpaper or taskbar buttons
please download and install the latest DisplayFusion beta version before contacting support.

User Image
andeke07
1 discussion post
I have a desktop which is wired to 2 areas -- a display at my desk, and a TV in the living room.

I have 2 profiles set to display on either the desktop or on my TV (I never use both at the same time), and I have a shortcut set to switch between them (Ctrl + Shift + Alt + Arrow Key) and this works fine when logged in.

However, the primary use case of this setup is to swap the display when I am sat on the couch using my wireless keyboard (or back to my desk when I am sat there) and I usually want to do that right when the computer starts up (if I am sat on the couch and the display is over on my desk it is hard to get past the lock screen)

It seems I cannot use my shortcuts when the screen is locked, does anyone know of any workarounds for this?
17 days ago  • #1
User Image
Ryan251
4 discussion posts
I accomplished this using Home Assistant (specifically using HASS Agent on my computer connected to Home Assistant on another device/server). I have the same setup where one display is in my office and one is my living room TV. This works even when the PC is locked.

On HASS Agent, I setup two commands:
(1) "Gaming_PC_DisplayFusion_OLED_Only"
(2) "Gaming_PC_DisplayFusion_LvngRm_Only"

Each of these commands is Type: "PowerShell"; Entity Type: "Button".

The PowerShell command for (1) "Gaming_PC_DisplayFusion_OLED_Only" is:
& "C:\Program Files\DisplayFusion\DisplayFusionCommand.exe" -monitorloadprofile "OLED Only"


The PowerShell command for (2) "Gaming_PC_DisplayFusion_LvngRm_Only" is:
& "C:\Program Files\DisplayFusion\DisplayFusionCommand.exe" -monitorloadprofile "Living Room TCL Only"


Note that "OLED Only" and "Living Room TCL Only" are the exact names of my DisplayFusion profiles.

Then in Home Assistant, I have the ability to "click" the virtual button that tells HASS Agent to fire the chosen PowerShell command, which in turn tells DisplayFusion to load the chosen profile.

If you get into Home Assistant, you'll find you can trigger these actions from a voice assistant, dashboard, phone shortcut, webhook, tv input selection, etc.,

.........................

Sorry its not a super clean setup, but it works well enough.

.........................

My final thing to add is feedback to Home Assistant once a profile is loaded, to confirm it worked/errored out... but DisplayFusion is having issues triggering when a profile is changed (I have this issue in an open discussion with the DisplayFusion team).

Here is a DisplayFusion function (to use in lieu with a DisplayFusion trigger(s)) to send notice to Home Assistant upon profile changes:

Code

using System;
using System.Net;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        using (var client = new WebClient())
        {
            client.UploadString(
                "http://HomeAssistantIPhere:HomeAssistantPortHere/api/webhook/displayfusion_monitor_changed",
                "POST",
                ""
            );
        }
    }
}


Then in Home Assistant, a 'webhook triggered' automation(s) can be setup.

This section is not stricly necessary though...

.........................

If you end up going this route and have any questions, please let me know!
15 days ago (modified 15 days ago)  • #2
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)