OH3 on Windows, turn off Screensaver

Hello world,

I am running OH3 on Windows 10 and everything is doing fine so far.

I have a screensaver that starts after some time, to show a nice slide show of my photos. And there is a rule that detects when someone passes by for the first time at morning. Then a welcome message is generated by TTS, and some music plays. That’s fine so far.

What I now want to have is that in this situation the screensaver is terminated, to enable a view on OH content (weather, time etc.). If tried to simulate a key strike using NirCmd, but this does not work - probably because OH is running as service.

Is there any other way to stop the screensaver from a rule (in this configuration)?

Thank you for any hints,

Please don’t use advertising links for your topics !!

Sorry, was a copy paste error. I deleted it in the text, but it appeard.

depends on the privileges.
Check which program/process is running the screensaver.
Get its process id or name and kill it by it’s id or name.

This may help: https://winaero.com/kill-process-windows-10/

Thanks for this interesting approach. But the task ID changes every time the screensaver or system is (re)started. So this does not work out from an OH3 rule…but I will check using the name.

In general it is possible to kill a task by it’s name as well as by it’s number.
As only one screensaver can run on a windows machine at the same time it shouldn’t be a problem to find the right one. What you also can do is to use tasklist ( I am not sure if it can be filtered by name ). But latest using powershell in a batch file it should be possible to filter the resulting output of tasks.
In case the script does not fit into the GUI create a windows batch file and call it via executeCommandLine from within the rule.
My system runs under cubietruck resp. Pi. Everthing I cannot do from within the UI I try to delegate to run from a shell that is triggered from within a rule.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.