Getting replies of specify OSC messages

Hello Leo,

I am trying to build a wireless controller using ESP32 and and touch screen which communicate with Ableset using OSC UDP. I notice that every time I send /getValues to Ableset, the ESP32 would only receive 10 to 15 replies, so I have to send multiple times /getVaues until the desired message is received. I am not sure is it because of UDP packet loss or the ESP32 is not fast enough to parse all incoming OSC messages. However, it does receive all(I think) /activeSectionProgress messages.

Since I only need some of the replies to build the simple GUI (like /setlist/songs; /global/isPlaying, etc), is it possible that you could make the individual replies available? Instead of getting all values by sending /getValues, could it be also like /getValues/setlist/songs so that I could get values that I need?

Thank you very much for your time.

Kevin

Hi, Leo

After a week+ of trying different UDP/ OSC libraries, I believe its a buffer size problem that causes dropout of messages. I could, in the end, receive more than half of the /getValues replies, but always got drop out beginning with /setlist. I could brute force a loop and keep sending /getValues and wait until I get the replies I want, but the time it takes is rather random.

Anyway, I am experimenting with connecting to Ableset with websocket using this library. I am very new to websocket, and now struggling to connect to the server. Below is the code that I am trying, its basically the example ESP32-Client:

    const char* websockets_server_host = "192.168.99.xx"; // IP of my mac running Ableset
    const uint16_t websockets_server_port = 80; // Enter server port
   
    WiFi.begin(ssid, password);

    // try to connect to Websockets server
    bool connected = client.connect(websockets_server_host, websockets_server_port, "/");
    if(connected) {
        Serial.println("Connected!");       
    } else {
        Serial.println("Not Connected!");
    }

I have tried also client.connect(“ws://192.168.99.xx:8080”); but still could not connect to the server.

Can you shed some light on it?

My goal is to build a small touch screen device that shows the Song in active, next song in setlist, time left if isPlaying which is connected via WiFi.

Thank you again :slight_smile:

Hey @Kevin_Au, please excuse my late reply!

I like your idea of being able to specify which OSC updates you’d like to receive when subscribing, as that should also reduce network traffic.

I’ve just implemented this and will release it in the next beta. To use it, you can specify any number of OSC addresses in the /subscribe command, e.g. /subscribe "auto" 8000 "ESP Controller" false "/setlist/activeSongName" "/setlist/activeSectionName" "/setlist/songs".

You’ll then only get updates for these values.

If you send /getValues to AbleSet, the same filter applies, but you can also override it if you’d like to get specific values, e.g. /getValues "/setlist/songs" "/setlist/activeSongIndex.

I’ll release this beta version soon, hopefully later today. Would that implementation work for your use case?