Snakeoil Forums

Full Version: IR blaster functionality
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Some time ago my squeezebox SB3 got a little ill forcing me to migrate to the squeezeplay client in snakeoil. There is just 1 feature that I miss from the squeezebox and that is the IR Blaster. I could use my iphone and ipeng app to control the player and when I hit the volume slider (or buttons on phone) the SB3 would output the volume control codes to a IR xmitter which would then blast to my amp adjusting the volume. So useful.

Back then I spent some time trying to get LIRC to work - I also found https://github.com/mundschenk-at/squeezebox-ir-events which is a daemon w/scripts to send IR code on squeezebox events. I gave up in the end because of my limited linux ability...

Has anyone played with/got this working this before ?

Would really love to get this happening.
(12-Oct-2020, 06:23 PM)davem Wrote: [ -> ]Some time ago my squeezebox SB3 got a little ill forcing me to migrate to the squeezeplay client in snakeoil. There is just 1 feature that I miss from the squeezebox and that is the IR Blaster. I could use my iphone and ipeng app to control the player and when I hit the volume slider (or buttons on phone) the SB3 would output the volume control codes to a IR xmitter which would then blast to my amp adjusting the volume. So useful.

Back then I spent some time trying to get LIRC to work - I also found https://github.com/mundschenk-at/squeezebox-ir-events which is a daemon w/scripts to send IR code on squeezebox events. I gave up in the end because of my limited linux ability...

Has anyone played with/got this working this before ?

Would really love to get this happening.
That's pretty old school... I do have experience using this before, it's kindda follow the following steps:
1. install lirc
2. run irexec and lircd
3. configure lirc.conf (I think), and look for key commands, and use irsend to send the code to the irblaster

It is really a pita to use. Depending on your setup, you might just run your amp at fixed volume, and setup LMS/Squeezelite to use software volume control (SVC). <- It all depends on which volume control is better. SVC usually kills the sound for me (reduce the sound stage), but there are also amp VC that does the same..

My amp has a better volume control so I disable SVC.

Don't think I can find my IRBlaster any more. But if you have all the things you need, run through the install and ask here if you have troubles and I'll try my best to help you out.

Edit: BTW, the reason why I don't use IRBlaster any more is because I am using HomeAssistant. There's a support for LMS too. And use a RF/IR sender like Broadlink RM Pro+, it can do far more than simple lirc.
thanks AK,

Those simple suggestions are a great for someone like me. I will give it a crack and write up a how-to (if successful).

The blaster functionality is everything that I need - vol up and vol down via iPeng. I tried if for powering on/off the amp but it often gets messed up so I happily do it physically.

cheers
(14-Oct-2020, 10:49 AM)davem Wrote: [ -> ]Have just got to have a bit of a play with this and am having trouble with the device. Whenever I try an 'irsend' I get an error saying hardware does not support sending. I am pretty sure that it is related to the 'device' definition. 

If I use the snakeoil GUI, under the ALSA config I can see that there is a device ALC283 Analog (hw:0,0)- this is the onboard audio for my NUC. Tried all variations of the name as a 'device' when starting lirc but still get the unable to send error.

I found that 'aplay -l' & 'arecord -l' and 'cat /proc/asound/cards' will list the audio devices on your system. Interestingly aplay & arecord report no soundcards found !

david@NUC:/etc/lirc$ aplay -l
aplay: device_list:270: no soundcards found...

david@NUC:/etc/lirc$ arecord -l
arecord: device_list:270: no soundcards found..

but detected here

david@NUC:/etc/lirc$ cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH                             <<-------------
                      HDA Intel PCH at 0xd0710000 irq 90
 1 [DAC            ]: USB-Audio - USB Audio DAC
                      Burr-Brown from TI USB Audio DAC at usb-0000:00:14.0-2, full speed

