Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Duet Buddy - a proof of concept remote monitor

    Scheduled Pinned Locked Moved
    General Discussion
    19
    85
    8.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • timcurtis67undefined
      timcurtis67 @jay_s_uk
      last edited by

      @jay_s_uk said in Duet Buddy - a proof of concept remote monitor:

      I've ordered an M5Stack Core so I can try it out

      I'm ordering one today as well.

      1 Reply Last reply Reply Quote 0
      • richardmckennaundefined
        richardmckenna @Dougal1957
        last edited by

        @Dougal1957 will do. I just want to get my printer running with the Duet3 first then I will go back to this project.

        1 Reply Last reply Reply Quote 0
        • UnderDoneSushiundefined
          UnderDoneSushi @richardmckenna
          last edited by UnderDoneSushi

          @richardmckenna That is exactly what I was looking into doing also! Do you have any documentation or guides on how to do this? I don't know how to code a Raspberry Pi..

          Just saw your comment, would love to see a guide in the future!

          1 Reply Last reply Reply Quote 1
          • UnderDoneSushiundefined
            UnderDoneSushi
            last edited by

            @zapta so will this be connected over wifi? Awesome idea since most users use just the UI online and not a touch screen

            zaptaundefined 1 Reply Last reply Reply Quote 0
            • Phaedruxundefined
              Phaedrux Moderator
              last edited by

              That's really cool.

              On a side note, can you post the gcode for the shave and a haircut two bits tune in the background of the video? Asking for a friend...

              Z-Bot CoreXY Build | Thingiverse Profile

              1 Reply Last reply Reply Quote 0
              • zaptaundefined
                zapta @UnderDoneSushi
                last edited by

                @UnderDoneSushi said in Duet Buddy - a proof of concept remote monitor:

                @zapta so will this be connected over wifi? Awesome idea since most users use just the UI online and not a touch screen

                Yes, it's uses wifi to connect to the duet. It can work on batteries (there are third party replacement batteries with larger capacity if you need) or connected to a usb charger (Type C cable).

                @Phaedrux, that tune is from here https://github.com/zapta/misc/blob/3639b3ed30d71bf4465b09f19e08cb888792e71a/duet3d_monitor/arduino/beeper.cpp#L111 this is Arduino code.

                Phaedruxundefined 2 Replies Last reply Reply Quote 0
                • Phaedruxundefined
                  Phaedrux Moderator @zapta
                  last edited by

                  @zapta Thanks. I think I can translate that into gcode.

                  Z-Bot CoreXY Build | Thingiverse Profile

                  1 Reply Last reply Reply Quote 0
                  • zaptaundefined
                    zapta
                    last edited by

                    Just found out. The M5Stack has built in magnets and sticks to things 😉

                    IMG-1897.JPG

                    1 Reply Last reply Reply Quote 1
                    • Phaedruxundefined
                      Phaedrux Moderator @zapta
                      last edited by Phaedrux

                      @zapta said in Duet Buddy - a proof of concept remote monitor:

                      @Phaedrux, that tune is from here https://github.com/zapta/misc/blob/3639b3ed30d71bf4465b09f19e08cb888792e71a/duet3d_monitor/arduino/beeper.cpp#L111 this is Arduino code.

                      Thanks again. Translated for Duet Gcode here:

                      ; 0:/macros/Tunes/TwoBits.g
                      ; Shave and a haircut, two bits
                      
                      ; NOTE(NOTE_C6, 4), 1047
                      ; NOTE(NOTE_G5, 8), 784
                      ; NOTE(NOTE_G5, 8), 784
                      ; NOTE(NOTE_A5, 4), 880
                      ; NOTE(NOTE_G5, 4), 784
                      ; NOTE(0,       4),
                      ; NOTE(NOTE_B5, 4), 988
                      ; NOTE(NOTE_C6, 4), 1047
                      
                      M300 P400 S1047
                      G4 P410
                      M300 P350 S783
                      G4 P355
                      M300 P400 S785
                      G4 P410
                      M300 P400 S880
                      G4 P410
                      M300 P400 S784
                      G4 P850
                      M300 P400 S988
                      G4 P410
                      M300 P600 S1047
                      G4 P600
                      

                      Works good on my old style PanelDue 7"

                      Sorry for the distraction. 😉

                      Z-Bot CoreXY Build | Thingiverse Profile

                      droftartsundefined 1 Reply Last reply Reply Quote 0
                      • droftartsundefined
                        droftarts administrators @Phaedrux
                        last edited by

                        @Phaedrux said in Duet Buddy - a proof of concept remote monitor:

                        Works good on my old style PanelDue 7"

                        I thought you said it was 'for a friend'?!

                        Ian

                        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                        Phaedruxundefined 1 Reply Last reply Reply Quote 0
                        • Phaedruxundefined
                          Phaedrux Moderator @droftarts
                          last edited by

                          @droftarts Well I had to test it out for him, obviously...

                          Z-Bot CoreXY Build | Thingiverse Profile

                          1 Reply Last reply Reply Quote 2
                          • zaptaundefined
                            zapta
                            last edited by

                            I use this tune to let me know when the printer is in pause mode (e.g. to insert magnets half way). My serial duet monitor detects the state from the PanelDue communication and plays it every few seconds.

                            Should be easily to do the same with the M4Stack since it knows the printer's state and has a 1W speaker.

                            (I tried to play tunes via gcode but barely hear them from the PanelDue's speaker).

                            hayseed_byteundefined 1 Reply Last reply Reply Quote 1
                            • zaptaundefined
                              zapta
                              last edited by

                              Had more progress with the firmware and it's stable and usefulnow. Here is a video that demonstrates how it behaves with the sequence: print, pause, resume, pause, cancel.

                              https://imgur.com/UKi2MdF

                              2020-02-01_23-12-33.png

                              The full source code is here https://github.com/zapta/misc/tree/master/duet3d_buddy/arduino and is in public domain so feel to do with it whatever you like. The main flow is straight forward Arduino style and should be easy to understand and modify.

                              If any programmer here is looking for ideas on how to improve it, here are a few:

                              • Some mechanism that will allow people to buy the M5Stack and program it by inserting a SD card with downloaded software.
                              • UI to select from a few duet related mini apps (e.g. a Pressure Advance Buddy that allow to increase/decrease pressure advance on the fly using a + and - buttons)
                              • Sound effects. E.g. a periodic tune when in pause mode to get the attention of the operator.
                              tobias_munichundefined 1 Reply Last reply Reply Quote 3
                              • tobias_munichundefined
                                tobias_munich @zapta
                                last edited by

                                @zapta is it working with the DUET3 & RRF3?

                                Hypercube-Evolution, Dual-Z, Nimble v2, Orion Piezo
                                Duet3, DuetWifi, Raspberry Pi 4, 7 inch HDMI Display, Panel-Due
                                Firmware: RepRapFirmware for Duet 3 MB6HC 'always the latest release'

                                zaptaundefined 1 Reply Last reply Reply Quote 0
                                • zaptaundefined
                                  zapta @tobias_munich
                                  last edited by

                                  @tobias_munich said in Duet Buddy - a proof of concept remote monitor:

                                  @zapta is it working with the DUET3 & RRF3?

                                  Didn't tested it with duet3 and RRF3 (I have neither) but it it doesn't work, a small change should fix it.

                                  The duet buddy polls the printer at the URL below with xx.xx.xx.xx representing the IP address of the printer.

                                  http://xx.xx.xx.xx/rr_status?type=3

                                  It expect to get back a json document with the printer status and then extract a few values such as progress, temp and z height. You can try it manually from a browser and see if you get a json doc. If you will post it here, I can text if the existing firmware will parse it correctly.

                                  richardmckennaundefined Danalundefined 2 Replies Last reply Reply Quote 0
                                  • richardmckennaundefined
                                    richardmckenna @zapta
                                    last edited by

                                    @zapta not sure about standalone mode duet3 but I don't think it will work with duet3 + pi as DSF has a new REST API so it would be a GET at http://{{RASP_PI_IP}}/machine/status.

                                    Also not sure if the JSON model that is returned has changed from the old version. I will see what it returns tonight if no one else has by the time I get to it 🙂

                                    zaptaundefined tobias_munichundefined 2 Replies Last reply Reply Quote 0
                                    • zaptaundefined
                                      zapta @richardmckenna
                                      last edited by

                                      @richardmckenna, shouldn't be too difficult to handle the difference. The duet buddy reads its configuration from an SD card so instead of the duet IP it can read the full duet status URL. As for json field names, if they changed, should be difficult to select an alternative parsing.

                                      This is the current duet status parser logic. It's straight forward and can be easily adapted to pick whatever fields.

                                      https://github.com/zapta/misc/blob/master/duet3d_buddy/arduino/duet_parser.cpp

                                      1 Reply Last reply Reply Quote 0
                                      • Danalundefined
                                        Danal @zapta
                                        last edited by

                                        @zapta said in Duet Buddy - a proof of concept remote monitor:

                                        @tobias_munich said in Duet Buddy - a proof of concept remote monitor:

                                        @zapta is it working with the DUET3 & RRF3?

                                        Didn't tested it with duet3 and RRF3 (I have neither) but it it doesn't work, a small change should fix it.

                                        The duet buddy polls the printer at the URL below with xx.xx.xx.xx representing the IP address of the printer.

                                        http://xx.xx.xx.xx/rr_status?type=3

                                        It expect to get back a json document with the printer status and then extract a few values such as progress, temp and z height. You can try it manually from a browser and see if you get a json doc. If you will post it here, I can text if the existing firmware will parse it correctly.

                                        If you look at DWC2, it contains a javascript module that figures out whether the printer is using HTTP Polling or using WebSockets, connects, and then handles future requests in an abstract way. Shouldn't be too hard to reproduce this in the M5stack device. That would allow it to connect to either old or new very easily.

                                        Delta / Kossel printer fanatic

                                        zaptaundefined 1 Reply Last reply Reply Quote 0
                                        • zaptaundefined
                                          zapta @Danal
                                          last edited by zapta

                                          @Danal, that makes sense. I already change the format of the configuration to allow specification of full url. The determination of the protocol can be added as an automatic logic or a user configured flag. This platform is very flexible.

                                          https://github.com/zapta/misc/blob/master/duet3d_buddy/arduino/arduino.ino#L9

                                          Edit: the 'type=3' in the URL has nothing to do with RRF3.

                                          1 Reply Last reply Reply Quote 0
                                          • tobias_munichundefined
                                            tobias_munich @richardmckenna
                                            last edited by

                                            @richardmckenna @zapta
                                            this is the output from the standalone version.

                                            {"status":"I","coords":{"axesHomed":[1,1,1],"wpl":1,"xyz":[15.000,0.000,4.850],"machine":[15.000,0.000,4.850],"extr":[0.0]},"speeds":{"requested":0.0,"top":0.0},"currentTool":-1,"params":{"atxPower":-1,"fanPercent":[0,100],"speedFactor":100.0,"extrFactors":[100.0],"babystep":0.000},"seq":1,"sensors":{"probeValue":0,"fanRPM":[-1,-1]},"temps":{"bed":{"current":24.2,"active":0.0,"standby":0.0,"state":0,"heater":0},"current":[24.2,23.4],"state":[0,0],"tools":{"active":[[0.0]],"standby":[[0.0]]},"extra":[{"name":"*MCU-Temp","temp":48.0},{"name":"*Chamber Temp","temp":28.3},{"name":"*Chamber Hum[%]","temp":28.3}]},"time":149.0,"currentLayer":0,"currentLayerTime":0.0,"extrRaw":[0.0],"fractionPrinted":0.0,"filePosition":0,"firstLayerDuration":0.0,"firstLayerHeight":0.00,"printDuration":0.0,"warmUpDuration":0.0,"timesLeft":{"file":0.0,"filament":0.0,"layer":0.0}}

                                            Hypercube-Evolution, Dual-Z, Nimble v2, Orion Piezo
                                            Duet3, DuetWifi, Raspberry Pi 4, 7 inch HDMI Display, Panel-Due
                                            Firmware: RepRapFirmware for Duet 3 MB6HC 'always the latest release'

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA