Symbian Application: PyAcceleREMOTER – Transforms your Phone into a Motion based Remote Control
Posted by: Phat^Trance in Nokia, Nokia Apps (S60v3)
The application uses a server running on a computer which the phone connects and sends commands to. Once the server is up and running (which is as simple as running a python script), everything is controlled from the phone.
You can browse through your folders, choose a video and start watching it. You then control the video by hand movements such as tilting right/left for fast forward/backward etc.
At any time you can change the video that you are watching by navigating through your video folders directly from your phone. The application also senses when you have incoming calls so that the movement of picking up the phone to answer it is not translated to hand-gesture commands. Furthermore the user can explicitly lock the accelerometer by pressing the select key for the same reason (i.e. to avoid random hand-gestures to be translated to mplayer commands).
There are also a few things you can configure from the phone such as the responsiveness of the accelerometer and the mplayer seek/volume increments.
It looks pretty impressive and is a very nice idea to use motion input to realize a remote control, but I think the application wont be interesting for many people among us, because it should currently not work on Windows PCs most of us are using. Anway, with support for the Windows Media Player the application will be great or should at least be an idea for other applications.
PyAcceleREMOTER v.1.0.0beta
Server on the PC:
The folder “PyAcceleREMOTER_ServerDir” contains all the necessary files for the server-side application. Simply copy this folder anywhere that suits you best.
For the server to run properly you need to have python (tested with version 2.5 but previous versions should be fine too) and python-bluez (the bluetooth library wrapper for python). Oh! and of course mplayer! On a debian machine simply do
apt-get install python
apt-get install python-bluez
apt-get install mplayer
Once these are installed type “python PyAcceleREMOTER_Server.py” in the “PyAcceleREMOTER_ServerDir” directory.
On the first run the application will create two required directories. One is “pyAccRemoter/” and is a hidden folder under your home directory and the other is “VideoServer/” which is also found under your home directory but is not hidden. The application will always look in the latter (VideoServer) for your media. You need to either add your media in the VideoServer directory or create symbolic links in this directory to your media found elsewhere. Note that you should not put loose files in the VideoServer directory. The application will read any folders under VideoServer/ recursively (including any loose files in them) but will not bother with any loose files under VideoServer/.
How to create a symbolic link of a folder in the VideoServer directory:
If you have a folder named “MyVideos” under your home directory where you store all your media, simply type the following line when in the VideoServer directory from a shell:
ln -s /home/username/MyVideos/
Once you have added media to the VideoServer, go to the “PyAcceleREMOTER_ServerDir” and type
python PyAcceleREMOTER_Server.py
This will start the server. You don’t need to do anything else on the server side.
NOTE: If you add media in the VideoServer while the server is running, you will need to kill it with CTRL-C and restart it in order to read the new contents.
============================
Client on the phone:
The folder “PyAcceleREMOTER_ClientDir” contains the necessary files for the client-side application.Follow the procedure below and it should work.
Before you start make sure you have Python for Series 60 v.1.4.2 installed as well as the PythonSciptShell v.1.4.2. This should be installed on your memory card (i.e. E:/ directory of the phone). You can find detailed instructions at:
In the client folder you will find two two files and one more folder called “pyAcceleREMOTER_Images”.
All you need to do is to copy the two files named
“PyAcceleREMOTER.py” and “PyAcceleREMOTER_RC.py” under the “E:/Python/” folder on the N95.
and then copy the folder “pyAcceleREMOTER_Images” as it is under “E:/Images/” on the N95.
Then go to your Python interpreter on the phone, click “Options -> Run script” and from the list choose PyAcceleREMOTER.py
enjoy!
================================
Usage:
Tilt the phone right to FAST FORWARD
Tilt the phone left to FAST BACKWARD
Tilt the phone up to INCREASE VOLUME
Tilt the phone down to DECREASE VOLUME
Flip the phone on its screen to PAUSE
Flip the phone on its back to PLAY
Press the “Select” key to lock the accelerometer. This allows you to move the phone freely without having your hand movements be translated to mplayer commands.Furthermore this is a nice way of saving your battery. The accelerometer is a battery consuming device and by locking it you are actually disconnecting the application from accessing the accelerometer data thus saving battery. Pressing the “Select” key again unlocks the phone and reconnects to the accelerometer.
From the Options you can configure the following:
Responsiveness: This affects the amount of time (in ms) you have to sustain a certain position (e.g. tilt right) for it to be translated to an intentional mplayer command. The higher the value the less responsive and vice versa.
Seek increment: When you fast forward/backward on mplayer, how many seconds forth or back to go at each step.
Volume increment: When increasing/decreasing the volume, how many levels up or down to go at each step.
If for any reason the connection to your bluetooth dongle is lost, the application will sense it and will ask you if you want to reconnect. You can try it, but at the moment it is buggy and unreliable. This is the first thing I intend to fix before the next release.
thx to gkataria for the tip!
Related Posts:


Nice m8. wonder how much hours u put it in. Bluetooth is a hell (used to be) to setup in linux. Together with the irremote, u have the ultimate remote Control