Anyone use the Mopidy Touchscreen Front end?

Hi MattR,

I have the same set-up with the same touchscreen, but additionally with an Hifiberry DAC.
I had the same issue as you and was able to resolve at least the issue with the touchscreen and get that one working. I did however do this under Raspbian in the end since I wasn’t able to get it done under musicbox (you might want to try this under musicbox though - probably you can get it done).
If you want to try with musicbox, you might need to enable ssh first or get yourself access to a console.

Here is what I figured out with a lot of support by @9and3r

First get yourself to be root - keeps you from having to type “sudo …” all the time, and aparently the extension of 9and3r only works with root priviledges anyway. Would therefore start this way:
log in with the normal user

    sudo passwd root
    <type your pass, hit enter x2>
su
--> now you're root and can login as root next time

First get the touchscreen working under the console. To do so, follow this tutorial:

In the file /etc/modprobe.d/pitft.conf I changed he line “rotate” to 90.

When this is all done, I would follow the tutorial from Adafruit of this page, but only the part above the “automagic calibration”:

Then do the manual calibration from the same page (after the automagic calibration part). Skip the X Calibration as you won’t need it.

If you want the bootmessages to show on the screen, follow this portion of the howto:

The last hint on the same page you should follow even if you don’t want to see the bootmessages. (set screen blank time to indefinite to not let it turn off automatically)

Add this to your /etc/profile:

TSLIB_FBDEVICE="/dev/fb1" 
TSLIB_TSDEVICE="/dev/input/touchscreen"
SDL_FBDEV="/dev/fb1"

Now you need to apply some changes to the plugin to pipe the output to the touchscreen and to ensure the touchscreen calibration gets applied / saved:

Now, change the following file: /root/mopidy-touchscreen/mopidy-touchscreen/touch-screen.py
BEFORE it says “pygame.init()” (somewhere around line 28) add the following 4 lines:

os.environ['SDL_VIDEODRIVER'] = 'fbcon'
os.environ["SDL_FBDEV"] = "/dev/fb1"
os.environ["SDL_MOUSEDEV"] = "/dev/input/touchscreen"
os.environ["SDL_MOUSEDRV"] = "TSLIB"

Now you need to save this and go back to the folder /root/mopidy-touchscreen. There you install this changed version of the plugin - in the folder, type:

python setup.py install develop

When this is done, I would reboot once more - and try to run mopidy as user root. Either by editing the file /etc/init.d/mopidy … and changing the user and group definitions in there, or even better since you can watch the output on the console, directly as root:

mopidy

If you want to get more debug info to look at things, you can add “-v” (-vv and -vvv also works for even more info).
The first time you run it directly, it will create a new config file under the root folder under /root/.config/mopidy/mopidy.conf and exit. The mopidy version run directly will not know about the file under /etc/mopidy/…, so ensure you got the right config in there.

When you start it up, the console should show on your screen. At least with Raspbian it now always does it for me (reinstalled a couple of times as per method above). With MusicBox I did not get it working.

When I run the touchscreen however, I still run into the issue that GStreamer does not want to play my music any longer:

This is not yet resolved for me - in case anyone could help me fix this, I would greatly appreciate this.

Hope this helped to point you into the right directions.