Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

simple task to wake up monitor - screen saver

If you have a question or need help, this is the place to be.
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

kgschlosser wrote:Check your device manager. I bet you will see devices I. There that are virtual ones from vnc.
i disabled the service, rebooted and had same issue.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

Ok. I am going to need you to run EG in debugging mode. So open a command prompt. Easiest way use the file explorer navigate to your EventGhost install folder in the right pane left click on some white area so that nothing is selected then hold down your left shift and right click the white area. In the pop-up menu click open command window. This will open a command prompt with you already placed in the EventGhost directory. Then key in eventghost -debug. You will see all kinds of red printing showing up in the log. This is ok and normal. Run EG as usual. When you get that error copy from the 20th line above the error to the 20th line below it. Make sure you have e log macros and log times enabled. Paste that information into a new text file and attach it to a forum posting. Then in the file explorer in the address bar type in %appdata%\eventghost and press enter. In there you will see log.txt. attach that to the same forum post. If you think there might be information in either of the files that you do not want others to see. Please zip the 2 files up and send them to me in a PM

.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

ok so here are my findings.. and why this is not going to be possible

Unfortunately this is due to a limitation in Windows I have spend a whole lot of hours researching and trying to find a way. but every single thing i try i slam into another wall.

I can't use WMI to access the device directly as the SetPowerState for the device in WMI is a dead stick. and as it turns out even tho Microsoft documented it, it doesn't exist.
And I thought about just blacking the screen... and I know that there would be a glow form it but at least it would have been better then nothing.. but this simply will not work either because the virtual monitor that gets made during an RDP session actually is a mirror of the other monitor/monitors, so if i black out the physical one the RDP one will get blacked out as well.

And when a command is sent to windows to turn off the monitor(s) it does this for all of them including the RDP one. and that is when RDP gets all pissed off about it. So there is a bug in windows with respects to that bit of it. it shouldn't try to turn off the RDP monitor because it is not a real monitor but for some crazy ass reason it does.

OK so I also thought of another possible way. I remember stumbling across something about creating a virtual monitor but that is not a real monitor. it's a do nothing thing. it was made to be a place holder for when a physical monitor gets powered off so your icons do not get all jumbled about. But something like this could be used and when the RDP session starts it would move your whole desktop over to the "dummy monitor" and if you use something like teamviewer you have the ability to only view a specific monitor and then the physical one can get blacked out still not turned off but better then nothing. Bad part is I can't find it again. and I do not remember what it was called..

another solution. If i do remember correctly with RDP it will show a login on the host computer screen once an RDP session starts. we can change the login wallapaper to black. and I am not sure if there is a means to remove the login box. I would have to research that.

Simply Windows sucks at handling multiple monitors. it always has and probably always will and this sucking apparently extends to virtual monitors as well.
If you like the work I have been doing then feel free to Image
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

