SSH access and playback control
AlphaCentauriB opened this issue · 9 comments
First of all many thanks for the project and the very good documentation. I was able to set it up even without any knowledge of python programming. I hope my kids will like it when finished.
One error occured when I was trying to connect via ssh:
"Connect to Volumio using SSH
ssh -l volumino volumio.local"
User name should be volumio or am I wrong?
As I already said I am totally new to programming, python and raspberry I am wondering if it is possible to start a m3u playlist or a song with a certain RFID#. Where do I have to store the playlist/mp3s? And if so can you add this in your documentation? I would greatly appreciate. Again many thanks.
Two thoughts about you ssh problem:
- There is a typo in your command above: "volumino". As you stated, the username should be "volumio".
- There are some known issues with ssh logins for later versions of Volumio. Did you install 2.041 (I was using) or a newer one? Did you perform an Over-The-Air-update from Volumio's UI (you shouldn't ;-) )?
For your second question: The script for reading the tags and controlling Volumio only supports playing Volumio playlists at this time. That is, any RFID# read by the script will be used to send a "play playlist with name 'RFID#'" command to Volumio. So, for this to work just open Volumio's UI and create a playlist with the songs you want using the card's RFID# as the playlist name.
To play just a single song (instead of a playlist) some scripting had to be done (or you could create a playlist with just this single song, which will be suitable for few cases, but laborious for numerous). Regarding m3u playlists, as far as I know it is still an open issue for Volumio2 that there is no support for m3u playlists.
Thank you for your fast reply. About the ssh problem: I have the latest version 2.141. The lines between the quotas are from the Step-by-Step Software Installation Number 3. And that's why I was asking if there is a typo. I copied the lines and it was not working but by replacing "volumino" by "volumio" it was working. Sorry my fault for not being able to explain it better.
About the playback control:
I copied some files to volumio@volumio:/data/INTERNAL$
I created a playlist with volmio stored under volumio@volumio:/data/playlist$ "No_Sinner"
I edited HID.conf ('0000640815': playPlaylist(No_Sinner))
restarted service (systemctl restart volumio-hid.service)
checked logging (journalctl -f)
received the following error:
raise NotImplementedError("Command '{}' not implemented for Volumio".format(command_name))
NotImplementedError: Command 'playPlaylist(No_Sinner)' not implemented for Volumio
I am pretty sure I did somthing wrong. I tried also some other combinations with quotas etc but always an error. Do you have an idea? Thanks in advance.
Thank you for pointing out the typo. Fixed.
About the playlists: I should definitely improve the guide in that part :-)
My goal was not to be forced to change anything on the command line when adding new tags. Because of that adding a new tag to start playing a playlist works as follows:
- Open Volumio's web UI (use your computer's browser, you can not do this with the touch display, because you'll have to enter some numbers).
- Select the desired music (e.g. No Sinner) to be associated with the new tag and create a new playlist. Volumio will ask for a name for that playlist.
- Enter the serial number (i.e. '0000640815') of your new tag as name for the new playlist.
(If you navigate to Volumio's playlists via the UI you should see the new list now. For example on my player there are various playlists named '0004561234' or '0004728532', and so on. I'll admit this is not very neat but serves my goal).
At this point it should just work. When scanning the new tag its serial will automatically be used to play the new playlist.
For the configuration part: These are just some well defined actions like play, stop, volume up and so on which could be controlled by specific tags.
You're welcome! I guess that is the part when everything is finished you don't want to spend more time for the documentation ;-)
Sorry for bothering again. I think I almost got it but I'm missing one important thing.
I renamed my old playlist to 0000640815 and I can see this number via the UI. The line in HID.conf is: '0000640815': playPlaylist, But I still receive an error.
command(*args)
TypeError: playPlaylist() missing 1 required positional argument: 'name'
Just remove that line from the config and it should work ;-)
It's the default behavior for the script to send any (unknown) serial to Volumio. It doesn't matter if there is no appropriate named playlist. Volumio will simply ignore the tag then. If there is a properly named playlist it should start playing.
The lines in the config are just for "special" operations ...
Now it's working! Thank you again for your help I rally appreciated it.
You're welcome. Hope your kids will enjoy the device when it's finished.