There are two places I’ll be looking when the update goes public.
On the Python side, I’ll be looking for new API endpoints.
On the C++ side, I’ll be looking for the i2c command header file.
There are two places I’ll be looking when the update goes public.
On the Python side, I’ll be looking for new API endpoints.
On the C++ side, I’ll be looking for the i2c command header file.
Hi Sustainable!
I’m familiarish with the ESP32 from Hackaday, but haven’t had hands on one myself. That’s to say, please let me know where I’m ignorant!
The main problem I anticipate in cutting Node-RED out of the loop is handling an Ethernet stack in Arduino C. If you’ve already got that solved, please tell me how that works. I would love to not run a JavaScript framework!
If the ESP32 handles IPv4 implementation for you (as I suspect it might, with Wi-Fi onboard), the next problem I’d anticipate is keeping a websocket connection alive past the initial response. The first reply is a full dump, but you want the live data that only sends changed values.
In Node-RED, the websocket handling is completely abstracted. I’d bet there are Arduino libraries for handling websockets, but only because implementing it by hand seems like such a pain.
Let me know more about how those problems are approached with ESP32 - in my mind, I’m treating it like a really fast Arduino Mega, but I’m certain there’s gotta be more to it.
Once communications are sorted, the juiciest key for testing seems to be “xx:” It holds the state string ("READY/RUNNING/etc.) and changes on jogs, so you can get quick feedback.
I am on google learning about ESP32 and Arduino. Will try to help if I can.
What peripheral components are you talking about? Would the switch controlling the blast gates be the “peripheral”?
Initially, the’peripherals’ that the master ESP32 would control would be the dust collector (relay to existing shop collector DC on/off wiring) and the blast gate (logic voltage to a separate ESP32 that controls the blast gate ).
The master ESP32 would also control an LED light strip that can show the status of each, as well as the state of the carve (e.g., running/complete/error) and spindle (spinning/stopped) - all in color even – a fancy light tower if you will
Next peripherals would be to add water cooler on/off (relay), cooler flow error (logic voltage), temperature sensor(s) - again with color light status on the led strip.
Relatively straight-forward wiring and coding for these - BUT the only trigger I think I can currently AND easily isolate from the BB electronics is the spindle on/off IOT connection - which will work - but is limiting relative to the API . Worth noting that I would also like to learn about websockets for other ESP32/Arduino projects…
If two-way communication via the API is doable, I guess future [easy to implement] ‘peripherals’ could be buttons for probing, jogging, etc.
Again…hobby
Not sure if shop automation should be part of our cnc controller. Would like to see web cam removed. Maybe box independent of controller that why it can scale as our shops grow in size. Will be using server with home-assistant and zoneminder to keep automation off the cnc controller.
I also like this project. https://www.youtube.com/watch?v=HAMYaCIXXYU&t=63s
Hey again, Sustainable!
I asked ChatGPT for broad help structuring a program, and it used a library I didn’t recognize to handle the websocket. Might be worth playing with the example it spit out!
Might’ve crossed a wire somewhere a while back - none of this is running on the controller. I’ve got the cameras plugged into a separate rPi 4 running Ubuntu Server and Node-RED. The 1F box is still totally stock.
Nice I have a question. do you think this can scale to more than one cnc. A kind of a main command center for a shop.
Absolutely - just duplicate the logic and swap the IP addresses.
You could tab out the UIs from each CNC using iframes to keep it all in one tab.
Will you be running air quality monitor as part of your system? Would be nice to e-stop if air quality drops below some set point.
I am waiting for my warranty to run out. Looking to fork the onefinity controller once I have a better understanding how its code works. I think the machine has vast potential waiting to be unlocked