Jackpot to FluidDial Pendant - wireless connection via ESP-NOW

i can confirm that it works of CYD as well if you add espnow init here

damaged my CYD touch cable in while testing so wont be able to do better testing until replacement arrives

Nice, I’ll make that change tomorrow! Thanks on behalf of CYD peeps!

As far as UI changes I tried to just add the ESPNOW logo to indicate it’s active, hopefully that will suffice.

Thank you @zerg32. I will make the change and try it out.

That didn’t work on my CYD. Mine still says N/C Status.

Did you have anything else plugged into the CYD, like the dial or buttons? I do so I was wondering if I need to unplug them to install esp-now.

On the CYD there isn’t an ESPNOW logo. Maybe because it doesn’t become active?

In VSCode I asked the AI chat to see why my CYD wasn’t activating ESP-NOW for the cyd_buttons_espnow environment. This is what it said to try, but I don’t know where to put it.

// ...put this in setup() before using esp_now...
#include <WiFi.h>
#include <esp_now.h>

void setup() {
  Serial.begin(115200);

  // Ensure WiFi is in STA mode before ESP-NOW init
  WiFi.mode(WIFI_STA);
  WiFi.disconnect(); // optional, avoids joining AP

  // Initialize ESP-NOW and check result
  if (esp_now_init() != ESP_OK) {
    Serial.println("ESP-NOW init failed");
    // handle error or retry
    return;
  }
  Serial.println("ESP-NOW initialized");

  // Example: register recv callback
  esp_now_register_recv_cb([](const uint8_t *mac, const uint8_t *data, int len){
    // ...recv handling...
  });

  // ...existing code...
}

I finally figured out that goes in the ESPNowTranport.cpp file.

It didn’t work either.

I updated GitHub with the code that should work for the CYD hardware, go ahead and pull that (commit is “Init ESPNOW for CYD hardware”.) Be sure to Build Filesystem Image and Upload FIlesystem Image from platform IO first for the ESPNOW.png graphic. (then, build and upload your cyd*_espnow profile)

The only instance of Build FileSystem is under M5Dial. When I try to upload the Filesystem is get this error message:

A fatal error occurred: This chip is ESP32, not ESP32-S3. Wrong --chip argument?
*** [uploadfs] Error 2
=================================================================== [FAILED] Took 5.44 seconds ===================================================================

The CYD is an ESP32 not an ESP32-S3. Could this also be part of the problem with ESP-NOW not working with it?

The new build WORKS! Thank you so much @coinbird!!!

I couldn’t upload the filesystem, but I could install espnow.

Woohoo! I hadn’t realized the filesystem thing is for the m5dial. Taking a look now, but glad the connection is working! (Edit: looks like the espnow.png should be rolled into the build via a different mechanism, so hopefully you see the icon. If not, I can try to figure out why.)

So technically (I tried) to allow multiple pendants. Would be curious to see if you can simultaneously use the M5Dial and the CYD… like a DJ of sorts

Weirdly, in PlatformIO I hit the little Refresh button and then (eventually) I saw Build Filesystem for cyddial_espnow:

and if you see that, then this should be equivalent (further down in the same folder):

image

That worked. I have the ESPNOW logo on both and they both connect and can control the Jackpot. NICE WORK!

Well that made my day, thanks for your help testing! And makes me miss my wooden FluidDial enclosure, time to make a new one! :grin:

(I did limit the number of attached pendants to 4 but that’s an arbitrary choice.)

I made the wooden enclosure when I didn’t have access to a 3D printer. It was fun to use when it first came out. I really like the handwheel on the CYD better.

There have been some improvements to the standard FluidDial. The new version 1.2.2 shows battery level and improved handwheel accuracy. If I reinstall your ESP-NOW version, will it pull the FluidDial 1.2.2 changes too?

Thanks

Yes, right now I’ve integrated the ESP-NOW stuff into a specific code branch (portability) but as it all consolidates into the main branch these changes will combine. I’ll take a look and see what’s changed, sounds cool!

I will do some final testing and likely minor changes to get this into a “official” pull request. It might need a web installer etc so I’ll probably need to look at that.

I realized (duh) that all those changes were merged into the main branch for FluidDial, so I pulled those into mine (same Coinbird/FluidDial esp-now-connection branch). Quite a few changes, looks like they moved from websockets to telnet (doesn’t affect our ESP-NOW transport though.)

I use the wifi strength indicator with a custom espnow_link_quality() that tracks traffic metrics (ping times etc.)

Initial testing was just making sure it builds, seems good on my M5Dial, would be interested to hear if it builds and works for you on your CYD!

I also made a fix to Coinbird/FluidNC fork that improves reconnect logic, so you’ll want to flash that too.

Does ESP-NOW or your transport layer(s) support reliable communication (e.g. ack, seq, retransmits, etc…) or is this more of a UDP fire and hope approach?

Have been loosely following. Neat to see lots of cool experiments/advances being made.