Commands not executing

You found a bug or have any issues? Please post them here!
Post Reply
benjavides
Posts: 7
Joined: 15 Sep 2023 20:47
Commands not executing

Post by benjavides »

Context:
Hi I'm new to Proppfrexx and I want to use it as a simple playlist music player which will communicate (using http post) the data about the current song to other programs. Also from other programs I send some commands (using osc) to trigger things on Proppfrexx.

Issue:
Commands are not triggering. Short video showing the problem:
A video from YouTube usually appears here. Please contact an administrator.
For example in General Settings/Events/Commands/Custom I have the OnUser1 action set so that it triggers MAIN_VOLUME_SLIDE 0. If I press that button on the User Commands UI it doesn't trigger the command if I'm playing music. Before playing it works. If I press the "Test" button inside the Edit menu when configuring the action it works as expected but some times has a slight delay.
Also some of the actions that didn't trigger when the button was pressed, sometimes trigger minutes later. Its acts as if its saving the commands in a queue and leaving them for later.

More Context:
I'm sending some information when the track is changed and while being played

Image

I checked that the path where the jpg image is being written is valid.
But I've noticed that if the HTTP server is not running is when I get the problems. Does Proppfrexx require confirmation that the HTTP request was successful in order to keep working? Is there another protocol that sends information without worrying about if it's being listen to? Should I Use OSC instead?

Am I doing something wrong? Is this the expected behavior?
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Commands not executing

Post by radio42 »

I just tested it here and it works as designed. So there is NO bug!
I also used just two commands:
User1 = MAIN_VOLUME_SLIDE 0
User1 = MAIN_VOLUME_SLIDE 1

And no matter if I have a playlist open, playing or closed, the commands work just as expected.

So I assume, that all your other commands and settings are probably blocking the above when you open a playlist.
I can see, that you have various other commands set, incl. some HTTP commands when tracks are loaded or played, as well as constant Timecode commands.
Note, that all commands by default run in the same background thread (sequentially) one after the other, i.e. they are 'blocking' within that thread. The next command is executed once the previous command finishes.

I assume, that some of your commands fails, e.g. the EXEC_SEND_HTTP_POST command. If they run into a longer timeout (for e.g. 20 seconds), they would block all subsequent commands for that timeout.
You might precede your command block with the ASYNC line (or start a specific command line with EXEC_ASYNC) to start that block/command asynchronously in its own thread - but be sure to not start too many threads in parallel. I.e. first fix the issue, that the HTTP command fails.

Your EXEC_SEND_HTTP_POST might fail, as you used your parameters as the <command> body. I assume you wanted to use all your parameters within the URI instead, e.g.

Code: Select all

ASYNC
EXEC_SEND_HTTP_POST http://192.168.0.10:9985?artist=${...
i.e. don't use the pipe (|) symbol, as all after the | will go to the body...
Check your server, on what you actually receive...
benjavides
Posts: 7
Joined: 15 Sep 2023 20:47
Re: Commands not executing

Post by benjavides »

Thanks for your response. I think the problem was that HTTP expects a response. So if the HTTP server was not avaliable Proppfrexx would keep waiting and because its not async it was blocking the main thread like you said. I decided to change my messaging protocol to OSC and now it works even if the server is not running.

Post Reply