Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

Feature request - Timer for Atrract Screen Saver


Bonscott

Recommended Posts

All,

Here's an idea I've had for a long time and would love to see implemented (if possible). I love having the attract screensaver running on my cabinet playing random games. It's cool to walk into the room and see a game playing like walking through an arcade. The problem is that it uses a lot of electricity since the computer is basically running games all day, every day. I think it would be great to be able to specify a time window where the attract screen saver would run and then outside that window, the computer would go into standby mode. I don't know if it's possible for GameEX to wake the computer out of standby automatically though. This would be nice so I could have the attract screen saver running in the evening when I'm home and automatically go into standby saving electricity at night and during the day when I'm at work.

Thanks,

Bonscott

Link to comment
Share on other sites

Hmm, It's the monitor wasting electricity more than the computer itself. Why not just have the computer power down the monitor after xx minutes?

Link to comment
Share on other sites

Well, they both waste power but having it power down after a predetermined time would defeat the purpose. I like to walk in the room and see a game playing but I don't need it running from say midnight to 5pm. During this time, both the monitor and computer could be in standby and saving electricity. Can the computer even powerdown the monitor when GameEX is running the attract mode? I think you either have to run attract mode 24/7 or have GameEX put the computer into standby but you can't do both. Am I wrong?

Anyway, it's just an idea and certainly not a big issue for sure. I thought I would throw it out there and see if it was possible.

-Bonscott

Link to comment
Share on other sites

While I think these are good points, you may run at odds with agains the myriad of power settings that are available via the OS. You could set your own power settings and there are utilities (I believe) both freeware and purchased, that can be used to fine-tune and schedule sleep and power-downs of your HDDs, PC, Monitors, etc. Keep in mind that GameEx is a gaming and HTPC frontend and not an OS. The more that is added outside of its intended function may only servesto bloat and slow it down... kind of like government when it tries to be all things to all people.

Link to comment
Share on other sites

It's true that PC's have their own power management functions but they aren't available when GameEX is running in attract mode. Also, an arcade cabinet PC is not a typical PC setup. Since GameEX can start the screen saver or put the computer in standby when not in use, maybe it can manage the time frames it does these actions in. Maybe it can't put the computer into standby and bring it out but at the very least it could stop running the attract mode and turn off the computer monitor based on the timer.

-Bonscott

Link to comment
Share on other sites

There are a couple ways you can start your computer from the "off" state.

Note: I say "off" rather than off because if it's truly completely off, nothing could restart it. If the system is in a very low level powered down state, it is still drawing power, but it's capable of watching for things like keyboard, network, USB, etc inputs. In an actual off state, there is effectively no power at all. If you turn your PC off with Windows, that will get you to the low power state (unless otherwise specified in BIOS). If you unplug the machine and then plug it back in, that will be the true off state.

So, if you want to have your system power up at a given time, I don't think you can have it in the off state (or else you'll need a complicated relay setup to "push" the power button). But, if you are in that low power state, you can do a couple things. If your system BIOS supports it, you can simply schedule it to power on (for that matter, it might even have a scheduled power down too). If it doesn't have that, you can use a trigger like "On keyboard" or "On network" or "On USB" (e.g., mouse) to wake the machine. At that point, the system would power up if the keyboard or mouse were used or if another machine pinged the system. If you use the "On network" trigger, you could set up a scheduled task on another system to ping the arcade PC at the desired time.

If you opt to just hibernate, there are SO many available options that would work better IMO.

As for shutdown, you could simply use the task scheduler in Windows or find another app that you like better. This one might even be something that Tom would consider adding since it's really not complicated. The only issue I see is deciding what to do if someone is playing the cab when it's time to shut down...

Link to comment
Share on other sites

BK - If Tom could throw together a task scheduler as you noted, then I would think it relatively simple to plug in an "if-then -else" or 3 or 4 to look for keyboard and mouse inputs and time since last input to initiate the shutdown, sleep or hibernate sequence based upon the parameters set by the admin user of the cab/htpc.

Link to comment
Share on other sites

Yeah something like:

Public Function Event_ScreenSaver(ByVal Type As Integer) As Boolean
'Enter = 0,
'Start = 1,
'End = 2,
Select Case Type

Case 0
AttractTimer.Interval(2700000) ' <---userSetInterval
AttractTimer.Start()
Application.SetSuspendState(PowerState.Hibernate, true, true)
Case 1
AttractTimer.Interval(2700000) ' <---userSetInterval
AttractTimer.Start()
Application.SetSuspendState(PowerState.Hibernate, true, true)
Case 2
AttractTimer.Stop()
End Select
Return True
End Function

If I get the plugin system, you could start the timer when you enter Attract Mode or it starts on it's own (Case 0 is Enter Attract and Case 1 is for when it launches itself, right?) Use the Application Suspend method to make your machine hibernate when the timer is reached, and stop the timer if you exit Attract Mode. Shouldn't even need Tom to implement it if the plugin system can already process events for Attract Mode. Of course, this is a suggestion and will likely need a lot of fine tuning (userSetInterval field for one so you can specify the amount of time before the machine hibernates) and this may not hook Attract Mode the way I think it will... It would need to have an Event Handler instead of just doing it after so many minutes, but that's easy enough to do.

Tom will have to clarify as to whether I have the Use Case events right... but that should be an easy one. No need to screw around with detecting inputs really.

Link to comment
Share on other sites

Wow, there are ton of suggestions that came up just while I was typing this response! I'm probably dense, but I'm seeing two suggestions here. I think one of them is doable and the other is not (until someone inevitably corrects my erronious premises)

I think it would be great to be able to specify a time window where the attract screen saver would run and then outside that window, the computer would go into standby mode.

I don't think this is possible, but it's more a fundamental property of Windows than it is a GameEx issue. The thing about the screensaver is that it is actually running MAME games. I don't think Windows can simultaneously run MAME and be in standby mode. Likewise, I don't think there will be a net power savings here as the the processor is still running MAME and the monitor is still displaying it.

I like to walk in the room and see a game playing but I don't need it running from say midnight to 5pm. During this time, both the monitor and computer could be in standby and saving electricity.

This sounds like it could be accomplished via the Windows Task Scheduler. The trouble with asking GameEx to handle this functionality is that it tasks GameEx to behave like a surrogate operating system. Ideally you should be able to set up a scheduled task to put the computer to sleep and another to it wake up at predetermined times of day. When the machine wakes up it should continue to run whatever process was suspended during sleep mode. But as you noted, that's the big question; whether Windows can suspend GameEx and wake it up later. Theoretically it shouldn't be a problem, but of course I may very well be full of it!

Here are a couple of resources related to utilizing the Windows Task Scheduler:

Task Scheduler 2.0

Automate sleep wake in Windows 7

If you decide to pursue any of the above suggestions we'd love to hear how it turns out!

Link to comment
Share on other sites

Why couldn't you just have your machine hibernate after so many minutes of inactivity? Wouldn't it achieve the same results and be more effective than scheduling blackout times, or am I just off base here? Like what is the point of setting times and resetting them if you have an extra day off this week? Especially if saving electricity is the goal...

Seems like were overcomplicating it to me... ;)

Or I'm oversimplifying it perhaps?

Link to comment
Share on other sites

Seems like were overcomplicating it to me... ;)

Not yet . . . ^_^


@MadScientistMode=ON

O.K. here we go . . . first get two Arduinos (possibly just one). The first Arduino will be wired to a motion sensor device at the entry way to your game room. When this motion trigger is activated the first Arduino will relay the signal to a second Arduino equipped with a W5100 Ethernet Shield, using a modified Sdfrethsh shell having wake-on-lan capabilities. This Arduino pings your router which in turn wakes up the target machine (your MAME cabinet) from a hibernation state. On the target machine set up a scheduled task to run the MAME Screensaver whenever the machine wakes from hibernate. Bada-Bing, instant attract mode (give or take 30 seconds) any time you walk into the room.

And no, I don't think this would actually work. (well maybe . . .) ;)


@MadScientistMode=OFF

Link to comment
Share on other sites

Funny thing is it might actually work! Only one problem. How do you make the screensaver launch on wake? Lol!