The doc from lirc (https://www.lirc.org/html/audio.html) says that the log file should list device found but I dont get any entries here either. It does however give an error on startup - lircd-0.10.0[10875]: Error: No matching /dev/lirc device found for "auto"  (auto was one of my device attempts)

From this it seems (to me, remember limited linux here) that the audio device is somehow not available to the system & lirc. Since snakeoil is able to 'see' it, could it be possibly taking exclusive control of it ? 
(23-Oct-2020, 08:36 AM)davem Wrote: [ -> ]Have just got to have a bit of a play with this and am having trouble with the device. Whenever I try an 'irsend' I get an error saying hardware does not support sending. I am pretty sure that it is related to the 'device' definition. 

If I use the snakeoil GUI, under the ALSA config I can see that there is a device ALC283 Analog (hw:0,0)- this is the onboard audio for my NUC. Tried all variations of the name as a 'device' when starting lirc but still get the unable to send error.

I found that 'aplay -l' & 'arecord -l' and 'cat /proc/asound/cards' will list the audio devices on your system. Interestingly aplay & arecord report no soundcards found !

david@NUC:/etc/lirc$ aplay -l
aplay: device_list:270: no soundcards found...

david@NUC:/etc/lirc$ arecord -l
arecord: device_list:270: no soundcards found..

but detected here

david@NUC:/etc/lirc$ cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH                             <<-------------
                      HDA Intel PCH at 0xd0710000 irq 90
 1 [DAC            ]: USB-Audio - USB Audio DAC
                      Burr-Brown from TI USB Audio DAC at usb-0000:00:14.0-2, full speed

The doc from lirc (https://www.lirc.org/html/audio.html) says that the log file should list device found but I dont get any entries here either. It does however give an error on startup - lircd-0.10.0[10875]: Error: No matching /dev/lirc device found for "auto"  (auto was one of my device attempts)

From this it seems (to me, remember limited linux here) that the audio device is somehow not available to the system & lirc. Since snakeoil is able to 'see' it, could it be possibly taking exclusive control of it ? 
By default, users are not part of the audio group, that's why when you run commands like "aplay -l" etc, you get nothing. But if you run something like "sudo aplay -l", then it will show up.

Likewise you may need to add your user to both audio and lirc (or whatever that group is doing)... To simplify things, you can run everything as the root user, it will have access to both your IR Blaster and audio device...
(23-Oct-2020, 10:13 AM)agent_kith Wrote: [ -> ]
(23-Oct-2020, 08:36 AM)davem Wrote: [ -> ] 
By default, users are not part of the audio group, that's why when you run commands like "aplay -l" etc, you get nothing. But if you run something like "sudo aplay -l", then it will show up.

Likewise you may need to add your user to both audio and lirc (or whatever that group is doing)... To simplify things, you can run everything as the root user, it will have access to both your IR Blaster and audio device...

ahhh OK feel like a (sudo) idiot right now... lircd is run by root but still dont seem to get access to the device... 

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

david@NUC:/dev$ ps -ef |grep lirc
root     10811     1  0 11:57 ?        00:00:00 lircd

from syslog
Oct 23 14:59:05 NUC lircd-0.10.0[11673]: Warning: Cannot access device: ALSA:ALC283 Analog (hw:0,0)
Oct 23 14:59:05 NUC lircd-0.10.0[11673]: Warning: Running as root

Really appreciate your help. Time for more digging...
(23-Oct-2020, 12:08 PM)davem Wrote: [ -> ]from syslog
Oct 23 14:59:05 NUC lircd-0.10.0[11673]: Warning: Cannot access device: ALSA:ALC283 Analog (hw:0,0)
Oct 23 14:59:05 NUC lircd-0.10.0[11673]: Warning: Running as root

Really appreciate your help. Time for more digging...
What's your IR blaster device? lirc talks to the IR blaster, not to the audio device..

I'm thinking you might need a new kernel for this, let me know the IR blaster you're using, and I'll build you a new kernel to try/test.
(23-Oct-2020, 12:11 PM)agent_kith Wrote: [ -> ]
(23-Oct-2020, 12:08 PM)davem Wrote: [ -> ] 
What's your IR blaster device? lirc talks to the IR blaster, not to the audio device..

I'm thinking you might need a new kernel for this, let me know the IR blaster you're using, and I'll build you a new kernel to try/test.
 my blaster is a DIY that I made years ago for my squeezebox. Its just a 3.5mm audio plug connected to a IR xmitter. I *thought* that there was a resistor (or something) in there as well but didnt fully disassemble it to be 100%. It was quite a while ago and my memory of it is hazy. It worked fine with the SB.
(23-Oct-2020, 12:49 PM)davem Wrote: [ -> ] my blaster is a DIY that I made years ago for my squeezebox. Its just a 3.5mm audio plug connected to a IR xmitter. I *thought* that there was a resistor (or something) in there as well but didnt fully disassemble it to be 100%. It was quite a while ago and my memory of it is hazy. It worked fine with the SB.
That's not going to work I think, go to https://www.lirc.org/, and under supported hardware, look for anything that says transmitter. say the serial transmitter (If your computer has a serial port).

If you are lucky, you might be able to find one of the HP USB receiver/transmitter dongle, and then you can plug in your IR transmitter into it. But I havn't try this myself
(23-Oct-2020, 01:08 PM)agent_kith Wrote: [ -> ]
(23-Oct-2020, 12:49 PM)davem Wrote: [ -> ] 
That's not going to work I think, go to https://www.lirc.org/, and under supported hardware, look for anything that says transmitter. say the serial transmitter (If your computer has a serial port).

If you are lucky, you might be able to find one of the HP USB receiver/transmitter dongle, and then you can plug in your IR transmitter into it. But I havn't try this myself

Thanks AK. thats not what I really wanted to hear.... there seems to be a disconnect between the LIRC page of compatible devices and whats available locally. I see Jaycar have something to try https://www.jaycar.com.au/single-ir-emit...4/p/AR1811
Pages: 1 2