@Kienan_Vella Octopi requires a $50 RasPi (don’t tell me RasPi’s are $25 or $5 or whatever… by the time you have everything you need, they are $50) and it is storing the entire g-code file on the RasPi SD card. I’m talking about doing the same thing for $5 on an ESP-8266 with no local storage by leveraging the server.
The only way I see the SQL being an advantage is if you are hosting offsite and have no file system available. Filesystem access is faster for sequential access.
The way the SMTP server does it is to have a special line (a single period on a line by itself to designate the end of transmission.)
You could implement the whole thing over HTTP (just another chat service) but the commands available are pretty limited. GET and POST for the most part. The reason it is a pain in the butt is that HTTP is a stateless service and you would be better of with a stateful service. i.e. You have to authenticate before new commands are available.
May I just re-emphasize the “Anyone who knows SQL security, even a little would be a lifesaver.” part of the original post? e.g. if you don’t know SQL security, please refrain from telling me how I’m doing this all wrong and instead please think for a moment if you know “Anyone who knows SQL security”
@David_Kirtley
“The only way I see the SQL being an advantage is if you are hosting offsite and have no file system available. Filesystem access is faster for sequential access.”
This is exactly the case on the little $5 ESP 8266. Did I mention it’s $5? Not like a RasPi where you have to buy a power supply, and a wifi dongle and whatever else before it’s good to go. $5. Period. Runs on TTL power which is available from nearly every IOT device already. Built in WiFi. Just doesn’t have a large file system. 1/2 MB FLASH, 80K RAM.
Or if you have old hardware lying around, desktops or laptops that aren’t in use anymore, you could do it for free with octoprint and the boiled down guide. The fact of the matter is that software already exists to do what you want, but your hardware you want to use is almost entirely unsuitable for the purpose. In the end you could work around this - have no database, and stream the gcode using winwget to post a file a line at a time to a page on the esp8266, and do a dumb passthrough to the serial port. it’s not going to be as useful or reliable as getting octoprint set up instead. You’re way better off storing the data locally, because if you lose connection to the server (with either method) you would basically have to start again unless you can guarantee the location the tool head is continuing from.
@Kienan_Vella You may have a point about reliability, and I appreciate that there are other ways to get this done. I happen to be focused on THIS way, and I am looking for help… hmmm… have I said this already? with the SQL permissions. LOL… So… do you know someone who knows about security and permissions in SQL? Or would you like to chat about other ways to do this on /another/ post? e.g. NOT on this one?