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:OK I am not personally running Windows 10. so you will have to walk me through exactly what you are trying and what is/is not working. Windows 10 has caused a lot of hiccups in EG and we are trying to work through them. Microsoft likes to change their API and we might have to make some adjustments. So lets go through exactly what you are trying to do step by step.

if you can copy and paste the macro you are trying to run into a post that would help. also if you can dun eventghost from the command line with the -debug switch and post you %appdata%/EventGhost/Log.txt file that would help also.

Sorry for delay, I had some other projects I had to get wrapped up. Here is a past from my macro. Your monitor off macro worked shutting monitor down and turning it back on but Windows Lock screen comes on which won't work for me. Using Windows 10 Home and tried setting register to disable lock screen but it did not work. If I could figure that out I would be good. So I tried Windows Screen Saver instead and activating it does work however I cannot get anything to wake the system up. See below. Adding debug too.


<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
<Macro Name="Re-enable monitor" XML_Guid="{9BA5907F-085A-49D9-8DCC-6F9FA86F0B09}" Expanded="True">
<Event Name="HTTP.ST.Light Bakers Rack.switch.on" XML_Guid="{280932C5-BFE8-49AE-967A-5247484C2A31}" />
<Action XML_Guid="{5E9713BA-C02E-421F-9107-2AF6E442A798}">
Window.SendKeys(u'{ESC}', False, 2)
</Action>
<Action Enabled="False" XML_Guid="{1871206B-2142-4F1B-BBD8-F11F35AB2D96}">
System.MonitorPowerOn()
</Action>
<Action XML_Guid="{8A4DB3F4-10B3-45C2-AD40-5FDD857D1ED4}">
Mouse.LeftDoubleClick()
</Action>
<Action XML_Guid="{C5236EDE-B879-4165-A201-4D0FFF1C76A7}">
Mouse.LeftButton()
</Action>
<Action XML_Guid="{40D49B72-EB31-4CDD-991A-4EA66C9DF67A}">
Window.SendKeys(u'{Up}', False, 2)
</Action>
</Macro>
</EventGhost>
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 »

debug file here
Attachments
Log.txt
debug
(6.71 KiB) Downloaded 81 times
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 let me get this right. you are waking up the monitor but you get the windows lock screen?
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 »

correct. your macro puts monitor to sleep. upon wake, i get the windows lock screen. i don't have a username/pwd but for whatever reason windows 10 they felt they had to put it on there. i searched and found an alleged way to remove that with a registry hack - windows HOME. all other versions you can use GPO to disable that but not HOME. i put it in and it works on a reboot - no lock screen but when monitor wakes i get it.

that is what i was trying screen saver (EG does turn it on) but EG does not wake it with key strokes or moves moves/buttons - hence macro i pasted.

...well hold that thought. i checked and the reg change was there. searched again and found another one and applied it. after i did, it is working as expected. only had a brief time at lunch to test. i will test more later to confirm but it looks like monitor off, monitor on is now working with no lock screen!
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 »

awesome. rc4 should have fixed the issue with the monitor not being turned on from an action. I do not know if you have tried this yet since we released it. But congrats on the lock screen. if you could post what the registry change was that got you past this it would be great so if another user comes across the same problem they will be able to get rid of the issue as well. maybe in the tutorials section if you wanted to. I like having all of the bits that managed to fix an issue posted for others..

Thanks again. and I am glad you discovered how to get it all sorted.
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 do believe i downloaded it and installed it but not sure if i did on that machine. need to check. i was testing on multiple PCs. will post the link to the REG download i found. also threw something your way - albeit not much but i appreciate your help. great product! i am sure i will do much more with it as applications come up.

thanks again!
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 haven't found anything automation related that EG is unable to accomplish. and TY for the compliment about EG. A lot of hours have been spent making it. and every single day we strive to make it even better. so if there is anything it is missing then please do let us know. or if you have any other issues/problems/learning curve we are here to gladly help.
If you like the work I have been doing then feel free to Image
piert
Experienced User
Posts: 321
Joined: Tue Jun 14, 2011 2:53 pm

Re: simple task to wake up monitor - screen saver

Post by piert »

