change default web interface - control preamp with Rune

Build/modify/repair equipment and improve systems performance by yourself

change default web interface - control preamp with Rune

Postby velicko » 12 Sep 2016, 13:31

I have just finished network player built around RP3 and DAC, and I am very pleased with the sonic results. In this version, it is (very high quality built) black box, running RuneAudio, playing HQ audio files from my NAS.

Now, I am building preamplifier that would, among other features, have options to be controlled from network. Preamplifier control logic will be built (at least in the first version) with Arduino with Ethernet shield, thus will be connected through Ethernet port to other smart devices on intranet…

One of the ideas is that my network player could take control of preamplifier.
For example, when I, through WEB interface choose to:
- press play on player, preamp would wake up and switch to this player input.
- turn off the player, preamp would go to standby (turn off display…), or switch back to previous channel…
- change volume, preamp should change volume of built-in attenuator, not the player itself…

Since I am satisfied with RuneAudio, the initial Idea is to change existing web interface Rune is using, to retain current features that Rune have, but to extend it to send “commands” to my preamp.

Since I do not know the structure around RuneAudio, the questions are:
- Where can I find, on my RP3, initial web page that rune web interface uses, to try to modify it..
- I expect that all future updates of RuneAudio software will overwrite changes I make. (so I would need to update my web interface after each update)
- Can I make my own web interface (using original as template), and by changing some configuration file set it as default..
Thank you.

Maybe I am going into wrong direction, so any suggestion is welcome.

Posts: 2
Joined: 12 Sep 2016, 13:24

Re: change default web interface - control preamp with Rune

Postby hondagx35 » 12 Sep 2016, 16:32

Hi ,

welcome to RuneAudio.

RuneAudio is a client server architecture, so we have software (tasks) running on your browser (javascript) and on the PI (PHP).

- client is manly implemented in /var/www/assets/js/runeui.js
- server is /var/www/commands/*
and /var/www/app/libs/runeaudio.php

For a first starting point and to get a feeling i would try this:
- modify /var/www/command/index.php
Add this line:
sysCmd('echo "'.$_GET['cmd'].'" >> test.txt');
Code: Select all
        if ($activePlayer === 'MPD') {
            sendMpdCommand($mpd, $_GET['cmd']);
            sysCmd('echo "'.$_GET['cmd'].'" >> test.txt');
            // debug
            // runelog('--- [command/index.php] --- CLOSE MPD SOCKET <<< (1) ---','');
            if (!$response) $response = readMpdResponse($mpd);

This will save all commands send from UI to mpd in a file called test.txt in /var/www/command/
Code: Select all
setvol 22

From here you can call your own scripts or python programs.

User avatar
Posts: 3041
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: change default web interface - control preamp with Rune

Postby velicko » 13 Sep 2016, 09:55

Thank you Frank.

Valuable info as starting point.

I will inform you on further progress.
Posts: 2
Joined: 12 Sep 2016, 13:24

support RuneAudio Donate with PayPal

Return to DIY and tweaks

Who is online

Users browsing this forum: No registered users and 0 guests