I have exactly same problem. I will try new plugin from github. Thanks
Ok, its seems that I havenât expressed myself exactly enough. I wasnât even able to download the files of the newer plugin version because I donât know how⊠My Linux skills arenât that great.
Meanwhile I managed to install lirc and my remote works, but I think that all my settings will be gone if I make the next system update.
So, can you tell me what is the exact command to download the newer plugin version?
Thanks so far!
Ok, after connecting to Volumio via ssh try the following:
- Download the plugin package
wget https://github.com/volumio/volumio-plugins/raw/gh-pages/plugins/volumio/armhf/accessory/ir_controller/ir_controller.zip
The zip file only lacks the german translation.
- Create a directory for unzipping the plugin package
mkdir ir_controller
- Unzip the plugin package to the newly created directory
miniunzip ir_controller.zip -d ir_controller
- Change into the directory with the unzipped files
cd ir_controller
- Install the plugin
volumio plugin install
WOW!
Thank You!
I will give it a try tonight !
Good luck!
⊠and donât forget to remove the old plugin at first
Hell Yeah! It works!
@gvolt: your step by step Tutorial did it. This IR plugin version seems to be much more stable. I was able to add my own remote data and to activate it via the plugin. And it still works after reboot.
Thank you!
One more Question:
My remote still has one button left that has no function yet.
So, I thought about to add a web radio station from âmy web radioâ or at least a specific playlist.
If this is possible what command in lircrc needs to be added to âconfig =â ?
begin
prog = irexec
button = RADIO
config = ???
end
Great!
I think you could use the WebSocket APIs https://volumio.github.io/docs/API/WebSocket_APIs.html. I would put together a node.js script and call the script like this from lircrc
config = /usr/local/bin/yourscript.js "yourwebradio"
The script could contain something like posted here https://volumio.org/forum/few-useful-node-scripts-t6247.html#p30667. See the third example for playing webradio. Maybe a shorter timeout suffices but I had no time to test the code at all.
I successfully tested the following code:[code]#!/bin/node
var io = require(âsocket.io-clientâ);
var socket = io.connect(âhttp://localhost:3000â);
socket.emit(âclearQueueâ);
var fs = require(âfsâ);
var content = fs.readFileSync(â/data/favourites/my-web-radioâ);
var webradios = JSON.parse(content);
var radio = webradios.find(o => o.name === process.argv[2]);
if (radio == null) {
socket.disconnect();
} else {
socket.emit(âaddPlayâ, {âserviceâ:radio.service,âtitleâ:radio.name,âuriâ:radio.uri});
socket.on(âpushStateâ, function() { socket.disconnect(); } );
}
setTimeout(function() { socket.disconnect(); }, 500);
[/code]
To create a .js file with the code above in e.g. /usr/local/bin connect to volumio via ssh and open the nano editor:
nano /usr/local/bin/yourscript.js
Copy and paste the code into nano then close nano saving the file:
Ctrl+x
y
Return
The script needs socket.io-client. If it has not been installed yet run
npm install socket.io-client
After that lircrc can call the script with the name of the desired webradio station (which has to be be added to âMy Web Radiosâ before of course) as parameter:
config = /usr/local/bin/yourscript.js "yourwebradio"
Edit:
The example above covers selecting a radio station from my web radios and not from radio favourites. But that is easily possible, too. Just change âvar content = fs.readFileSync(â/data/favourites/my-web-radioâ);â to
var content = fs.readFileSync('/data/favourites/radio-favourites');
and âsocket.emit(âaddPlayâ, {âserviceâ:radio.service,âtitleâ:radio.name,âuriâ:radio.uri});â to socket.emit('addPlay', {'service':radio.service,'title':radio.title,'uri':radio.uri});
Thanks gvolt! This was just what I wanted.
Good to see, itâs helpful.
can you help me about web radios i couldnt do it
reason is ;
Please can u help me
You need to run
npm install socket.io-client
first.
First off all thank u so much to your answer i am very glad to see your post last night a few hours tried to solve but i canât
I already did it but i think some problem during install
[code]npm install socket.io-client
npm WARN saveError ENOENT: no such file or directory, open â/home/volumio/package.jsonâ
npm WARN enoent ENOENT: no such file or directory, open â/home/volumio/package.jsonâ
npm WARN volumio No description
npm WARN volumio No repository field.
npm WARN volumio No README data
npm WARN volumio No license field.
- socket.io-client@2.3.0
updated 1 package in 6.961s
[/code]
Looks just like warnings. Did you try running your script nonetheless?
How can i run?
CLT-L09 cihazımdan Tapatalk kullanılarak gönderildi
I did everything assign a button lirc folder but button not work how can i run the script in putty
CLT-L09 cihazımdan Tapatalk kullanılarak gönderildi
Like you already tried:
node /usr/local/bin/yourscript.js
when i run this message i got;
[code]volumio@mutfak:~$ node /usr/local/bin/yourscript.js
module.js:549
throw err;
^
Error: Cannot find module âsocket.io-clientâ
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/bin/yourscript.js:3:10)
at Module._compile (module.js:652:30)
at Object.Module._extensionsâŠjs (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
[/code]
Why i get this error?..
CLT-L09 cihazımdan Tapatalk kullanılarak gönderildi