[SOLVED] OpenDeck (AUR version) on Arch fails to run wscat command. (Repost from #general)

repost from #general, i'll just add all i wrote so far, slightly redacted to provide context: #1: hi all, is there by chance anyone who could give me a hint as to how to send a message to a local websocket upon pressing, and another upon releasing a streamdeck key? strangely, running the following command from cli works: wscat -c ws://localhost:49080/ws -x '{"type":"kPttPressed"}' but when i use the same command as Key down action for a Run Command, it doesn't have any effect. any ideas? 🙂 #2: otherwise, the run command is working. my other buttons use xdotool to run keydown and keyup events. those work without a problem sadly i cant use this option anymore for this specific use case, as the application developer borked something with the hotkey detection 😅 #3: nothing in the opendeck.log, nor starterpack.log #4: com.amansprojects.starterpack.sdPlugin.log shows only one line of log: 08:05:26 [DEBUG] (1) tungstenite:🤝:client: Client handshake done. opendeck.log is a bit longer, but its only about extracting and registering plugins, with no obvious errors. #5: i just realised one more thing: when i run opendeck directly from bash, the wscat command does actually work as intended however, restarting it from the start menu, it fails to work (using cinnamon DE, don't know if that has anything to do with it) changing the starter to enable "Run in command line" also renders the button working. (with the sideeffect of having a terminal open all the time while the app runs)
5 Replies
Terrorwolf
Terrorwolf4d ago
Could you try add that the output of the command is sent into a file? ( > /path/to/file.txt)
ivelischt
ivelischtOP4d ago
you mean when running opendeck from cli? oh for the command itself? i'll see
Terrorwolf
Terrorwolf4d ago
For the command in the run action
ivelischt
ivelischtOP4d ago
will do /usr/bin/wscat -c ws://localhost:49080/ws -x '{"type":"kPttPressed"}' > ~/opendeck.command.log did this. the file is being created, but remains empty. one sec, i will also add the commands output from cli for success the output is empty welp, i will see if theres some sort of verbose flag for wscat sadly none available. but in any case, the log contains no errors so far interesting... i did one button with wscat -V (version), and the log file logs the version correctly. so apparently something else is going on... might try another websocket connector, as it seems there is no way to get it to output the websocket response when executing a single command (there should be one) funny... this works:
echo '{"type":"kPttPressed"}' | websocat ws://localhost:49080/ws -1
echo '{"type":"kPttPressed"}' | websocat ws://localhost:49080/ws -1
the only difference i noticed is that websocat succeeds instantly, while wscat seems to hang for a second or two before succeeding (even though the action, pressing the applications push to talk key, is instant there, aswell.) in any case apart from possibly open deck having issues with commands that have delays(? just a speculation as it's the only difference i noticed between wscat and websocat), this is solved for me. thanks for your speedy support, too!
Terrorwolf
Terrorwolf4d ago
No Problem.

Did you find this page helpful?