Turn on Monitor: doesn't

Found a bug in EventGhost? Report it here.
blaher
Experienced User
Posts: 494
Joined: Thu Nov 17, 2011 1:27 am

Turn on Monitor: doesn't

Post by blaher » Fri May 26, 2017 4:29 am

I found a little problem when trying to wake my monitor up from sleeping to display an OSD message and have attached some logs. Hope it helps.
Attachments
loga.txt
Just the log without matching EG tree log: it crashed before I could copy it.
(54.23 KiB) Downloaded 161 times
eg log.txt
(4.25 KiB) Downloaded 149 times
log.txt
(3.88 KiB) Downloaded 158 times

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

Re: Turn on Monitor: doesn't

Post by kgschlosser » Fri May 26, 2017 1:52 pm

what version of EG are you running?
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 494
Joined: Thu Nov 17, 2011 1:27 am

Re: Turn on Monitor: doesn't

Post by blaher » Sat May 27, 2017 2:45 am

0.5.0- rc2

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

Re: Turn on Monitor: doesn't

Post by kgschlosser » Sat May 27, 2017 3:33 am

ok what you are seeing is merely a trigger event wait that is timing out it normally will just pass this by if it happens. but because you have debugging enabled it it set to print out the stack if this happens.. do you get these errors with debugging disabled?
If you like the work I have been doing then feel free to Image

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

Re: Turn on Monitor: doesn't

Post by kgschlosser » Sat May 27, 2017 3:47 am

and I am also not sure what is going on here and why the monitor is turning on and off like that all within one second.

Code: Select all

14:03:39   System.Monitor.On
14:03:39   System.Monitor.Off
14:03:40   14:03:40: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=919860, uMsg=536L, wParam=32787L, lParam=6848792)
14:03:40   System.Monitor.On
ok so this is what i see you have a monitor.off event with a proper debug log entry
14:03:07 14:03:07: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=919860, uMsg=536L, wParam=32787L, lParam=6848312)
14:03:07: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=919860, uMsg=536L, wParam=32787L, lParam=6848312)
14:03:07 System.Monitor.Off

not sure what these errors are
14:03:34 Jvc: wrong header pulse
14:03:34 Motorola: wrong header pulse
14:03:34 Nec: wrong start pulse
14:03:34 Nrc17: pre-space too short 0
14:03:34 Rc5: wrong bit transition

it looks as tho the OSD is triggered when you press the number 8 on your remote and not a monitor event

14:03:34 MceRemote.Mce.Num8
14:03:34 MiCasaVerde Vera: Set Binary Power: 52
14:03:34 Show OSD: Waiting for Delivery

14:03:34 14:03:34: 1 MainThread: OSDFrame.ShowOSD(osdText=u'Waiting for Delivery', fontInfo=u'0;-96;0;0;0;700;0;0;0;0;3;2;1;49;Courier New', textColour=(0, 0, 255), outlineColour=(0, 0, 0), alignment=4, offset=(0, 0), displayNumber=0, timeout=10.0, event=1992, skin=u'Default')
14:03:34: 1 MainThread: OSDFrame.ShowOSD(osdText=u'Waiting for Delivery', fontInfo=u'0;-96;0;0;0;700;0;0;0;0;3;2;1;49;Courier New', textColour=(0, 0, 255), outlineColour=(0, 0, 0), alignment=4, offset=(0, 0), displayNumber=0, timeout=10.0, event=1992, skin=u'Default')

14:03:34 14:03:34: 1 MainThread: OSDFrame.OnPaint(dummyEvent=<wx.PaintEvent>)
14:03:34: 1 MainThread: OSDFrame.OnPaint(dummyEvent=<wx.PaintEvent>)


Now what I see is. it looks as tho you are displaying an OSD on a non existent monitor because the monitor is turned off.

14:03:34 Turn On Monitor
14:03:34 14:03:34: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=919860, uMsg=536L, wParam=32787L, lParam=6848344)
14:03:39 14:03:39: 0 MainMessageReceiver: timeout TriggerEventWait
14:03:39 14:03:39: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=919860, uMsg=536L, wParam=32787L, lParam=6848728)


this is what i find odd. is that you have multiple events for the on and off of the monitor but only one debug entry
14:03:39 System.Monitor.On
14:03:39 System.Monitor.Off
14:03:40 14:03:40: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=919860, uMsg=536L, wParam=32787L, lParam=6848792)
14:03:40 System.Monitor.On


now these are debug log entries that have the same timestamp as the above on and off events. but the param for monitor.off is 6848312 and that number is not used in any of the debug log entries below. i do however believe that 6848792 is for a monitor.on event and as you can see there is only one debug log entry but there are 2 events.