piert
Experienced User
Posts: 321
Joined: Tue Jun 14, 2011 2:53 pm

Re: simple task to wake up monitor - screen saver

Post by piert »

Or this in case of remote desktop with Win 10 professional:
https://techjourney.net/remote-desktop- ... isconnect/
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 »

Well crap. I spoke too soon. I came back to just do some more testing and things got really odd. Not sure what happened because I made no other changes. In testing monitor would turn off but turning on it would come on and immediately go off. This happened multiple times until I was able to get on and shut down EG. Just tried again and it did it once. Pasting log to see if you can gleam anything from it. Getting tracebacks.

---> Welcome to EventGhost <---
HTTP.ST.Light Bakers Rack.switch.on []
Re-enable monitor
Turn On Monitor
HTTP.ST.Light Bakers Rack.switch.off []
Shutdown Monitor
Turn Off Monitor
System.Monitor.Off
Task.Created.LockApp
Task.NewWindow.LockApp
Task.Deactivated.EventGhost
Task.Activated.LockApp
Task.Deactivated.LockApp
Task.Activated.Desktop
HTTP.ST.Light Bakers Rack.switch.on []
Re-enable monitor
Turn On Monitor
HTTP.ST.Light Bakers Rack.switch.off []
Shutdown Monitor
Turn Off Monitor
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
----------------------------------------
System.Monitor.On
Task.ClosedWindow.LockApp
Task.Destroyed.LockApp
Task.ClosedWindow.explorer
Task.NewWindow.explorer
Task.Deactivated.Desktop
Task.Activated.explorer
System.Monitor.Off
Task.ClosedWindow.explorer
Task.NewWindow.explorer
Task.Deactivated.explorer
Task.Activated.explorer
Task.Deactivated.explorer
Task.Activated.EventGhost
System.Monitor.On
Task.Deactivated.EventGhost
Task.Activated.Desktop
Task.Deactivated.Desktop
Task.Activated.EventGhost
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 »

the traceback errors are from whatever it is you are using the webserver for.


the monitor turning on and off things is the exact same issue another user is having when using Microsoft RDP and turning it on and off. and this has to do with the mechanics of RED. my suggestion to you would be to use an RDP program like TeamViewer which acts more like a screen mirroring program then an actual additional monitor attachment per say. I am working on a way to be able to turn off a specific monitor. the issue here is that either you will have to explicitly change the WMI (Windows Management Instrumentation) security descriptors to include permissions for your user account to be able to access the bits and pieces of WMI to be able to do this. or you will have to run EG as an administrator. This method would also circumvent Windows handling the request you would be talking almost directly with the driver for the monitor. and that would be almost like you pressing the button to turn the thing off. I already have a working version of this. Tho i have not tested it with RDP but I am pretty confident it will work. it may not with Microsoft RDP because of how it handles the Hardware and what hardware is accessible from the RDP session. but i am pretty sure it would be available with Teamviewer and similar programs.
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 »

not completely following the traceback issue. what i am doing is using the EG app in Smartthings that sends events to EG via the web service. i.e. motion detected - turn monitor on, motion inactive turn it off. this is really the first time i have seen the tracebacks. may be a windows update that screwed something?

Home does not have RDP (i hate HOME). i am using VNC. but I have stopped using it when testing albeit the service is still running. i will try disabling the service and test again.
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 »

Check your device manager. I bet you will see devices I. There that are virtual ones from vnc.
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 »

As far as the trace back goes it appears as though the host (whatever EG is connecting to) aborted the connection.

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
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 »

Also as a suggestion. Because this will make the log data easier to read. If you could turn on the log times before you copy. And also use the code tags when posting [ code ] before the pasted information and [ /code ] after without the spaces in them. This will keep the formatting of the log. So we know what is a macro and what is an action. The actions get indented under the macro also make sure you have the log macros enabled as well. It makes it a lot easier to try to figure something out if these things are done. Also... If you run EG from a command line with -debug for a switch it will create a file %appdata%\eventghost\log.txt with a bunch of additional logging information. Attaching that file is also helpful. Make sure you delete the file if it already exists then run EG
If you like the work I have been doing then feel free to Image
Post Reply