Selfhosted DueUI
-
Hi,
My current setup: I have multiple printers that all act as an access point at different locations.
I would like to self-host a version of DueUI at my place that is publicly available to me.
Whenever I'm at the location where pritner 1 is, I connect to printer ' access point via a separate wifi donlge and to the wifi at this location through my integrated dongle.
My question now is: If I access my self-hosted version of DueUI (through the internal wifi), can I then send commands to printer 1?
I want to use the centrally hosted DueUI to control whatever printer I'm locally connected to.Are there any obvious problems that may arise? Any CORS (cross-origin) problems?
Is this even possible for the user's PC to act as the "controler"-in-the-middle?
Looking forward to all the input Ic an get before implementing this
-
Ok - lack of response is a bit discouraging... Perhaps I try rephrasing it:
Can I control my Duet3 printer using DueUI in the following way:
-
PC with home wifi connection to hosted version of DueUI.
-
Duet3 printer has its own wifi network, that the PC connects to through a secondary wifi usb stick.
Can I use my PC as a "device-in-the-middle" to control my printer using the hosted version of DueUI?
Duet3 printer <......wifi1........> PC <---wifi2---> DueUI server
-
-
@hauschka My aopologies! I have been super busy this past two weeks and am only now catching up.
The machine that serves DueUI does NOT communicate with the printer in any way. It only serves files to your web browser, wherever that may be. As long as your PC with the web browser can reach both the mahcine DueUI is hosted on and the printer, you're all set. There should be no cross origin issues as the printer (or the DSF SBC) send a
Access-Control-Allow-Origin: *
header which allows any domain.Again, sorry for the late response.
-
Hi,
Thanks a lot for your reply.
Just to clarify, I was hoping for some answer, not specifically from you.
Thanks a lot for taking the time to reply and apologies if that came off harsher then I wanted.Thanks a lot clarifying!
I'll try to host my own version. Have you tried to include the config file on the webserver, so it always displays the user interface the same way?Thanks a lot for your developments in DueUI, @gtj0
-
@hauschka said in Selfhosted DueUI:
Just to clarify, I was hoping for some answer, not specifically from you.
Thanks a lot for taking the time to reply and apologies if that came off harsher then I wanted.Oh, don't worry, I didn't take it as you being harsh. You should be able to get a timely response from the developer of a product.
I'll try to host my own version. Have you tried to include the config file on the webserver, so it always displays the user interface the same way?
That's how I test actually. I start a web server on my development system and point it to my DueUI source directory and I place a config file in the same directory. Makes it easier to change code and config at the same time.
Don't hesitate to yell with more questions or suggestions for improvements!
-
Hi @gtj0 ,
Ok, I've set up a locally hosted version and I'm running into a couple of issues.
The main problem is how to get past the "settings" mask.
Backend: DSF
For IP, I use a local IP: http://192.168.0.13/
pw: I left it empty
config: http://ip:port/dueui_config_default_dsf.json
(I can read the json file, so it's reachable)And from here on, I can't get any further. I expected to get to the UI if I hit save + refresh, however I don't get redirected enywhere.
Only when I turned on polling, I got redirected to a UI. However, I'm greeted with Webserver errors:
Would you able to give me a little guidance please?
-
@hauschka Is the DSF actually running on 192.168.0.13?
If you visit http://192.168.0.13 you should get the default DuetWebControl page.
Also... Are you running the Duet3 in standalone mode or are you even using the DSF/SBC? If standalone, you need to change the backend type. -
Hi,
I'm currently running a Duet3 +SBC (Rpi).
The Duet is available on http://192.168.0.13/
If I open the link, I get taken to DWC running on the RPi.
-
@hauschka Ah. The entry for the hostname is just the ip address or hostname without an http:// on the front. So just
192.168.0.13
-
@gtj0 I just double-checked and I entered the IP without http:// the last time
-
@hauschka said in Selfhosted DueUI:
@gtj0 I just double-checked and I entered the IP without http:// the last time
Well, that's weird.
If you click on this link what do you get?
http://192.168.0.13/machine/statusIt should be a nice long JSON document that starts with something like this...
{"result":{"boards":[{"bootloaderFileName":null,"canAddress":0,"firmwareDate":"2020-05-15b1","firmwareFileName":"Duet3Firmware_MB6HC.bin","firmwareName":"RepRapFirmware for Duet 3 MB6HC","firmwareVersion":"3.1.0","iapFileNameSBC":"Duet3_SBCiap_MB6HC.bin","iapFileNameSD":"Duet3_SDiap_MB6HC.bin","maxHeaters":32,"maxMotors":6,"mcuTemp":{"current":38.2,"min":20.7,"max":21.5},"name":"Duet 3 MB6HC","shortName":"MB6HC","state":"unknown","supports12864":false,"uniqueId":"08DGM-9T66A-G63SJ-6J9F4-3SD6S-1U03B","v12":
Can you confirm the versions of RRF and DSF you're running?
-
Ok, yes, I believe I must have made a mistake somewhere previously. Restarted both systems and I seem to be able to connect now.
However, I can never get past the initial mask if I don't turn polling on (which after some time seems to slow down the browser if I have the console opened).
I am currently using the dsf_*.json that comes with the code on github, in case that is of any importance.
Thanks a lot for taking all that time @gtj0 !
-
@hauschka said in Selfhosted DueUI:
However, I can never get past the initial mask if I don't turn polling on (which after some time seems to slow down the browser if I have the console opened).
There's a reason for that. If you're not polling then the variables in the config file can never get resolved and the UI won't work very well. If you're designing a new layout, turn polling on AND turn on Test Mode. This will allow you to look at the UI without actually polling but just beware that some things might not look right.
-