I’ve been looking at ways to prototype UI for a device. One thought is to build UIs in a browser that send OSC. I have this working between my browser and Max with a simple nodejs script in max that acts as a socket server. Now that I have a working proof of concept, I’d like to send the data from browser to ElkOS. Oops, I guess I need a websocket server on Elk! A hole in my plan - I guess I’m too acclimated to just having apt etc on a Pi to do whatever
So I’m curious if there’s a good way to send data from a browser to my ElkOS RPi ? I briefly looked at gRPC, but it doesn’t seem like there is a straightforward way to use a browser to send gPRC messages.
I figured out a solution. I created a websocket server in nodejs, then created a “single executable application” from node so I can run the websocket server on the ElkOS Pi. Probably not the most efficient option - maybe a python executable would be better? - but it works. So now I can control the synth on the ElkOS Pi with a browser based interface.
Great job. In another product, we used a json-rpc bridge process on the board, that could talk jsonrpc to a web browser and gRPC to sushi. But I think a webserver on the board is a better solution.
I had briefly looked at gRPC via browser, but this quickly introduced brain fog. I’ll need to get a better understanding of gRPC before I do that. It would be ideal, since there’s a lot more that is possible via gRPC over OSC.
Sounds like you have a plan @peter. Something just fyi. If you take a look at my last post in this thread : Elk Audio RPi4 image with X11 - #3 by scratt you could spin up a fairly light weight UI on the Pi with something like Dear ImGUI and have the majority of the heavy lifting on the GPU.