Replies: 2 comments
-
This is great -- thanks for sharing it.
Version 0.4.61 adds a |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for your support! Already updated and used sqp in my script :-) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My Home-Automation is able to start scripts on a click of a button, so I implemented this:
Button short-press: “Stop listening to current audiobook”: Save playlist, save track-no. in playlist, save elapsed time in track, play random background Jazz):
1.) soco pause
2.) soco delete_playlist current_audiobook
3.) soco save_queue current_audiobook
4.) soco track > current_audiobook_title
5.) soco stop
6.) soco clear_queue
7.) soco mode SHUFFLE
8.) soco cue_favorite Jazz
9.) soco play_queue
Button long-press “Continue current Audiobook @ last position”: Stop background music, load current audiobook queue, play last played track from last position on)
1.) soco stop
2.) soco clear_queue
3.) soco mode NORMAL
4.) soco add_playlist_to_queue current_audiobook
5.) soco play_from_queue
grep Position: current_audiobook_title | cut -d':' -f2 | tr -d [:blank:]
6.) soco pause
7.) soco seek
grep Elapsed: current_audiobook_title | cut -d':' -f2- | tr -d [:blank:]
8.) soco play
This is pseudo code, all error handling is missing 😊
What I would have liked (because it would make the code cleaner) would be a command to move to track in queue without playing it, so you could load a playlist, select the right track, seek to the right position inside the track and play once everything is set up properly…
With this logic you can save (and recall) the playing position in every playlist. This is IMHO an essential function for audiobook lovers which is missing from “official” SONOS Clients, but thanks to soco I was able to implement this. Thank you VERY much!
P.S.: I have two Ikea Symfonisk lamps configured as a stereo pair so I configured: Button double click = toggle left light, triple click = toggle right light. All with one (shelly) button!
Beta Was this translation helpful? Give feedback.
All reactions