Link to comment
Share on other sites

Maybe the request can be simpler. Right now GameEX detects inactivity of X minutes and then will either put the computer into standby or attract mode screen saver. The feature I'm asking for could simply be to have the option to set a time window for the attract mode. For example,from 5pm to midnight, if I haven't hit a key for X minutes, then start the attract screen saver. Else it should go into standby. If the attract screen saver is running and the window ends say at midnight, then GameEX stops the screen saver and goes into Standby. We could drop the complexity of having GameEX wake up the computer. This would be a great option for me and would probably be pretty easy to implement? Does anyone else like this idea? Regardless, GameEX is a superb program for running my MAME cabinet and with or without this option I'm very happy with it. Thanks Tom and company for all your hard work.

Thanks,

Bonscott

Link to comment
Share on other sites

You could also do that with an X10 device that works with ActiveHome Pro, you could actually do all of this from another PC. You would set up an action on motion to run a command line operation which would be to ping the cabinet. Then, when no motion has been detected for xx minutes, the motion sensor would trigger off. Have a different action send a command to hybernate the system. This would be really easy actually, but it would not be instant like the OP wants. This would take ~1-2 minutes to start up I suspect (just based on how long it takes to come out of hybernation).

ACTUALLY....I just thought of a really cool way to do it without the PC!!!

Ok, so still using X10 devices, you'll need:

1x X10 motion sensor (MS16A or MS14A or MS10A)

1x X10 transceiver (e.g., TM751)

1x X10 universal module (UM506)

So, this is really easy! Take the motion sensor and put it where you need to sense motion. Set it to a HU code that you choose (A1 for instance). Plug the transceiver and universal module in on the same bus of the house (this is important for proper communication). Set the transceiver to the same house code as the motion sensor (A for this example). Wire the power button on the PC to the universal module. Set the universal module to momentary and relay only and HU code A1 (or whatever you have the motion sensor set to). Set the motion sensor to send on/off in all conditions (not just night) and apply an appropriate delay time (probably set to maximum of 255 minutes).

Now when motion is seen, the the motion sensor will send the "ON" command to the universal module. This will cause the module to briefly press the power button on the PC. If you have the PC set to power on with button push, it will. When motion is not seen for the delayed time, it will send the "OFF" signal which will again trigger the universal module to push the power button. This time, the system will go into hybernate if you have it set that way.

An alternative could be to use a 3-pin appliance module and a UPS. Set the PC to hybernate when power is lost. Plug the UPS into the appliance module and set it to the same code as the motion sensor. This is a little easier and no wiring is involved!

Oh, FWIW, I'm also an X10 freak of late, so this is a cool concept that I've been kicking around for a long time. B)

Link to comment
Share on other sites

Sorry, I am kickin' it old skool - when I am done playing, I click Shut Down. PC shuts down. When I want to play again - I hit the power button. The more steps you build between points A and B the more likely you are to have a break and will exponentially add to your frustration troubleshooting through each one to find the culprit (kind of like government).

Link to comment
Share on other sites

Yes, but this is becoming more of an automation question than a user action. In a lot of cases, the reasons why people automate things has no basis in logic. It's more a function of "can it be done?" or "can I do it?"...

I don't need my outside lights to turn on when I enter a certain zone, I could certainly carry a flashlight. But, it's cool to be able to set up a system where things do what you want them to do automatically. Of course I"ve found that the more complex the system, the more it breaks. But, when I do get things working right, it's a feeling of accomplishment that people outside the process may not understand. I know my wife doesn't understand why, but she just goes with it cause eventually it will work the way I want it and things will be more convenient.

I wouldn't implement the setup I posted before simply because it's not something I would use. But, I have kicked around the idea of using some automation and timers to turn on/off the lights (neon primarily) in the game room. There isn't enough WAF to offset the ire that I'd get mid project though, so it hasn't happened yet!

Link to comment
Share on other sites

True enough. Similar to my love of emulation. She understands why I like it but not why I spend so much more time tweeking things here and there and less playing. Of course, when Santa delivers my present in a week or two, I will hopefully start to reverse that trend.... nah! Who am I kidding! :lol:

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...