Executing arbitrary code through the RuneUI

Suggestions/requests/ideas for RuneAudio core features and functions

Executing arbitrary code through the RuneUI

Postby anslab » 02 Sep 2014, 10:48

Hi all,

I'm running RuneAudio on a Raspberry Pi B+ and I'm really happy with it. However, there is one thing that I'd like to do to make the experience even better.
I'm pluggin the raspi into a Denon Hi-Fi system, and I want to integrate the raspi with Denon's system connector interface (i.e. using the Denon controller to change track on RuneAudio, and wake up the system when RuneAudio issues command.

I found this guy : http://kfigiela.github.io/2014/06/15/de ... connector/ who essentially did the most part (retroengineering of the connector protocol, etc.). What I would like to do now is to integrate his work with RuneUI.

How can I do that (executing arbitrary code when the user does something in the UI, and making the underlying media player listening to events that don't come from the web UI)?
anslab
 
Posts: 3
Joined: 02 Sep 2014, 10:35

Re: Executing arbitrary code through the RuneUI

Postby ACX » 02 Sep 2014, 13:23

Hi anslab,
could you bring a practical example of what you would like to implement?
User avatar
ACX
RuneAudio co-founder
 
Posts: 1692
Joined: 29 Nov 2013, 02:25
Location: Udine, Italy

Re: Executing arbitrary code through the RuneUI

Postby Aquarius » 02 Sep 2014, 13:40

ACX wrote:Hi anslab,
could you bring a practical example of what you would like to implement?

I beleive he wants something close to what we have with Upnp control point. Send and receive commands through means different from the RunUI. The user clicks on "Next" button on the Denon remote, the message is automagically sent to the Rpi through the tool that anslab referes to, and upon reception the Rpi does something like "mpd next".
-- Aquarius
Hifi Gear: RuneAudio/Volumio on Raspberry Pi B + Hifibery Digi, Atoll ST200 (network streamer, DAC, pre-amp), Emotiva XPA-2, Bowers & Wilkins 683
Aquarius
 
Posts: 110
Joined: 26 Aug 2014, 08:42

Re: Executing arbitrary code through the RuneUI

Postby anslab » 03 Sep 2014, 01:18

Aquarius is pretty much spot on. What I want to do is the following :

  • Having a deamon run on the raspi and listen to the serial input for controller input and provide relevant command to whoever should receive them (either mpd directly or some rune audio component) (this should be the easy part)
  • Having a deamon that monitor mpd status to output the relevant commands on the serial port (e.g. send a "wake-up" signal when musics starts playing on the raspi)

Is it clearer ? What rune audio component should I look into in order to get that to work ?
anslab
 
Posts: 3
Joined: 02 Sep 2014, 10:35

Re: Executing arbitrary code through the RuneUI

Postby ACX » 03 Sep 2014, 11:00

Your control daemon should be bidirectional, allowing your remote and MPD (or the whole RuneAudio, if you want to include also other system events) to talk together.
The daemon should monitor MPD's state file to detect its changes, and consequently read and interpret MPD's response to send the correct command to the serial port.
RuneUI works in the same way, you can find most of the relative code in this file:
https://github.com/RuneAudio/RuneUI/blo ... eaudio.php
User avatar
ACX
RuneAudio co-founder
 
Posts: 1692
Joined: 29 Nov 2013, 02:25
Location: Udine, Italy

Re: Executing arbitrary code through the RuneUI

Postby anslab » 04 Sep 2014, 08:50

Thanks ACX, this is exactly the information I need. For now, I think I will start with only controlling MPD, however, if you think it's worth it, I can do something modular enough so it can be easily re-usable by people with different needs/hi-fi systems.
anslab
 
Posts: 3
Joined: 02 Sep 2014, 10:35

Re: R: Executing arbitrary code through the RuneUI

Postby ACX » 04 Sep 2014, 10:57

Thumbs up for modularity and reusability. The ideal approach from my point of view would be a standalone and lightweight daemon integrated as a toggleable and configurable option in the UI under the Settings page. Don't worry about the integration with the UI, we'll take care of that.
User avatar
ACX
RuneAudio co-founder
 
Posts: 1692
Joined: 29 Nov 2013, 02:25
Location: Udine, Italy

support RuneAudio Donate with PayPal


Return to Feature request

Who is online

Users browsing this forum: No registered users and 1 guest