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.

WIN7 Away mode

If you have a question or need help, this is the place to be.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: WIN7 Away mode

Post by kgschlosser »

I just tested it.. i completely forgot that i still had the sleep option in my start menu.. and it works. eg 0.5
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: WIN7 Away mode

Post by kgschlosser »

Just paste it into a script and run it.. no need to make any files.. I have not tested it this way.. I am going to mess around with it some more to see if everything is good to go.. because it is a whole lot less code then the previous solution. But it may only work with EG 0.5 which is not an issue.
If you like the work I have been doing then feel free to Image
AceoStar
Posts: 9
Joined: Thu Jan 12, 2017 1:28 am

Re: WIN7 Away mode

Post by AceoStar »

hmm. I'm on. 0.4.1 r1722. I'm running it in my \EventGhost folder, because wasn't sure what script to paste it into.

Code: Select all

C:\Program Files (x86)\EventGhost>py test.py
11:19:42 PM: Debug: src/helpers.cpp(140): 'CreateActCtx' failed with error 0x00000715 (the specified resource type cannot be found in the image file.).
I tried reverting to the last version of PowerBroadblabla and that didnt make a difference.

edit. oh. I see you are on 0.5? I'll check the dev release.
AceoStar
Posts: 9
Joined: Thu Jan 12, 2017 1:28 am

Re: WIN7 Away mode

Post by AceoStar »

I updated to 0.5 beta 5 and ran that script again and did not get an error. But now that I am running the original version of the PowerBroadcastNotifier, I'm not seeing the events. I replace PowerBroadcastNotifier again, I start getting events. Hope that helps.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: WIN7 Away mode

Post by kgschlosser »

it's ok

I re designed the whole shebang. and i submitted a request to have the code added.. I am in good spirits that it will..

the redesign will now provide events for the following i do hope it's enough.. I am sure I could probably dig up more LOL

monitor on
monitor off
monitor dim (windows 8+)

away entered
away exited

system suspended
system resumed
system resumed automatic

system power line (AC)
system power battery (dc)
system power UPS

battery level 0-100%

power plan high performance
power plan balanced
power plan power saver

power saver on (usually when on battery)
power saver off (usually when on battery)
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: WIN7 Away mode

Post by kgschlosser »

Oh I also submitted the fix for being able to turn the monitor on in windows 8+ since i think it was you that mentioned that.. don't remember if it was you or not honestly
If you like the work I have been doing then feel free to Image
AceoStar
Posts: 9
Joined: Thu Jan 12, 2017 1:28 am

Re: WIN7 Away mode

Post by AceoStar »

Perfect! Yeah that was me. Fixing these two issues in the main release makes the mqtt/EventGhost/Smartthigns tutorial I'm working on much easier :D
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: WIN7 Away mode

Post by kgschlosser »

if ya want i can shoot ya over the repaired files.
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: WIN7 Away mode

Post by kgschlosser »

well good news... the code has been added into eg 0.5 so expect to see the changes in the next release

for turning on the monitor as well
If you like the work I have been doing then feel free to Image
Post Reply