Snakeoil Forums

Full Version: key bindings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Found this...
https://github.com/openhab/openhab1-addo...ox-Binding

is this a possible addition/solution to key bindings for LMS in Snakeoil ??
(09-Feb-2017, 02:40 PM)Bromf Wrote: [ -> ]Found this...
https://github.com/openhab/openhab1-addo...ox-Binding

is this a possible addition/solution to key bindings for LMS in Snakeoil ??
HAB = Home Automation Bus.

It's for smart home automation. e.g. if I have those smart devices  that is listening for voice commands. I can say something like "OK Google, play music from Adele". And this application is part of the code that will help in doing that.

If you want keyboard control.. All you need is some form of text client for LMS. Not sure if there's one yet though?
Daphile has key bindings and is LMS based.... otherwise I can't find anything specific for LMS.....it's all android apps for phones :-(  Just what you need in the workshop when your phone's 2 layers down under your overalls and your hands are covered in grease n dirt !! 
"We don't need no stinkin' app....just gimme a button !" LOL

How about a simple infrared control...?  This one's for a Pi but is said to work with most Linux and LMS....
http://dabdig.blogspot.co.nz/2014/08/inf...n-rpi.html

Is that do-able ?
(09-Feb-2017, 03:41 PM)Bromf Wrote: [ -> ]Daphile has key bindings and is LMS based.... otherwise I can't find anything specific for LMS.....it's all android apps for phones :-(  Just what you need in the workshop when your phone's 2 layers down under your overalls and your hands are covered in grease n dirt !! 
"We don't need no stinkin' app....just gimme a button !" LOL

How about a simple infrared control...?  This one's for a Pi but is said to work with most Linux and LMS....
http://dabdig.blogspot.co.nz/2014/08/inf...n-rpi.html

Is that do-able ?
Anything is doable.

To be honest, wouldn't home automation be a good idea? Just shout the commands out.. But then you have to shout louder than the power tools.  LOL

I'm pretty sure there already is a CLI client for LMS.. I'd search for one when I have more time on my hands...

In the mean time, MPD/ncmpc can almost do all you need...
Quote:I'm pretty sure there already is a CLI client for LMS.. I'd search for one when I have more time on my hands...
 
Yes but it needs a screen and requires text input rather than assigning keys for operations...

Ncmpc and ncmpcpp...tried both (use these extensively on Raspberry Pi) but they don't do internet radio streams in Snakeoil and also lose connectivity at the drop of a hat..

I have tried using Daphile as the server and Snakeoil as the player (on different machines) to get the key bindings, cd ripping, drag n drop file play etc. Works fine but the SQ is inferior to Snakeoil as player and server...

Oh well....I will see how far I can get with that last link to lirc..... breakage here I come !!! LOL
(09-Feb-2017, 04:17 PM)Bromf Wrote: [ -> ]Oh well....I will see how far I can get with that last link to lirc..... breakage here I come !!! LOL
lirc will work. irexec is the keybinding tool you're looking for to do what you need.

The chances of breaking anything is minimal really.

There are too many things in the Snakeoil TODO, and too little time. So I have to prioritise - and right now this means finding and fixing the MPD problems. Next there's this new web design work, for this I have to learn a completely new language again. [Image: studying.gif] And to be honest I'd be interested to add OpenHAB support. [Image: Uhuhuh.gif]

Once you get your hotkey working, if you can, post your steps in the walkthrough section of this forum, so that
  1. You can always come back and refer to it in case you need to re-do this again
  2. Others can benefit
Working !! by a very strange route...  
Ok, I  know it is a little rude to mention another o.s in a support thread but bear with me there is a happy Snakeoil ending...!!!

My quest is to have a numberpad controlling Snakeoil through keybindings.... play/pause toggle, and perhaps previous and next tracks and maybe even mute .....
If you've been following this thread you will see a number of options considered ......

Something that worked  was using Daphile as the LMS server and Snakeoil as the player (Daphile does keybindings wonderfully !) but the SQ was no where as good as having Snakeoil as the server and the player...

So, Thinking outside the box here... if Daphile's keybindings controlled the player maybe it could be configured to do only that ??? and not act as server or player...?

Recipe..... Snakeoil installed as server and player (AMD 64_x86 1.5) on an HPt520 thinclient....works fine.
                Daphile installed on an HP 5740 thinclient.

Snakeoil is server and player and Daphile is configured as player only.
The external soundcard (usb x20 and ESS 9018 Dac) connected to the Snakeoil machine.
No soundcard connected to Daphile machine and all audio outputs disabled. Set attached numberpad to execute play/pause toggle, previous and next tracks and  mute using key bindings.....

Start Snakeoil and confirm playback. Start Daphile.
Playback and control via LMS is controlled by Snakeoil..... and, because Daphile's keybinding player control is networked it controls the Snakeoil player !!..... play/pause toggle, previous and next tracks and  mute !!! Yes !!!  Works exactly as required...Snakeoil is the player and the server...with all the snakeoil goodness ... and daphile only exists to control the player navigation via the numberpad and keybindings.
Downside is that two thin clients and a controller are needed but at least one if not two of these can be put into suspend when not needed..!


[Image: Screenshot_from_2017_02_10_19_55_25.png]
[Image: Screenshot_from_2017_02_10_19_55_54.png][Image: Screenshot_from_2017_02_10_20_04_11.png]
+2 reputation for thinking outside the square [Image: cheer2.gif] . Gotta to be honest I havn't even thought of using Daphile as the remote. wacky
(10-Feb-2017, 03:01 PM)Bromf Wrote: [ -> ]Something that worked  was using Daphile as the LMS server and Snakeoil as the player (Daphile does keybindings wonderfully !) but the SQ was no where as good as having Snakeoil as the server and the player...
Everybody keeps saying Daphile don't sound as good, hopefully that will change soon. To be honest I'm actually a very big fan of Daphile. Everything about it is slick. Not just the web interface, but the backend too, it's turning computers into an appliance. [Image: admire2.gif]

Once Daphile get that audio magic, Snakeoil OS has no chance [Image: punch.gif].
just an update from my earlier discovery of keybindings carryover from Daphile.
This has been working very well. I discovered that keybindings can be set on a per player basis so if you run more than one instance of Snakeoil ( and you should be too.... the more the merrier !) you can control each of them independently.
I can't imagine that many will have a use for key control.... I suppose you all use an app and phone/tablet... but it is handy for quick navigation.

Bonus discovery is that having Daphile running on another machine for navigation also allows cd ripping on that machine. I think the ripper is ABCDE (my favourite) as it has all  options such as being able to set drive offset (and even self-calibration if the offset value is not known ), Musicbrainz lookup, and verification of accuracy.  I just rip to a usb drive during the work-day and then plug it into my Snakeoil machine for listening.
Plenty of options for replay gain, compression etc but seems to be flac only.