Git Product home page Git Product logo

mopidy-touchscreen's People

Contributors

9and3r avatar febbweiss avatar jgeisler0303 avatar jodal avatar jonasvp avatar syco54645 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mopidy-touchscreen's Issues

No fullscreen in HDMI mode

Please,

In my Raspberry as Mopidy-Touchscreen not enter in fullscreen mode.
He stays in one small part of the display and my the touchscreen don't work perfecty.

I'm using eGalax and display 7" with touchscreen.
I configured [touchscreen] variables in the mopidy.conf and the resolution I put value 800x480 (what is the real display size) and the fullscreen variable with "True".

Thanks!

Mopidy 1.0 compatibility

Mopidy 1.0 release is right around the corner. We've changed some of the Core API to prepare for future changes, like gapless playback.

It looks like Mopidy-Touchscreen use core.playback.change_track() at https://github.com/9and3r/mopidy-touchscreen/blob/master/mopidy_touchscreen/tracklist.py#L35, which is no longer public. I didn't make a pull request as I'm not sure exactly how the extension works and what's the best replacement. One suggestion is simply to use core.playback.play(self.tracks[post]) instead.

When you fix this, please make sure to update the extension's dependency to Mopidy in setup.py to Mopidy >= 1.0.

Fails on osx

Hi, running this ons macOS sierra (10.12.40) i get the following error after starting mopidy:

WARNING: You are using the SDL disk writer audio driver!
Writing to file [sdlaudio.raw].
INFO Starting GLib mainloop2017-03-31 15:05:48.875 Python[19365:10354745] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'

running mopidy as root doesn't allow it to use alsasink for audio output

If you set mopidy to run as root, you will get a warning in mopidy saying
"you are using the SDL disk writer audio driver", and the file sdlaudio.raw
is created in /var/log/mopidy.

root have to be added to the audio group for mopidy to work properly.

sudo usermod -a -G audio root

this is on raspbian.

Error when playing internet radio / streaming audio

An error is being thrown when I play an internet radio station via the tunein plugin or a url. I think it's because there's no track length for the stream.

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/touch_screen.py", line 106, in track_playback_started self.screen_manager.track_started(tl_track) File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/screen_manager.py", line 178, in track_started self.screens[main_screen_index].track_started(track.track) File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/screens/main_screen.py", line 120, in track_started track.length / 1000)) TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

having issues initializing display

Trying to use on Raspian with the latest Mopidy and your package. Even with the proper touchscreen settings for the shield, I get:

2015-11-17 08:50:59,574 ERROR [17135:MainThread] mopidy.commands: Frontend (TouchScreen) initialization error: Error on display init:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/touch_screen.py", line 72, in get_display_surface
    self.screen = pygame.display.set_mode(size, pygame.FULLSCREEN)
error: Unable to open a console terminal

Running mopidy as a service without root privileges

Hi,
I would like to share how I got mopidy to run as a service without root privileges.
First the prerequisites:

  • I run the latest Raspbian Jessie, Version May 2016
  • I have a hy28b touch screen

Further, I assume you have your touch screen running and bound to /dev/fb1 and your touch input linked to /dev/input/touchscreen. The first is achieved by adding a line like dtoverlay="your device" to /boot/config.txt where "your device"is chosen from this list and possibly augmented with appropriate parameter settings. For the latter your might have to add another dtoverlay-line to your /boot/config.txt, depending on your touch input device. For my device this is not necessary as the touch driver is included in the display driver.
Finally you must link your touch input to /dev/input/touchscreen and calibrate it as described here. You may omit the creation of the files for setting the environment variables and run sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrateinstead.

You may also send boot log to the touch screen by adding this to the end of the one and only line in /boot/cmdline.txt: fbcon=map:10.

What follows now is the actual solution to letting run mopidy as a service without root privileges. I had to try many different approaches and I hope I recall everything that finally led to success correctly. If you encounter a problem in recreating this, give me a shout, maybe I missed something important.

  • Downgrade the pygame library because the latest version in Jessie doesn't work for some reason. Follow these instructions.
  • Add the mopidy user to the video, tty and input groups like usermod -a -G video mopidy, usermod -a -G tty mopidy, usermod -a -G input mopidy.
  • Now, delete the link that starts a login process on the frame buffer of your touchscreen: sudo rm /etc/systemd/system/getty.target.wants/[email protected]
  • And finally, add the following lines to /lib/systemd/system/mopidy.service in the [Service] section:
  StandardInput=tty-fail
  StandardOutput=tty
  TTYPath=/dev/tty1
  • Now edit the /etc/mopidy/mopidy.conf to your needs. And of course install Mopidy-Touchscreen and configure it as well
  • If you now enable your mopidy service like sudo systemctl enable mopidy and sudo reboot it should run the touch UI on your TFT after startup.

Have fun and many thanks to the developers of this great little application.

Jumping cursor in pygame (but ts_test works)

Hi folks,
im running touchscreen on Arch Linux 4.0.7-v7+ on a Raspberry Pi 2 rev. B together with a Spotpear 3.5" display.
Everything works fine except the cursor, it bounces around all the time as soon as the touchscreen is touched, even though the finger is not moved. The given positions seem not to correlate to the touched position in any way.

  • I tested the display before so it should not be hardware related
  • Its not a real mopidy-touchscrren issues, other pygame (test) scripts are reproducing the same problem
  • Strangly ts_test works perfectly after calibration
  • tslib version 1.1-1, SDL version 1.2.15, PyGame version1.9.1
  • Settings are all right I guess
    sdl_fbdev = /dev/fb1
    sdl_mousdrv = TSLIB
    sdl_mousedev = /dev/input/event0
    sdl_audiodriver = none
    sdl_path_dsp = /dev/null
  • I read somewhere the problem might be the SDL version which has a bug!?

Any other ideas? I'm thankful for every hint!
Cheer
Claude

Update

Why isn't this being maintained? Is there another version or a de facto one everyone uses and I'm woefully unaware of?

GPIO buttons seems not to work

I configured and tested my raspberry pi to use the following BCM ports for following button presses:
Up = 5
Down = 27
Left = 21
Right = 20
ENTER = 23
all the buttons are tested and working fine.

but the menu on the display always goes right only.
I added some debug info to gpio_inpput_manager.py and I found out following:

pushing left button triggers the left function
pushing right button triggers right function
pushing down button triggers right function
pushing up button triggers up function
pushing enter button triggers right function

for the 2 in bold above, there is a issue with what gets triggered.
but in any case, the menu does not do what the function stated eather.

can you help me?
I'm running mopidy 2.2.1 with the mopidy-touchscreen version 1.0.0
running on python 2.7

Unable to use mopidy-touchscreen

Been scratching my head for two days and ca't get rid of this:

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/screen_manager.py", line 69, in init_manager self.base_size, self, self.fonts), File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/screens/playlist_screen.py", line 18, in __init__ self.playlists_loaded() File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/screens/playlist_screen.py", line 34, in playlists_loaded self.list_view.set_list(self.playlists_strings) File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/graphic_utils/list_view.py", line 49, in set_list self.load_new_item_position(0) File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/graphic_utils/list_view.py", line 69, in load_new_item_position self.pos[1] + self.base_size * z), (width, -1)) File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/graphic_utils/screen_objects.py", line 234, in __init__ background=background, scroll_no_fit=scroll_no_fit) File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/graphic_utils/screen_objects.py", line 95, in __init__ self.box = self.font.render(text, True, self.color) UnicodeError: A Unicode character above '\uFFFF' was found; not supported ERROR Got un-handled exception from TouchScreen Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 237, in _actor_error_handling yield File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 411, in start_frontends frontend_class.start(config=config, core=core) File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 94, in start obj = cls(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/touch_screen.py", line 50, in __init__ self.resolution_factor) File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/screen_manager.py", line 48, in __init__ self.init_manager(size) File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/screen_manager.py", line 128, in init_manager self.options_changed() File "/usr/local/lib/python2.7/dist-packages/mopidy_touchscreen/screen_manager.py", line 231, in options_changed self.screens[menu_index].options_changed() TypeError: 'NoneType' object has no attribute '__getitem__'

it launches mopidy afterwards, but it's just a black window. Tried setting the user to root in /lib/systemd/system/mopidy.service and the daemon to root in /etc/init.d/mopidy to no avail. I also changed the env var to sdl_audiodriver = none and still can't use it. Any help would be much appreciated.

When Fullscreen is enabled, screensaver won't activate.

OK, so I have a flip clock screensaver on the pi. I love it. But unfortunately when Fullscreen is enabled in Mopidy-Touchscreen it won't activate. Mopidy-Touchscreen overdraws it. Xscreensaver runs behind it.

When Fullscreen is disabled the screensaver works but every time I reboot the pi or turn it off I need to run Maximus and resize the window to give it the Fullscreen look.

Are there any solutions to this?

Cursor at false

Hello,

I have a raspberry with a touchscreen.
When i put the cursor option at false, I can't click on all screen.
Just the first and the last is be triggered.

Thanks for your work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.