One question. Does arduino receive the +'s or -'s until the stream ends and then start to process and send ir or does it start sending ir as soon as the first key press is detected?
In the former case user would have to guess for how long the ‘increase volume button’ can be pressed.
That depends on the delays in the communication.
The volumio plugin sends the amount of “+” or “-” according to the difference to the standard-volume.
So the arduino might receive a single “+” or e.g. “++++++++++++++++”.
Hi again , how did you connect the IR blaster? The IR diodes that I see are 1.2V do would have to reduce the voltage with a resister. Do you drive the diode with a transistor to limit the current on the Arduino GPIO?
I have a wired IR led as you showed, but I guess this would also be 1.2V rating…
Hi!
I just connected the IR Blaster directly, one pin GPIO and one pin GND without resistor.
Up to now, it works
Maybe using a resistor would be safer, but it seems also to work without.
Hi, almost got it working now. The arduino works with my RC-5 HEX codes.
But now installing your plugin on the RPi. I get an error about versions:
Volume Guard - Installing serialport node dependency
npm WARN notsup Unsupported engine for serialport@12.0.0: wanted: {"node":">=16.0.0"} (current: {"node":"14.15.4","npm":"6.14.10"})
npm WARN notsup Not compatible with your version of node/npm: serialport@12.0.0
npm WARN notsup Unsupported engine for @serialport/bindings-cpp@12.0.1: wanted: {"node":">=16.0.0"} (current: {"node":"14.15.4","npm":"6.14.10"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/bindings-cpp@12.0.1
Are your script installing some versions that are obsolete?
well, this was my first plugin ever… For my understanding, kew is a rather standard package for volumio (see here: Index.js | Volumio Developers Documentation).
I am using the latest volumio version.
My difference was, that I created that plugin on my volumio-installationm following this guide: The Plugin Utility | Volumio Developers Documentation.
I do not know if that makes a difference, but maybe things are different when setting up a existing plugin vs. creating one.
Sorry for not beeing helpful here…
In the end I made it work by manually copying kew into the plugin directory. Volumio can now send volume commands to the Arduino and as such the system is working. Nice!
But with an USB DAC connected the volume control setting in Volumio is either None or Software.
If i select None there is no way to make Volumio change volume and the plugin cant be used.
If I select Software the signal has to pass software and it will be bad for the music quality.
for my DAC (RME Adi-2 DAC FS) I can choose “Hardware”, but no matter what the volume is set to, it is always 100%. Thats why I created the plugin and IR-Solution.
If you cannot choose “Hardware”, I think that approach will not work for you.
@volumio : Maybe it would be a nice feature to add a kind of “virtual mixer” volume control, which just does nothing, but gives plugins the possibility to read the current volume and use that data to do something.
I am aware of that. But If you set the Mixer to “none”, the volume control disappears.
For my DAC it works, as I can still choose “Hardware”, despite it has no effect. But for other DACs, like the one @lyhnet is using, “Hardware” is not available and setting the Mixer to “none” makes the volume control disappear. That why a “Virtual” mixer might be a nice feature.
I managed to do a hack to make it work… but it is not a nice way.
Firstly I need to expose the volume control for Mixer=None and then I need to prevent volumio from setting volume to 100 everytime the system sees a volume change. (that causes an infinite loop with volume_guard that then resets to 50.
Edit /volumio/app/volumecontrol.js
// Public methods -----------------------------------------------------------------------------------
CoreVolumeController.prototype.alsavolume = function (VolumeInteger) {
var self = this;
if (volumeOverride) {
return this.commandRouter.executeOnPlugin(overridePluginType, overridePluginName, 'alsavolume', VolumeInteger);
} else {
var defer = libQ.defer();
self.logger.info('VolumeController::SetAlsaVolume' + VolumeInteger);
if (mixertype === 'None') {
//Volume.vol = 100; //Anders: Prevent this!!!! this prevents infinite loop with volume_guard
Volume.mute = false;
Volume.disableVolumeControl = false; //Anders: Prevent this!!!! set = false!!! (this should enable vol-cont in gui)
defer.resolve(Volume);
I was too fast, takes more hacking, and not sure which line made it work. Something to be reverse-engineered at some point. Its the index.js file under /volumio/app/plugins/audio_interface/alsa_controller
Would really like that there is a way to get a Virtual mixer as well @volumio to always have the volume control active, working or not.