IR Blasting - LMS on snakeoil
As per I have spent way too much time on getting IR blaster working on snakeoil with the squeezelite client and LMS server (v7.9.3). The IR_Blaster LMS plugin for hardware players (via the headphone jack) locks the player volume @100% and any player volume adjustments are blasted to my amp. Works perfectly and is what I was trying to emulate.

Unfortunately while I eventually got it all working, the result was a little underwhelming for me. My plan was to use LIRCD for the IR blasting side and the script from to handle the triggering side. See also

Below are the steps that I used to get this working in case someone else wants to do this.

LIRCD - many hours of playing around I finally got a working config. What I found. 

- I purchased a blaster from but in the end was not needed. My old DIY one consisting of an IR emitter wired to a 3.5mm audio plug worked also.
- in lirc_options.conf, I just needed to change the driver to "audio". The detected devices was listed in the syslog after starting it and you could set the device in the lirc_options.conf or as an option in the command. Mine was "ALSA:HDA Intel PCH: ALC283 Analog (hw:0,0)" but "sudo lircd -d ALSA:default@48000" seemed to work just fine as well.
- lirc has a list of remote definitions - edit something to suit if your remote is not in the list.
- my irsend command to testing has a lot of false negatives - I eventually discovered that it needed multiple pulses to work. My final command was "usr/sbin/irsend -# 3 SEND_ONCE amp AMP_VOL_DOWN" - the #3 gives 3 x repeats.

Next step was the script... which needed micropython to be installed. To save a lot of heartache, dont follow the instructions in the README file, use the wiki instead There were lots of dependencies...

sudo apt install make
sudo apt install build-essential
sudo apt install libffi-dev
sudo apt install pkg-config
sudo apt-get install libreadline-dev
sudo apt-get install gcc-arm-none-eabi
sudo apt-get install libnewlib-arm-none-eabi

Finally install;

git clone --recurse-submodules

then follow up with some makes..

cd ~micropython/mpy-cross
cd ~micropython/ports/unix

'sudo chmod +x' to make the script executable.


Edit/create the json.config as per the example - LMS IP, port, commands and player name (optional). Use your irsend commands in the json for the events. Dont be tempted to remove any events (eg. power off) as the json file wont load. Set the command field to be empty if you dont want to use one.

This IR daemon supports power on/off and volume up/down events. If you want to do volume, you need to install the LMS plugin VolumeLock, which was well hidden in the discussion thread....if you dont install this plugin detecting volume events will not work.

You also need to set the Volume Control within the LMS audio settings of the player to 'volume controls adjust outputs' then execute with something like (I installed the deamon to /opt which may or may not be following protocol).

./micropython /opt/squeezebox-ir-events-0.2/ /opt/squeezebox-ir-events-0.2/config.json MyPlayer.

Detected events will appear on the console - I only ever ran it as a command.

Result. While I did eventually get it all working, the result was a little underwhelming for me. Power on/off appeared to work fine but I was only really interested in the volume.

I tested using both the LMS Web GUI and iPeng on my phone. 
- It didnt like quick button presses as it sometimes got messed up 
- there were some inconsistencies in detecting events, possibly related to above.
- there was sometimes audio interference with the squeezelite player which made it sound awful. 
- There are interaction challenges with the VolumeLock plugin. The plugin gives you 3 options - 

1. Allow full range of volume control - it adjusts the volume on both the players output and you blast your amp as the same time via the script. Inconsistent in practice
2. Lock player at current volume - worked ok but it was limited as to how much you could increase & decrease the volume. I guess you could play around and get optimum levels of both player and amp but messy
3. Set current vol as max. - combination of the above

Out of curiosity, I did some quick tests using a Duet as the primary player. On the whole this appeared to work much better and I never had any audio issues - limited testing because this is not where I wanted the blasting.

No listening tests outside of the obvious were done.

After all that I am still deciding whether to persist or more likely revert. This adds complexity with stability questions for my use case, with debatable gains. If only you could fix the player output at 100% and still get volume controls as in IR-Blaster plugin.

There is a potential alternative to the ir-events-deamon - see  Much simpler to install. The question is whether it can detect volume events (looks like it might - mixer/volume ??) and how the volume adjustments are treated. You may end up in the same situation.

