I monitor my PC state to run some automations. The most basic version is using ping to turn on/off lights depending on the state of the PC.
I want to take this a bit further. I’d like to turn off the lights when the PC has been locked for a couple of minutes. So far, so good. I found various programs that can tell HA if my PC is locked or not. However, it doesn’t look like any of these programs can differentiate between me actually being at my PC, or controlling it via Microsoft Remote Desktop.
I feel like it should be possible to differentiate, since the PC is ‘unlocked’/available in the MS RD app, while staying locked physically. Does anyone know of a way to tell if a PC is actually unlocked, or used remotely?
I must admit, it’s a creative solution, but it’s definitely not my preferred method. I can’t imagine that this info can’t be extracted from the PC easily, it’s not an Apple product after all .
Maybe somebody who knows more about WMI Queries knows if one of those queries can extract this info?
Which is why I asked on a forum. There’s plenty of people out there for whom this is a trivial question, it’s only a matter of connecting my question to their knowledge.
That works if you have all the parts in stock, and are willing to mess with your monitor. I don’t, and I’m not, not for something trivial like this at least, which should be easily doable in software.
I’ve looked at it, but despite the good range of customizability I didn’t see anything that I thought would allow me to see if the PC was used remotely or not. Now I’m looking at it again though, I may be able to use the screen resolution to differentiate between the local and the remote sessions.