I think somehow I led you astray unless RDP has something to do with the monitor in general but I would not think it does. I have no intention of running RDP (Can't on Windows Home as it does not exist). I am using VNC but that is only for accessing PC for setting it up and during my testing I have started disabling it to ensure it does not screw up testing. The real reason I am doing that is because the keyboard it has is a mini keyboard the size of an xbox controller. This unit is a minix PC and has a touch screen monitor. It will eventually be running as a Home Automation control panel with no keyboard. So the only time I would use VNC is if I needed to work on it which once it is setup will be rare because the HA Panel interface is web based and managed online.

I do have an update - good and bad. I realized this morning that I don't think I ever tried Run as Administrator as you suggested yesterday. I did and it worked perfect - except the dam lock screen came back! which is not your issue. Confirmed my registry setting was there but it stopped working to disable it. So I started to post about this and decided to wait and test more before I gave false information. Low and behold, the PC updated to the new Windows and Fd everything up. I am going to uninstall EG and reinstall since this was a major windows update. May have jacked something up on it. I will do that and let you know.

thanks again for everything!
scott
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

Remote Desktop Protocol = RDP has nothing to do with MS RDP

VNC is a Remote Desktop piece of software. the mechanics all still operate the same the only difference is the actual transport, how the information is compressed when it is sent from one computer to the other things of that nature. So when i state RDP without putting an MS in front of it it encompasses all forms and programs that are able to provide a Remote Dersktop.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

well i hope you succeed. I have been dealing with this issue from a couple of users. or a similar issue. it's frustrating to say the least. And MS changing things around all the time is not helping.
If you like the work I have been doing then feel free to Image
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: simple task to wake up monitor - screen saver

Post by blaher »

scottsams wrote: HTTP.ST.Light Bakers Rack.switch.on []
Re-enable monitor
Turn On Monitor
System.Monitor.On
Webserver error /?ST.Light+Bakers+Rack.switch.off
System.Volume '34.00'
System.Monitor.Off
Exception [Errno 10053] An established connection was aborted by the software in your host machine
System.Volume '96.00'
Webserver: Exception on handle_one_request: [Errno 10053] An established connection was aborted by the software in your host machine
System.DeviceRemoved [u'\\\\?\\DISPLAY#ACI16F1#4&1f623c7c&0&UID198155#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}']
System.Monitor.On
----------------------------------------
Exception happened during processing of request from ('::ffff:192.168.1.134', 45896, 0, 0)
Traceback (most recent call last):
System.DeviceAttached [u'\\\\?\\DISPLAY#ACI16F1#4&1f623c7c&0&UID198155#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}']
File "SocketServer.pyc", line 596, in process_request_thread
System.Monitor.Off
File "SocketServer.pyc", line 331, in finish_request
File "SocketServer.pyc", line 654, in __init__
File "SocketServer.pyc", line 713, in finish
File "socket.pyc", line 283, in close
File "socket.pyc", line 307, in flush
error: [Errno 10053] An established connection was aborted by the software in your host machine
----------------------------------------
I use the webserver too, and got the same error, but even with debug on, nothing showed up in the logs. It showed up on the side of EG, but I couldn't capture it.

But I did just get a crash, and got both log, and screenshot. So it either crashed trying to set my audioendpoint to a device that didn't exist because I was in remote desktop, or the crash happened when I logged in 'locally' after remote desktoping.
Attachments
This is the macro where the eg log stopped working.
This is the macro where the eg log stopped working.
eglog.zip
(11.21 KiB) Downloaded 102 times
Capture.JPG
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

I am telling ya this all has to deal with virtual drivers being used in any kind of a remote desktop session.. i do not care if your use MS RDP, VNC, Teamview, 2xRDP or any of the like. they all have to use virtual drivers for things like sound and video to do the redirection. So if you try to perform any device specific things.. like changing the resolution, or turning on and off the monitors.. if you use volume up and down. those might work properly if you only use the "primary sound driver" because how EG is coded it will always select the default sound device. where as audio end point is very specific to the sound card. so it is not going to function properly.. and this would because there is a layer in between the RDP session and the real hardware. so the RDP session is unable to see it. the monitor on and off thing has to deal with the fact that it only has the ability to turn on and off all of the monitors. and because an RDP session creates a virtual monitor... and that monitor does not have a power switch and it is more then likely not coded to even act like it does. there is a slew of virtual drivers. just go and look in device manager from inside of the remote desktop session. tell me if you see your usual stuff in there?? i will bet a lot of it is not in there. any usb devices will not be unless you have usb redirection turned on. printers will not be either. the monitor/videocard are going to state they are virtual or RDP drivers. as will the sound card.

unfortunately this is the limitations of a hypervisor layer it does not allow direct access to hardware. there are people working on it. starting off with video cards.. but the devices have to be designed to be shared. it's going to be a very long while before we see something that is at a consumer end of things. close to 10 years I would imagine.
If you like the work I have been doing then feel free to Image
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

all of my testing now has no RDP services running. teamview, VNC, etc.

i will get you debugs later.

one thing of note is I see no errors but what is interesting - when i try Screen Saver on (instead of turn monitor off because this is an option for me), and use a keystroke to stop Screen Saver, it does not work even though the keystroke does work.

i tested this by activating Screen Saver with event, then the wake up event was to use the {Escape} keystroke. before I activated the Screen Saver, I opened Notepad and dropped the File menu down. once I ran the routines, and the Screen Saver did not quit, I manually quit it with space. the File menu was gone and the log shows it ran. same happens with mouse movement as well. it does it but does not terminate the Screen Saver. kind of odd.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

Ok as far as keystrokes and mouse movements go. The screen save is an actual application that is running. So with a keystroke unless you specifically use the find window and Target the screen saver before you do the send keystroke it is going to default to the last window that was found when using the find window action or whatever is in focus after that. So that is where a complication could be. Now as far as mouse movements go. I. Not sure if windows will send a notification for a mouse movement that was programmatically done. It seems as though it does not. So if EG tells windows to move the cursor. Technically speaking it is not a mouse movement and therefore windows I would imagine would not send an event that the mouse moved. Because it didn't. Only the cursor on the screen moved. So the screen saver would never know the cursor moved as it only listens to windows messages for mouse movement.

I would have to test that. And it would be as simple as installing the MouseEvent plugin and then using EG to move the mouse and see if you get events from the MouseEvent plugin

It sounds like a good line of BS. But it might be how it works. It sounds like it could be possible. I have never checked. I will do so this evening. The keyboard I am almost 100% sure. I would have to get you the process name for the screen saver because you obviously will not be able to look through the find window action for it and have it running at the same time. But you can manually key in the information.
If you like the work I have been doing then feel free to Image
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

no, that makes complete sense. i assumed it was something like that. i thought someone had mentioned they used mouse button click or something but maybe they were doing something different.
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

kgschlosser wrote:So with a keystroke unless you specifically use the find window and Target the screen saver before you do the send keystroke it is going to default to the last window that was found when using the find window action or whatever is in focus after that.
is this possible? if so any guidance is appreciated. i'd like to try it.

thanks!
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

yeah let me see if i can log the process list and start a screen saver and see what comes up
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

These are the names of the screen saver processes. if you have additional ones in windows 10. what I would do is install the process watcher plugin. and then preview each screen saver. this will spit out the process name.. without the .scr at the end..
Bubbles.scr
Mystify.scr
PhotoScreensaver.scr
Ribbons.scr
ssText3d.scr
scrnsave.scr

I have attached some code below that you can copy and paste into your tree.. literally copy the code. and then right click the tree on the Configuration tree in EG and click on paste.
This is going to be a complete macro that you will be able to test if you install the process watcher plugin and then preview any of the above screen savers. after 1 second the preview will stop
all you will need to do is to remove the Wait action and change the event to whatever it is that you want to trigger the action
And this does work. I have tested it..

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
    <Macro Name="Shutdown Screen Saver" XML_Guid="{C41D03AC-2B16-4C8D-AEF6-1305B8EDEA73}">
        <Event Name="Process.Created.Bubbles" XML_Guid="{893915E5-F60D-435A-A5A1-AB803ACB7324}" />
        <Event Name="Process.Created.scrnsave" XML_Guid="{A1629893-5807-48C4-849B-12145AFF943B}" />
        <Event Name="Process.Created.ssText3d" XML_Guid="{25F9E9D8-9C4E-4AFF-93CD-52272A31B028}" />
        <Event Name="Process.Created.Ribbons" XML_Guid="{0780A1FB-97F0-4254-823D-FDC6F66B3075}" />
        <Event Name="Process.Created.PhotoScreensaver" XML_Guid="{3B286B5E-2829-4AF0-8A11-1F5F8783F74C}" />
        <Event Name="Process.Created.Mystify" XML_Guid="{68A9A468-B68E-4D32-8BEB-97F7C4B1A9EF}" />
        <Action XML_Guid="{F9B12AE7-DFBB-460B-9B29-A93A7378DECE}">
            EventGhost.Wait(1.0)
        </Action>
        <Action XML_Guid="{888CB011-0C8D-4E15-9F15-DD62F7B293D1}">
            Window.FindWindow(u'Bubbles.scr', None, None, None, None, 1, True, 1.0, 0)
        </Action>
        <Action XML_Guid="{EB5FD277-B65F-42AB-84F1-279F8D2B568D}">
            Window.SendKeys(u'{Space}', False, 2)
        </Action>
    </Macro>
</EventGhost>
If you like the work I have been doing then feel free to Image
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

i am doing something wrong or i just have the worst luck. installed process watcher, copied your macro (pasted back here what i used) and as instructed removed the wait. i set my screensaver to Bubbles.SCR and confirmed it was there and name was correct. copied eg log.

launched macro and set screensaver to 1 min. it does not ever seem to find the window.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
    <Macro Name="Shutdown Screen Saver" XML_Guid="{C41D03AC-2B16-4C8D-AEF6-1305B8EDEA73}" Expanded="True">
        <Event Name="Process.Created.Bubbles" XML_Guid="{893915E5-F60D-435A-A5A1-AB803ACB7324}" />
        <Event Name="Process.Created.scrnsave" XML_Guid="{A1629893-5807-48C4-849B-12145AFF943B}" />
        <Event Name="Process.Created.ssText3d" XML_Guid="{25F9E9D8-9C4E-4AFF-93CD-52272A31B028}" />
        <Event Name="Process.Created.Ribbons" XML_Guid="{0780A1FB-97F0-4254-823D-FDC6F66B3075}" />
        <Event Name="Process.Created.PhotoScreensaver" XML_Guid="{3B286B5E-2829-4AF0-8A11-1F5F8783F74C}" />
        <Event Name="Process.Created.Mystify" XML_Guid="{68A9A468-B68E-4D32-8BEB-97F7C4B1A9EF}" />
        <Action Enabled="False" XML_Guid="{418188CA-3AE9-420C-B98E-3EA61EE283D9}">
            System.StartScreenSaver()
        </Action>
        <Action Enabled="False" XML_Guid="{F9B12AE7-DFBB-460B-9B29-A93A7378DECE}">
            EventGhost.Wait(1.0)
        </Action>
        <Action XML_Guid="{888CB011-0C8D-4E15-9F15-DD62F7B293D1}">
            Window.FindWindow(u'Bubbles.scr', None, None, None, None, 1, True, 1.0, 0)
        </Action>
        <Action XML_Guid="{EB5FD277-B65F-42AB-84F1-279F8D2B568D}">
            Window.SendKeys(u'{Space}', False, 2)
        </Action>
    </Macro>
</EventGhost>
Attachments
eglog.txt
(3.8 KiB) Downloaded 89 times
Post Reply