14:03:34: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=919860, uMsg=536L, wParam=32787L, lParam=6848344)
14:03:39: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=919860, uMsg=536L, wParam=32787L, lParam=6848728)
14:03:40: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=919860, uMsg=536L, wParam=32787L, lParam=6848792)
14:03:39: 0 MainMessageReceiver: timeout TriggerEventWait


this is very strange.

But first off. turn on the monitor before you try to set an OSD give that a shot and see if it solves the issue
If you like the work I have been doing then feel free to Image

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

Re: Turn on Monitor: doesn't

Post by kgschlosser » Tue May 30, 2017 3:42 am

Status on this? Did turning the monitor on then making the OSD solve the issue? You may want to toss a little wait action in between turning the monitor on and displaying the OSD
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Re: Turn on Monitor: doesn't

Post by Snowbird » Thu Jun 01, 2017 10:15 am

Hi,

I don't know if it's related but I have a similar error with the PowerBroadcastNotifier, as soon as I plug or unplug the power line, an error is generated :

Image
Full Screenshot view : https://lut.im/3m794W8gia/hxJRLMQ2ZQWQWUWV.png

I have tried this without any plugin, it's just a fresh install with nothing running, so nothing must be interfering. FYI I also disabled the view of the "Log Debug Info". The "funny" thing is that it doesn't seem to have any consequences (good or bad), so I guess it's not something bothering besides the fact the it shows up in the log in red.

If my post is not related to the original topic, please move it to a new topic, and sorry if I didn't do it myself in the first place, as I thought it might be related in a way.

Thanks.

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

Re: Turn on Monitor: doesn't

Post by kgschlosser » Fri Jun 02, 2017 3:35 am

ok that would be a bug. I am going to take a look see it it. but they very well could be related. I will know more shortly.
If you like the work I have been doing then feel free to Image

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

Re: Turn on Monitor: doesn't

Post by kgschlosser » Fri Jun 02, 2017 4:23 am

ok so the attached file is a replacement for the PowerBroadcastNotifier.py file in C:\Program Files (x86)\EventGhost\plugins\System. I believe this might clear up both problems. so give this a test and see if it does. and if so I will get it added to EG.

thanks for letting me know about the error. and it was actually pretty stupid what i did and what caused it. but this was also my first time every writing code to access the windows API directly.
and now that i have worked a lot more with the windows API i see where my error was.

let me know if there are any issues. screen shots of any errors. and attach log files if they are available.
Attachments
PowerBroadcastNotifier.py
(6.97 KiB) Downloaded 194 times
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Re: Turn on Monitor: doesn't

Post by Snowbird » Fri Jun 02, 2017 7:30 am

Hi Kevin,

Thanks for this fix, I replaced the file and no more errors for me, everything is good now !
Thank you again ! ;)

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

Re: Turn on Monitor: doesn't

Post by kgschlosser » Fri Jun 02, 2017 12:37 pm

No worries I will get this fix added to the core code. Thanks for finding this so we can get it fixed. You are the only person I know of that is using this on a laptop. I do ha e a question tho. Does the battery level events work properly? It is supposed to let you know when your battery level drops. Also if you are running Windows 8 or 10 when the battery level drops low enough or when you switch over to battery your screen should dim. Do you get an event for that?
If you like the work I have been doing then feel free to Image

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

Re: Turn on Monitor: doesn't

Post by kgschlosser » Fri Jun 02, 2017 12:40 pm

@blaher

Give this fix a try. I have a sneaky suspicion that it might fix the issue you are having as well.
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Re: Turn on Monitor: doesn't

Post by Snowbird » Fri Jun 02, 2017 4:32 pm

kgschlosser wrote:No worries I will get this fix added to the core code. Thanks for finding this so we can get it fixed. You are the only person I know of that is using this on a laptop. I do ha e a question tho. Does the battery level events work properly? It is supposed to let you know when your battery level drops. Also if you are running Windows 8 or 10 when the battery level drops low enough or when you switch over to battery your screen should dim. Do you get an event for that?
Here's what I see :
Image

It looks like it's working as expected, the only thing that is not clear to me is about the time needed before firing the event Monitor.Dim and Monitor.Off, is it adjustable or it follows the operating system setup ? BTW, I'm using Win10 Pro.

Is there a way to list all the possible Events ? I mean those only related to EG without any plugins, I'm curious to know what is available :)

Thanks

PS. if you need me to test anything don't hesitate a second ! :) I'd be glad to help that's the least I can do.

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

Re: Turn on Monitor: doesn't

Post by kgschlosser » Sat Jun 03, 2017 8:51 am

If you like the work I have been doing then feel free to Image

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

Re: Turn on Monitor: doesn't

Post by kgschlosser » Sat Jun 03, 2017 8:52 am

you have to set when the monitor dims in the power settings of windows EG will report when it does dim
If you like the work I have been doing then feel free to Image

Post Reply