Page 1 of 1

interface - single webpage async setup

Posted: Sun Sep 16, 2018 8:24 am
by patvdleer
Hey Guys, any of you have any advise on setting up a simple single page web interface to control a machine that reports progress back?

I was thinking about setting up picoweb with a websocket and sending the updates async that way. Any help/advise is welcome!

Re: interface - single webpage async setup

Posted: Sun Sep 16, 2018 10:46 pm
by mattyt
Not much to add except that I have a need to do something very similar - and had identified picoweb/websocket as likely implementation candidates too (probably with a Vue/socket.io frontend). I'm probably not going to get started on my solution for a few weeks but I'll keep you posted with what I develop.

Re: interface - single webpage async setup

Posted: Mon Sep 17, 2018 10:44 am
by patvdleer
I'm thinking about setting up the same-ish thing as the WebREPL but I would like to provide the webpage via an HTTP server instead of heaving to download it separately.

The alternative might be something like the https://www.arduino.cc/en/Reference/Firmata but I think this would come done to basically the same thing

Re: interface - single webpage async setup

Posted: Tue Sep 18, 2018 8:51 am
by pythoncoder
Another approach might be to use MQTT to communicate between the controlling device and the machine.

It would be easier to help if you clarified the physical setup. What is the controlling device? How is it linked to the machine? By WiFi? Does the controlling device need to present a web interface to the network or does the user interact with it directly?

Re: interface - single webpage async setup

Posted: Tue Sep 18, 2018 3:55 pm
by patvdleer
I'm making a machine to wrap wires, mainly for vaping, using a simple brushless motor and a stepper motor on a 3D printer like structure. This will be hooked up to a WeMos Lolin D32 Pro V2 which will be using wifi. Due to the amount of options (types of wires, thickness and such) a psychical interface isn't easy to build

Re: interface - single webpage async setup

Posted: Tue Sep 18, 2018 5:00 pm
by pythoncoder
OK, so where is the user interface hosted? On a local PC or does it need to be internet accessible?

My point here is that if it's a local PC there doesn't need to be a webpage. You could write the UI in CPython. It would communicate with the D32 Pro using MQTT (paho) and run the UI using one of the CPython GUI libraries.