Duet Buddy - a proof of concept remote monitor
-
-
@pastthepoint I'm an idiot. I'm running a Duet 3 w/ SBC. I don't know if it means this will not work or changes need to be made.
-
@pastthepoint, this one will require code changes to support Duet3 which has a different HTTP/Json format.
I believe that this one, which is newer, works with Duet 3 but didn't try it myself. https://forum.duet3d.com/topic/15198/reppanel-a-diy-alternative-to-the-paneldue-with-wifi-support
-
@pastthepoint @zapta I’ve rewritten this recently (I know it’s taken me a while to get round to it) and it works with duet3. I don’t use an SBC so can’t confirm if it works. Not sure what the difference, if any is with the returned json between duet3 in standalone mode and with an SBC. I can share the code tomorrow.
-
@richardmckenna, do you want to send a github pull request with the changes? Or you can get write access if you don't have it already.
-
I must confess I haven't read all the thread, but wanted to ask if it's possible with M5stack to poll a ESPCAM or other WiFi webcam to display the current print as background-pic and show the json-info as insert ?
The other thing I was wondering reading the first few posts was, why not use a smartphone to poll json-status? Is it harder to write an app, than buying an M5stack and program it? -
@zapta yeah I will send a pull request, it uses ArduinoJSON now so it’s just 1 file and very easy to add extra items to parse. My plan next is to have multiple printers in the config file so you can use the buttons to switch between them.
@o_lampe yes that is possible. With regards to hardware the M5Stack is a nice cheap, portable unit with a battery and display, so ideal for a simple monitoring tool, yes you could use a phone but would you want to leave your phone display on all the time? You could in fact use anything with a display and WiFi to do something similar.
-
Thanks for the prompt answer. I feel a snapshot of the printbed would be helpful...
@richardmckenna said in Duet Buddy - a proof of concept remote monitor:
you could use a phone but would you want to leave your phone display on all the time
Do you stare on the M5 display all the time? I thought, it was mainly used to inform you about a change into pause mode (with a melody), or to check the job progress frequently. Same could apply to a smartphone app.
-
@o_lampe for me my printers are upstairs in my office. If I’m downstairs I put the M5Stack somewhere in my line of sight so a quick glance would give me an update on the status of the print. With a phone, I would either have to leave it on with the app running propped up somewhere or have to pick it up, unlock it and switch to the app if it’s not the active app. In this scenario it makes more sense to me to have a small dedicated display.
-
@richardmckenna Have you shared the new code on github? I have everything setup, I just need to know the address to request from for the Duet 3's.
-
@pastthepoint yes just done it, apologies for the delay you can find the pull request here https://github.com/zapta/duet_buddy/pull/1 and the .ino file from the pull request here https://github.com/zapta/duet_buddy/blob/261d93e3068ab4e7ba31b516a9a3a7061c9fcd3a/arduino/arduino.ino
@zapta any issues give me a shout
-
Thanks Richard. The pull request should be in now. Let me know if there is any problem.
Since you are now the active developer, would you like me to point my repository to yours (via a link in the main page), making yours the main one?
-
@zapta you can do, happy to continue making little tweaks to it. Next on the list is multiple printers.
-
@richardmckenna, what github repository to point to?
Also, if it's a fork of mine, you may want to decouple it since it will be now the system of record.
-
@zapta https://github.com/richard-mckenna/duet_buddy
Will do thanks!
-
@richardmckenna, done https://github.com/zapta/duet_buddy
Please let me know when you will decouple from my repository.
Edit: Also updated the link at the top post here.
-
Transition done. Deleted the source code and added your pictures to entice visitors to click on the link.
-
Hello,
I adopted the Code a litte for using it with M5Stack Core2 AWS.
It needs only a few changes in the Code, mostly in the Battery level check.I have changed the HTTP Communication because, when you set a password on the Duet it wont connect properly
String protocol = "http://"; String con = "/rr_connect?password="; String login_url = protocol + doc["printer_ip"].as<String>() + con + doc["printer_pass"].as<String>(); Serial.println(login_url); String query = "/rr_status?type=3"; String status_url = protocol + doc["printer_ip"].as<String>() + query; Serial.println(status_url); String dis = "/rr_disconnect"; String logout_url = protocol + doc["printer_ip"].as<String>() + dis; Serial.println(logout_url);
//Start Connecting to Duet when Wifi is connected if (wifi_connected and com == 0) { com = 1; Serial.println("Wifi Connected"); } // Connect to duet and send a Get status http request. http.useHTTP10(true); switch (com) { case 1: { http.begin(config.printer_pass); Serial.print("[HTTP] GET "); Serial.println(config.printer_pass); com = 2; } break; case 2: { http.begin(config.printer_ip); Serial.print("[HTTP] GET "); Serial.println(config.printer_ip); } break; case 3: { http.begin(config.printer_diss); Serial.print("[HTTP] GET "); Serial.println(config.printer_diss); M5.shutdown(); } break; default : { com = 0; } break; } const int httpCode = http.GET(); Serial.printf("[HTTP] GET... code: %d\n", httpCode);
Also edit the SD Card Variables
{ "wifi_ssid" : "xxx", "wifi_password" : "yyy", "printer_name" : "zzz", "printer_ip" : "xxx.xxx.xxx.xxx", "printer_pass" : "yyy", "printer_diss" : "" }
The only thing where i struggle a bit, is to Logoff corectly when Battery level is low or Poweroff is pressed.
@richardmckenna
@zapta
23. Mai 2021, 20:31Have you interest in the full code for M5stack Core2/CoreAWS, for your Github?
-
I know this is an old thread but I'm wondering if any has gotten this to work with Duet 3+RPI? My RPI4 is connected to my 5G wifi but it seems because the M5 cannot connect to 5G it cannot connect to the Duet.
-
@dhusolo I don't think it works with duets and SBCs so it's standalone only