Think that I will also look more closely at replacing the caps in my old SB3.

I will update this thread if there are any advancements.

Hope that someone finds this useful.
[-] The following 1 user Likes davem's post:
  • agent_kith

(02-Nov-2020, 11:23 AM)davem Wrote: I will update this thread if there are any advancements.
Look for an IR Blaster with serial port input (You can probably use a USB to serial port dongle if your PC don't have serial port)... This works real well IME (but this is well over 10 years ago so YMMV).

Using the audio card is only going to be as good as the audio card itself, so you might consider getting a better quality one (or up the sample rate).. But these are just band aids to a problem, serial IR works best.

Edit: Serial will also require a new kernel as I'm pretty sure I disable COM ports. Let me know if you are going to use this and I'll hit you with a new kernel with serio support.
Snakeoil Operating System - Music, your way!

Thanks AK,

I will keep that in mind. Though I'm not certain that I saw anything telling me that there were hardware limitations - the issues were more related to detecting the events. It seemed to detect better with a hardware player (& no obvious audio issues), interestingly. The biggest nuisance was not being able to disable player volume changes so you ended up with 2 areas of volume adjustment or limited adjustment. Messy.

A little more testing and findings.

This refers to my setup, results my vary with different setups. My setup Snakeoil Squeezelite player > USB out > DAC > Amp.   

Overall if vol adjustments are not too fast and done one at a time, this worked fairly well. 

If the LockVolume LMS plugin setting was set to 'Lock player at current vol' (the most useful option) then there was audio interference on vol changes. Other settings of LockVolume had no interference. All settings on a SB Duet player had no interference on any setting.

It appears that the script does not detect all volume events. In the WebGUI, there is a volume slider with vol + and - buttons on the ends. All adjustments via the slider are detected but nothing for the buttons.


Possibly Related Threads…
Thread Author Replies Views Last Post
  DACs And Motherboards Working With Snakeoil agent_kith 34 34,168 02-Jan-2022, 04:27 PM
Last Post: Bromf
  I/R remote .Raspberry Pi, Snakeoil,MPD, and LIRC Bromf 3 2,609 21-Dec-2021, 05:45 PM
Last Post: anewmission
  OLED display for Snakeoil Raspberry Pi and MPD Bromf 2 2,660 12-Apr-2019, 08:29 AM
Last Post: agent_kith
  Get Mytec Stereo 192 working in Snakeoil agent_kith 1 3,724 08-Aug-2017, 08:25 PM
Last Post: agent_kith
  Quick Start Guide to Install Snakeoil agent_kith 2 5,965 18-Dec-2016, 07:02 AM
Last Post: agent_kith

Users browsing this thread:

Our Sponsors

You have to register before you can post on our site.



Latest Threads
No device audio
Last Post: [email protected]
Today 01:57 AM
» Replies: 4
» Views: 131
Working on new Snakeoil release - 1.3.x ...
Last Post: agent_kith
25-Sep-2023 01:59 PM
» Replies: 12
» Views: 271
Not able to add custom audio output
Last Post: agent_kith
24-Sep-2023 07:43 AM
» Replies: 1
» Views: 49
Activation Code not received
Last Post: sjtuross
20-Sep-2023 02:19 PM
» Replies: 2
» Views: 44
Last Post: ea59
14-Sep-2023 12:33 AM
» Replies: 0
» Views: 39
CamillaDSP for Room Correction
Last Post: hkphantomgtr
09-Sep-2023 02:03 PM
» Replies: 20
» Views: 3303
Snakeoil Firmware - 1.2.6 (Gear Isolatio...
Last Post: hkphantomgtr
08-Sep-2023 01:15 PM
» Replies: 26
» Views: 1455
LMS not running on RPi 3B
Last Post: uglymusic
07-Sep-2023 04:09 PM
» Replies: 1
» Views: 45
Snakeoil Firmware - 1.2.13 (Gear Isolati...
Last Post: agent_kith
06-Sep-2023 07:59 AM
» Replies: 4
» Views: 736
Rpi4+AlloDigiOne sig. Snakeoil os instal...
Last Post: agent_kith
06-Sep-2023 07:36 AM
» Replies: 13
» Views: 613

SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.

Powered By MyBB, © 2002-2023. Theme © Melroy van den Berg.