WebSocket API Integration?

Has anyone implemented a WebSocket API integration?

I'm considering the Ashly FX series of amplifiers and I'd like to control them with Open Stage Control. Maybe I'm in over my head, but I don't see why I couldn't use JavaScript instead of Python to send WebSocket commands.

I just want to set up volume sliders for each output.

Thank you!

While it adds another piece to the puzzle, you might want to look at sending OSC messages to Node-RED and having Node-RED handle the websocket part. I'm looking at running both O-S-C and Node-RED on the same Raspberry Pi400 and doing something similar but for an RS232 serial connection to a projector.

1 Like

I wrote a little website client as a custom module a while back that I was able to use to successfully send commands to a remote server. The vendor had some bugs in their server, though that I was waiting on for them to fix, so I never fully finished it. He just released a fix for those bugs today, so I expect to be getting back to it sometime in the next couple of weeks – I’ll definitely update here in the forum if/when I do.

2 Likes

I got it working with Node-RED thank you so much!

1 Like

Sweet. Glad you got it working. NR isn't always the best tool for the job, but it's kind of a Swiss army knife for when I need to "stitch" things together.

@smith.kyle I'd be interested in your custom module as well.

Here is a version of my websocket client inside a custom module. It has the websocket package bundled with it. FULL DISCLOSURE - this is a stripped down version of my original implementation - I haven't actually tested this one, but my implementation does work.

Once this is working, any message sent to /wsClient should get passed to the websocket, but you need to implement the JSON message format expected by the server in the customModule.js

Let me know how you make out.

osc-websocket.zip (44.9 KB)

1 Like

Thanks for sharing.

Here's a refined version:

You need to load the customModule.js file as your custom module. There are some example websocket clients in there you can check out.

1 Like