IR remote not working correctly with Tidal connect

I’ve just updated to version 2.882 supporting Tidal connect and it works, sort of… but has some issues with IR remote control support on my Pi 4.

Specifically, I can use next track, previous track and pause successfully from the remote control, however pressing the play button does not resume playback and causes a “hang” instead.

After this, the remote control becomes completely unresponsive until a reboot. It also causes the Tidal connect session with my phone to be dropped, although I can reconnect it afterwards. (Albeit with no working remote control)

Looking into this a bit further the issue seems to be with the volumio play command hanging when used with Tidal connect. EG pressing the play button on the remote uses IRexec to execute /usr/local/bin/volumio play - this should trigger playback and return immediately however the process hangs and does not return.

Because the process launched by irexec does not return further remote button presses do not send any commands. If I kill the hanging volumio play process and restart playback via the webUI the remote starts working again - at least for pause / next / previous.

Incidentally, IR support has always been a little bit unstable even with local media playback - if you press skip too rapidly a similar hang can sometimes occur where the remote becomes unresponsive, and I suspect it is also due to this irexec executed process not returning.

I’ve also noticed that volumio seek plus and seek minus commands (+/- 10 seconds) don’t seem to work on the Tidal connect implementation.

It should be possible to reproduce the IR remote problem without an IR remote simply by manually executing the commands normally executed by IRexec from a shell. These can be found below:

### Playback commands ###
prog = irexec
button = KEY_PLAY
config = /usr/local/bin/volumio play
prog = irexec
button = KEY_PAUSE
config = /usr/local/bin/volumio pause
prog = irexec
button = KEY_STOP
config = /usr/local/bin/volumio stop
prog = irexec
config = /usr/local/bin/volumio previous
prog = irexec
button = KEY_NEXT
config = /usr/local/bin/volumio next
prog = irexec
config = /usr/local/bin/volumio seek plus
prog = irexec
button = KEY_REWIND
config = /usr/local/bin/volumio seek minus
prog = irexec
button = KEY_DELETE
config = /usr/local/bin/volumio clear
### Volume commands ###
prog = irexec
config = /usr/local/bin/volumio volume plus
prog = irexec
config = /usr/local/bin/volumio volume minus
prog = irexec
button = KEY_MUTE
config = /usr/local/bin/volumio volume toggle

Hopefully this can be fixed as I tend to use the remote control a lot to control volumio once a playlist is started, and it is still very useful to be able to pause/play/next/previous track with a remote control even with Tidal connect.

This IMHO indicates that it is not an issue with the IR Controller pluigin but with the interaction of Volumio’s command line client and the tidal integration.

From the command line you may check if executing
volumio toggle

That’s what I was saying. It’s not a bug in the IR controller plugin itself but the command line client it uses. (As mentioned this command line client sometimes hangs up if commands are sent to it too quickly, even prior to the Tidal connect implementation - an issue I’ve had ever since I started using a remote, so I just avoid pressing the buttons too quickly…)

The first invocation of volumio toggle while Tidal connect is playing seems to pause playback and return with a success message, the second invocation when playback is paused hangs, does not return and does not resume playback, similar to volumio play, however unlike volumio play it does not cause the Tidal connect connection to terminate as I am able to resume playback via the WebUI whereas if I use volumio play I have to reconnect my phone to Volumio first.

You’re right! :innocent:

A little bit more info I’ve discovered.

If the native playback queue in Volumio is empty, the play button the remote behaves as described above.

However if there is a native playback queue in Volumio already present when Tidal playback is paused, pressing play on the remote (executing volumio play) actually terminates the Tidal connect session and starts playing the normal playback queue!

So there seem to be two separate bugs here:

  1. Pressing play on the remote to resume playback when Tidal connect is paused (but still connected) sends a play command to the native Volumio playback queue instead of the Tidal connect integration. (The play command is being routed to the wrong source)

  2. Pressing play on the remote when the native playback queue is empty causes volumio play to hang and not return, causing the remote control to no longer work until a reboot or the process is manually killed. (This would explain some of the instances of “remote control stopped working” I have seen in the past prior to the Tidal implementation)

Hi, I’m also facing those issues

Sounds like this

Interesting, but I only have the issue with Tidal connect - the play button on a remote works fine with the built in (web UI based) Tidal client and Qobuz clients, local file playback, and as far as I can remember, the Spotify connect (volspot2) plugin. (I cancelled Spotify about a year ago so can’t retest this, but I used to use the remote with it successfully as far as I can remember)

I assume the issue above would only address the “Play is sent to the wrong source” part of the problem - volumio play hanging without returning if there is no playlist to play is a separate issue?

I would think the CLI playback controls should always exit (almost) immediately whether the action is successful or failed? If they don’t, IRexec blocks and won’t send any further commands from the remote control until the blocked process terminates.

1 Like

From Volumio’s terminology there are sources that use MPD (Local file playback, webradio, Tidal, Qobuz etc) and then there are the volatile sources – sources that use stand alone daemons, airplay, Spotify connect and now Tidal connect.

So depending on the currently active source, the API needs to forward the play request to the active plugin. This is currently being done only by the WebUI, but not the REST and other clients.

Hence a “play” command from the IR remote isn’t going to reach Tidal/Spotify Connect, but instead is being sent to MPD.

So the behaviour you see when there are still items in the queue is probably both MPD and Tidal Connect trying to access the playback device the same time, which ALSA will not like very much and is probably complaining. You should be able to tail your logs and check if this is the case…

Is there any update to this topic? In detail, is volumio working on a fix for this (different behaviour of MPD and volatile sources)?

A fix is needed if something does not work as specified.

Volumio does not claim to support a remote control.
Remote control has been developed as a community plugin.
When this plugin does not work with volatile sources like Tidal, then should the Volumio team “fix” this?
I believe not, instead there should be a feature request to support IR commands to be passed on to relevant play plugins.

Thanks for clarifying. I fully understand that.
But, in my understanding the described issue is not related to the ir remote (or the plugin) but to the “volumio play” command (dependent on the currently using service, here tidal connect). And this is not working as expected. So, lets think about the case that someone only uses volumio implementations (REST API and tidal connect). When tidal connect is paused and you trigger volumio play through rest api it will not work. That was the backgound of my question.

Sry, maybe this thread was the wrong one to ask this. I just wanted to know if there is any work on this.

Regarding the IR remote plugin - ever since I updated to Volumio version 3 (currently on 3.179) I don’t have the IR remote plugin at all any more.

Migrating from version 2 to 3 basically does a fresh install, however the IR remote plugin doesn’t seem to be in the list of available plugins that can be installed.

So the play button not working correctly is a moot point to me now that I don’t have the plugin at all.

Is this plugin no longer endorsed or supported ? (I’m assuming a plugin must be endorsed by the Volumio authors to appear in the available plugins GUI)

Can it still be installed via the command line ? I’m kinda missing it… I assumed it might have been an oversight on the first release of version 3 but I’ve updated twice since then and it has not made a reappearance in the list of available plugins.

I don’t think there is. To make sure the devs have at least a look at your issue, you should put in a feature request

Ask the author, I can’t advice anything else.

The IR Controller plugin is still pending for approval:

You can follow the status of plugins for Volumio 3 here.

The fix is contained in the Volumio backend code, and isn’t plugin specific.

The root issue is that the API exposes a different method for volatile and non volatile services. Having the API caller keep track of which service is currently active isn’t very efficient.

There should be a PR from me a few years back with a fix that never got merged, someone inclined can cherry-pick, resolve conflicts, and resubmit the patch to the new repo.

1 Like

Apparently this was already fixed on 22 Dec 2021.

Exactly. Unfortunatly the current release Volumio 3.179 does not carry that fix. Probably some merge conflict over different releases.

I manually changed the /volumio/app/index.js source file accordingly to the fix above from ashthespy and it works fine now.
Just map the play/pause remote’s button to “volumio toggle” command in order to have a proper behavior with both Tidal Connect and Spotify Connect .

@volumio , could please check and validate the fix here linked for an official next release ?