PDA

View Full Version : Wiimote "TR" Sleep & Power Issues



jp2012
01-23-2012, 02:20 AM
Hi Camille,

I've been testing out Osculator with my new HTPC setup for the past week and I'm almost to the point where I'm ready to purchase it and start putting it to regular use. Unfortunately, I've stumbled on a sleep issue that may be a deal-breaker for me. After first testing out the software with a borrowed regular Wii remote, I went out and bought a new Wii remote plus. Unfortunately I did not know about compatibility issues with the newer "TR" remotes at the time, but I've been pleased to find that my "TR" remote works fairly well with the latest alpha build v2.12.

The biggest issue I have now is that Osculator appears to be interfering with my computer's ability to sleep when the Wii remote is paired. Right now I've programmed my remote to switch between different presets for different applications by hitting the "Home" button. I've also written some AppleScript that launches and closes appropriate applications when switching between each preset. For one of these presets I run Plex. Plex has a feature that will automatically sleep the system after a preset time of inactivity. It's useful to me because it allows me to put something on and fall asleep at my leisure without having to worry about setting a sleep timer or powering the system down.

This feature works fine when the remote isn't paired however once the Wiimote is paired my system refuses to sleep when inactive. I've tested this without Plex running (using the system's energy saver preferences) and got the same results. It appears the problem is that the "/wii/1/accel/pry" event line consistently sends a signal (the box to the left stays yellow) even when the individual "pitch", "roll", "yaw", and "accel" lines receive no input. I've tried disabling all of these inputs for my entire "Plex" preset however the signal is still sent and my machine refuses to sleep.

I was able to temporarily solve this issue by disabling "Pitch, Roll, Yaw" under "Outputs" in the extendable Wiimote drawer. When I disable the remote sensors for the entire document my computer falls asleep fine even with the remote paired. The problem is I've found no way to toggle this option on or off. I'd like to use these functions for other presets, as well as for certain functions within Plex (picking up the remote triggers the accel sensor to launch a menu). I'm not sure if this was an issue with previous Wii remotes but is there any way to allow the remote to sleep after a certain period of inactivity?

Also, I'm curious if you've made any progress with allowing the remote to power the system on with the press of a button. According to Remote Buddy's website it appears that they found a way to make this happen on the Mac OS, but I prefer to use Osculator because I'm also using a Wii Classic Controller Pro for games and I really like Osculator's flexibility/HID-support. Any ideas on how I can configure my system to sleep and wake up properly?

Thanks.

camille
01-23-2012, 10:11 AM
Hi Jason,

Thank you for taking the time to write this feedback on the alpha version.

The issue you are having is not related to the Wiimote TR, it would be the same with any other Wiimote.

I am surprised that Plex isn't able to put the system to sleep, because if you try to manually with a connected Wiimote (with accelerations enabled), it works just fine. The Wiimote is disconnected and upon awakening the discovery process is started again.

I think it would be interesting to understand why Plex is failing (if it does) to put the system asleep after a certain timeout. Have you tried to put your computer to sleep manually, that is, using the Apple menu? It is possible that the bluetooth adapter does not work the same on different computer models.

If you uncheck the enable buttons in the main window, you only prevent an event from being triggered, therefore what you did with disabling the accelerations from the Wiimote drawer was correct. If you disable the accelerations from there, the Wiimote is told to stop sending the values of those sensors.

About the new Wiimote connection system: I am aware of the technique and very interested to see how I can implement it in OSCulator. This new way of connecting the Wiimote should help wrt your system sleep issue...


Best,
Cam

jp2012
01-23-2012, 06:53 PM
Manually shutting down the system via the Apple menu or via AppleScript triggered by OSCulator works perfectly fine, the issue is with the system's inability to sleep due to inactivity. Taking Plex out of the picture, neither my computer nor my display will sleep after a certain amount of inactivity (set in the "Energy Saver" preference pane of System Preferences) as long as the accelerometers are enabled in the Wiimote drawer.

What I think is happening is that my system recognizes the "/wii/1/accel/pry" line as constant input regardless of whether it triggers any event or the status of each individual sensor. It would be the equivalent of having a connected Bluetooth mouse or keyboard where the mouse is constantly being moved or a key on the keyboard is constantly held down. What's interesting to me is that the Wii remote constantly sends a signal even when each individual sensor (Pitch, Roll, Yaw, & Accel) is stationary (the remote lays flat on a table). This constant input appears to tricking the system into thinking that someone is actually interfacing with it and therefore it will never become "inactive" and eventually fall asleep. One possible solution to this problem would be to allow the "Enable Toggle" event to enable/disable the accelerations check-box in the Wiimote drawer (allowing me to switch this option on or off with the press of a button).

A better solution would be to implement a feature where the accelerometers (and for that matter, IR input) automatically turn off if the input values of the individual Pitch, Roll, Yaw & Accel lines remain constant and no other buttons are pressed for a certain period of time. I think this is how an actual Wii operates when doing something with infrequent input such as watching Netflix. After a certain period of receiving no input (such as when watching a movie) the accelerometers/IR switch off and conserve battery power. The remote would still stay paired, but use minimal power. These sensors could then be reactivated the next time a user presses a button. Do you think this is something you'd be able to implement into OSCulator?

camille
01-23-2012, 07:15 PM
Sorry, I thought that Plex was able to put the computer to sleep after a certain amount of time.

I understand that the Wiimote's data prevent the system from going to sleep, and I will if I can find a solution to disconnect the Wiimote after a certain time of inactivity.

In the meantime, I would suggest you try the new alpha build (http://www.osculator.net/forum/threads/threads/1612-OSCulator-2-12-alpha-%E2%80%94-Wiimote-quot-TR-quot-support) that adds support for pairing the Wiimote with your computer, and connect it automatically just by pressing a button on the remote.

Please note that the Wiimote must first be "paired" with the computer by launching the Pairing process and pressing the red switch inside the remote. You won't need to press buttons 1&2 anymore.