Hi,
Earlier this year I build a Pi DAC running on Volumio 1.55 with an ener314-ir and its lirc library.
This version was easy to custom and allowed me to add new pages such as taking the control of my amp.
Today I installed the latest version of Volumio + updated all other libraries I usually used.
Lirc works perfectly I can control the amp via ssh but the new structure of volumio 2 is very different from the previous.
My question is how can I create a new page and add a link into the main menu without playing with the add-on features?
This page will be like a form with different button and when you click on one of them it will execute a shell command exec($value) or shell_exec($value)
For example:
[code]
<?php include("inc/marantz_control.php"); ?> Power On [/code]marantz_control.php file
<?php
if(isset($_POST['lirc_command'])){
$input=$_POST['lirc_command'];
switch ($input){
case "poweron":
exec('sudo SEND_ONCE Marantz KEY_POWER');
break;
case "poweroff":
shell_exec('irsend SEND_ONCE Marantz KEY_SPLEEP');
break;
case "airplay":
shell_exec('irsend SEND_ONCE Marantz BTN_MISC');
break;
}
echo $input."test";
}
?>
Could I add a simple page within the folder /volumio/http/www/app/themes/volumio/assets/static-pages and a script into /volumio/http/www/app/themes/volumio/scripts
But I might have to follow the MCV framework from AngularJS to add a new page.
What I think I have to do:
New controller
New page
update the volume menu
[]Where to find the file mainmenu.json?
[]Where should I add the page and the controller?
Where to start?
Thanks!
lirc-ir.txt.zip (1.1 KB)