Skip to content
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

Feature Request - SECOND_SWIPE-> DO NOTHING #228

Closed
dMopp opened this issue Sep 28, 2018 · 17 comments
Closed

Feature Request - SECOND_SWIPE-> DO NOTHING #228

dMopp opened this issue Sep 28, 2018 · 17 comments

Comments

@dMopp
Copy link

dMopp commented Sep 28, 2018

It would be awesome if we can add a third option to second_swipe:

  • DONOTHING

That would be perfect, because my son is swiping manytimes... :|

@MiczFlor
Copy link
Owner

HI @dMopp
hmmm. nice thought. It might actually help to solve this issue, too:
#196
Just to get this right: the idea is:

  • if you swipe a card to play a folder:
    • the first time, the swipe will stop any playling playlist and then start the new one from the top (or resume if this was set in the web app)
    • the second time, if the same card is swiped, it is simply ignored.
    • if a card is swiped that does something, like increase volume, it will do that
    • if a card is swiped to start a new playlist ... see above.

That would mean: stopping playout must be done with

  • a RFID card (pause, stop, shutdown)
  • the web app
  • GPIO buttons

There is no other way to stop playout...?

@dMopp
Copy link
Author

dMopp commented Sep 30, 2018

Hi,

Yes, that’s the Idea. But setting a sleep time would solve this, too. (Btw great Idea... :D)

@ottk3
Copy link
Contributor

ottk3 commented Sep 30, 2018

I really like that idea for several reasons. First is that it would be fully optional which benefits the different usecases and is no "hardcoded fix". The second is that command-cards would still be fully functional while too tigger-happy readers wouldn't cause a stuttering anymore. And it's not that error-prone like to define a sleep interval which would probably need different settings for different devices and usecases.

That might be the best approach regarding this whole topic.

@MiczFlor
Copy link
Owner

Ok, I agree. Just wanted to hear it from you guys. I'll get to it soonish, a bit busy this week.

@gizmo21
Copy link
Contributor

gizmo21 commented Sep 30, 2018

Well we have same issue in #196 so this could perhaps be the easiest way to "solve" it fast and would be OK for now with some loss of function.

@Franzformator
Copy link
Contributor

I also like this solution!

In the Moment I am building an Phoniebox with the #62 (Play only if the RFID Card is near) Hack.

I hope this solution would not interfere with this function.

MiczFlor added a commit that referenced this issue Oct 1, 2018
MiczFlor added a commit that referenced this issue Oct 1, 2018
MiczFlor added a commit that referenced this issue Oct 1, 2018
MiczFlor added a commit that referenced this issue Oct 1, 2018
MiczFlor added a commit that referenced this issue Oct 1, 2018
@MiczFlor
Copy link
Owner

MiczFlor commented Oct 1, 2018

Hi, everyone, I have a working version (I think) on the branch develop. Could you please check if this works for you? The behvaviour can be changed in the settings page of the web app. Here the updated info in the manual:
https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/develop/docs/MANUAL.md#settingssecond_swipe

@dMopp
Copy link
Author

dMopp commented Oct 1, 2018

I can test on Friday, not before, sorry :(

MiczFlor added a commit that referenced this issue Oct 1, 2018
@MiczFlor MiczFlor mentioned this issue Oct 1, 2018
@MiczFlor
Copy link
Owner

MiczFlor commented Oct 1, 2018

I did merge it to master after testing it:
#233
The reason being: some people report errors which might by typos I fixed a few days ago and hadn't committed to master yet #231

@MiczFlor MiczFlor closed this as completed Oct 2, 2018
@nukleuz80
Copy link

Hi, i don‘t know much about github branches - please tell me where i can find develop. Do i have to copy the new setting file only? The next days i have time for testing it...

@MiczFlor
Copy link
Owner

MiczFlor commented Oct 2, 2018

Hi @nukleuz80
Take a look here:
https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/master/docs/UPGRADE.md#upgrade-from-version-111-to-113
The script should work for you, if you are on a version number higher than 1.0.0 (you can see that in the web app under info).

cd /home/pi/RPi-Jukebox-RFID
git checkout master
git fetch origin
git reset --hard origin/master
git pull
sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/shared
sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/shared
sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/htdocs
sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/htdocs
sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/settings
sudo chmod -R 777 /home/pi/RPi-Jukebox-RFID/settings

@nukleuz80
Copy link

Hi MiczFlor,

i'm on 1.1.2 an will try it now...

Thanks!

@nukleuz80
Copy link

Now i'm on 1.1.4 and think all is working fine.
My playlist shows Resume ON and the setting is on Restart -> Playlist (Audio) is running and nothing happens if i swipe the card twice etc...
The other two options in the settings do what they want to do -> play & pause or nothing by swiping.

@MiczFlor
Copy link
Owner

MiczFlor commented Oct 2, 2018

Hi @nukleuz80
What you describe (with resume on) should be correct, right? What you switch resume off it should start the playlist from the top. See the manual: „ (...) AND Resume for a folder is enabled, swiping the card a second time will seem to do nothing - the playout continues. However, this is the correct behaviour: swiping the same card a second time triggers stop and play. The play command then checks if the folder has Resume enabled, if it does, it will play from the last stored stop position - which was the same second swipe.“

https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/master/docs/MANUAL.md

@nukleuz80
Copy link

Yes, that's right. If i switch Resume off it starts from the top.
It's all like the description in the MANUAL.md :)

@gizmo21
Copy link
Contributor

gizmo21 commented Oct 6, 2018

So my dev SDCard is on 1.1.4 master too and my Neuftech USB RFID Reader also works with those second swipe options.
But I had no time so far to try hardwarehack #62 to enable the "only play when rfidcard in range of reader" and trigger stop if rfid is removed from reader. Only then I could really use and test the second-swipe option 'ignore playout trigger' which would then solve my problem of double detected rfid-reads.
Perhaps @zxa could try if it works with that new option.

I know my reader is special (without knowing at buying) and the wish to have tonie-box like feature is also special, so no more need for Micz to implement more here for me at least.

@DominikHerold
Copy link
Contributor

Did I understand correct, the feature second swipe -> do nothing should work in case Resume is on and second swipe is Restart? Sadly there is always a pause delay with approx 1 second. So is there another way, to play tracks like the Tonies way (leaving the rfid on the reader while listening to the track)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants