New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpio buttons #1
Comments
Hi Ole,
maybe i can help you, i didn't solve it right now but i'm intressted in.
Whats your general problem about gpio?
ole-seelenmeyer <notifications@github.com> schrieb am Do. 8. Juni 2017 um
13:12:
… Hey there,
maybe you can help me out. what could be the best way to use gpio buttons
for forward and rewind tracks using the gpio buttons. i read a lot about it
but i am not able to do it right now. maybe you can give me a hint.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AbH-mC_JyMV2VcTuEawiKD99EPq4Ys-0ks5sB9cvgaJpZM4Nz63z>
.
|
its mostly a general question. how to control these jukeboxscript with gpio buttons. how to wireing the button is not the problem but how to implent it in the script. or write a second script and put it in the autostart by crontab? |
I think a second script should work, if you only use it for forward or
backward your songs. The biggest issue could be to control VLC. I tried to
use the slave mode on VLC so that i can control the instance itself. But in
my setup i have an headless server without Desktop Environment so slave
mode did not work. So i switched to the mpv player.
ole-seelenmeyer <notifications@github.com> schrieb am Do. 8. Juni 2017 um
14:29:
… its mostly a general question. how to control these jukeboxscript with
gpio buttons. how to wireing the button is not the problem but how to
implent it in the script. or write a second script and put it in the
autostart by crontab?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AbH-mMcSeZj2qcQcuHlYMOFLqtOQICnFks5sB-k1gaJpZM4Nz63z>
.
|
The way this package works, using VLC, "next" and "previous" tracks are not an option. So the gpio buttons are not needed or doable. Kindgerechter Audioplayer mit dem Raspberry Pi , Part4 You can find links to other, similar projects inside the README file under Acknowledgments I will eventually close this "issue" because it's not really an issue. But will leave it open for now, because it looks like it will be helpful for others. |
ok i just see the Jukebox project at adventures in raspberry pi that also uses vlc controlled by gpio buttons but without rfid support. my intention was to connect both projects. to have the rfid trigger to start a audiobook and have some buttons to skip trough the chapters or adjust volume. its hard for a python newby to understand. |
In my Solution i used also rfid cards for skiping the Playlist and adjust
the Volume... i will Upload my work and clean up the docs in my fork in the
next days
ole-seelenmeyer <notifications@github.com> schrieb am Do. 8. Juni 2017 um
15:43:
… ok i just see the Jukebox project at adventures in raspberry pi that also
uses vlc controlled by gpio buttons but without rfid support. my intention
was to connect both projects. to have the rfid trigger to start a audiobook
and have some buttons to skip trough the chapters or adjust volume. its
hard for a python newby to understand.
thanx a lot.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AbH-mGqSD0M_RW2wMQB5WgXr6MuioReLks5sB_p2gaJpZM4Nz63z>
.
|
Yes I know. That already works fine for me.but I want buttons cause it's
looks better and I can press stop whenever I want. I know my child's :)
Am 08.06.2017 3:49 nachm. schrieb "hankman13" <notifications@github.com>:
… In my Solution i used also rfid cards for skiping the Playlist and adjust
the Volume... i will Upload my work and clean up the docs in my fork in the
next days
ole-seelenmeyer ***@***.***> schrieb am Do. 8. Juni 2017 um
15:43:
> ok i just see the Jukebox project at adventures in raspberry pi that also
> uses vlc controlled by gpio buttons but without rfid support. my
intention
> was to connect both projects. to have the rfid trigger to start a
audiobook
> and have some buttons to skip trough the chapters or adjust volume. its
> hard for a python newby to understand.
> thanx a lot.
>
> —
> You are receiving this because you commented.
>
>
> Reply to this email directly, view it on GitHub
> <#1#
issuecomment-307107320>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AbH-mGqSD0M_
RW2wMQB5WgXr6MuioReLks5sB_p2gaJpZM4Nz63z>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ab6NRfdD4-sv_8l2p4pS3YKybnI9Pt2lks5sB_v7gaJpZM4Nz63z>
.
|
Hi Ole, have you somehow come to point to combine these projects? as far as I understand the code a starting point could be the chapter "Register your USB device for the jukebox". The RFID reader is registered here. If it was possible to register also the GPIO Buttons, this could be a way forward, right ? |
hi. I also wanted to control vlc with next or pause and so on. Today I found a working solution. Some little tweaking to the trigger script is needed. First you need the definition of the command you want. Mapped to a RFID key on my side: Then you need to add this to the other commands: Then you need to edit the cvlc call on the end of the script: So it starts vlc with the rc interface on localhost with port 4212. So vlc listens on this port for rc commands. The command we set (pause in my example) echoes pause per nc over the rc interface on the localhost port 4212 and quits after 1. So we can use all other commands to control vlc. Maybe that helps with the buttons too?! Maybe so it is possible to add the standard functions to the Webinterface?! Maybe also a check it the RFID used is already at play an do nothing? Also it would be better if only musik files will be added to the playlist. Great would be the possibility to jump to a specific track in the playlist ?! Thank you very much for your work an I hope this info might be useful for somebody.. Cheers Tullm |
@tullm thanks for the hint. This is what I was looking for. Included it in the script: What do you mean with "Also it would be better if only musik files will be added to the playlist."? All the best, micz |
No problem. You're welcome. What I mean Ist that there are all files from a folder are put into playlist and are shown in the folder info in the Webinterface. For example are there folder.jpg in my folders. These are also in the playlist. Hope that cleared things up. Cheers |
Yes, should work as long as you can link them to the card in the script. I#m not aware of how to script this right. |
Thank you. I will start buying this weekend and then we will see. If I get it working (I think so), I will write it here. |
@tullm @Geliras I have not made any changes that would support the GPIO buttons. It would be great if you give this a try and report back. Many people contact me about this feature and - after all - this is on github, so it is open to suggestions, forks and different branches. |
Controls are working with RFID, so it cannot be that hard to trigger the same command when pressing a button. Right? I never used own buttons on RPi yet. |
Skipping to the next and previous track on VLC you can see in the bash script The volume change is done with the command line in the bash script. So the command to trigger with volume buttons should be something like this: Good luck and please report back :) |
Have not recieved my buttons yet, so i cant try. But wouldn't it be possible to just send one this commands when pressing a button:
We could just edit one of these (2nd one is more detailed): |
Hi everybody, I just got a mail that somebody has the Jukebox working with the buttons. Here is the thread in German (sorry, will try to incorporate a "howto" in English soon). Let me know if this is of any help: I added the code here: |
Hi @MiczFlor, this is a tremendously well-documented and easy to setup project. Thanks man, had this running in no time on my raspberry. What a good job. Regarding the buttons I really think that this would improve this project even more. Having a similar documentation on how to attach the buttons, resistors, ... would just be perfect (especially for somebody like me with little to none practical tinkering experience) ;) |
Sorry, if I capture this topic. It seemed inappropiate for me to open a new topic for such a small problem: There is a thing I suspect, as I did something not according to the GPIO-buttons.md manual: |
@jackwidu I had the same issue that the Volume GPIO buttons were not doing anything. My solution to the problem was the following: Instead of using PCM 1.5db+/- I used Speaker 3+ and 3- I think the change to Speaker is only needed if you use USB Audio which I am using. After that everything worked like a charm. def def_volU(): def def_volD(): |
Trank you, but it won‘t work either. It‘s the same: in SSH amixer sset Speaker 3+ will do its job, but Not in gpio-buttons.py. I very much think, ist has something to do with the way I call it in rc.local |
Hi @jackwidu If you can test it and update the code for the GPIO buttons: All the best, micz |
Well.. if I call python gpio-buttons-sample.py I can change volume via the gpio-buttons. Any ideas? I am not even sure, if this stil is my personal error and your change works perfectly for others. Jakob |
Hi @jackwidu I read your post a few times and am not quite sure what works and what doesn't work now :)
This is of course necessary. And for a fresh install it is documented in CONFIGURE.md.
From the sound of your mail, it seems that you have been updating your system rather than installed from scratch. And you are right, there were a couple of changes that might affect the system. Please tell me in short, after your changes: what does not work? thanks |
Sorry, that my description remained unclear. Thank you so much! |
It looks to me as if the GPIO script is not running after boot. Why that would be the case, I don't know. And I still don't have a GPIO control running myself. Right now I am working on an update for stretch and will also set up a GPIO Pi for testing. What I would do: reinstall from scratch. To make this easier, you can take a look at the helperscripts to create a backup of the shortcuts installed on your machine: |
The GPIO Script is working, as the other buttons (play/pause, next track) do their job nicely, but I think you're right and I should do a reinstall. Thanks for your effort! |
Hey MiczFlor, |
Hey there,
maybe you can help me out. what could be the best way to use gpio buttons for forward and rewind tracks using the gpio buttons. i read a lot about it but i am not able to do it right now. maybe you can give me a hint.
The text was updated successfully, but these errors were encountered: