• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    zapta @Danal
    last edited by 4 Feb 2020, 16:36

    Thanks Danal. I am currently using '/rr_status?type=3' but this can be configured in the M5Stack SD card config file to any url. Picked =3 because this is what my DWC keeps polling.

    Currently the response parser looks for these json fields:
    status, fractionPrinted, coords.xyz[2], temps.current[0] and temps.current[1]. If RRF3 has them then it work with no change. Otherwise, adding them to the parser should be easy.

    Response parser is straight forward and anybody make changes for RRF3 please send me a pull request.

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

    1 Reply Last reply Reply Quote 1
    • undefined
      bricor @zapta
      last edited by bricor 2 Jun 2020, 03:21 6 Feb 2020, 03:11

      @zapta I just set one up. Fairly straight forward, Monitoring a print job as I'm typing this. I may have missed it, is there a way to program the buttons to pause or stop the current job or does it only monitor the printer (one way device)? Thank you, it's a neat little device.

      IMG_9303.jpg

      undefined 1 Reply Last reply 6 Feb 2020, 03:30 Reply Quote 0
      • undefined
        zapta @bricor
        last edited by zapta 2 Jun 2020, 03:32 6 Feb 2020, 03:30

        @bricor, awesome!!!

        Currently the buttons are not used but shouldn't be too difficult for any with some programming experience to program them to do things, for example, sending gcode commands to the printer.

        Here is a challenge, the first person that will program a button to send any command to the duet will the respect of the community and an amazon gift card of $25 (e.g. for a spool of filament). Challenge closes April 30. Please report your success here and ping me.

        undefined 1 Reply Last reply 6 Feb 2020, 03:50 Reply Quote 3
        • undefined
          bricor @zapta
          last edited by bricor 2 Jun 2020, 03:51 6 Feb 2020, 03:50

          @zapta I really apprecite the effort. I could only imagine what it took to put this together. For me, it was a challenge to put the bits and pieces in place to go from plugging in the usb cable to having a functioning device. Not difficult, but a challenge. I hope to figure out what you did here and the whole c programming stuff. Need to be able to toggle between machines (ip addresses) as well

          undefined 1 Reply Last reply 6 Feb 2020, 04:50 Reply Quote 0
          • undefined
            zapta @bricor
            last edited by 6 Feb 2020, 04:50

            @bricor, I plan to look for ways to simplify the deployment for people that don't want to deal with Arduino. M5Stack has a software tool called M5Burner and another option is to use the esptool program directly. Need to figure those out or possibly somebody here can come with a simple recipe to 'burn' the Duet Buddy firmware.

            undefined 1 Reply Last reply 6 Feb 2020, 06:01 Reply Quote 0
            • undefined
              bricor @zapta
              last edited by 6 Feb 2020, 06:01

              @zapta I should’ve said fun challenge. Rewarding type

              1 Reply Last reply Reply Quote 0
              • undefined
                richardmckenna
                last edited by 6 Feb 2020, 10:21

                dammit!!! you guys have just made, nay, forced me to buy this!. Grrrrrr

                M5Stack and Battery module on their way.

                1 Reply Last reply Reply Quote 0
                • undefined
                  tekkydave
                  last edited by 6 Feb 2020, 10:25

                  I have one on order from Bangood. Ordered the Grey one at £29.53 as it has the motion sensor built in.

                  ~ tekkydave ~
                  D-Bot: 300x300mm | Duet WiFi + Duex2 | 3 independent z motors | X,Y & Z linear rails | E3D Titan Aero + V6 | Precision Piezo z-probe
                  FreeCAD, PrusaSlicer

                  undefined undefined 2 Replies Last reply 6 Feb 2020, 10:28 Reply Quote 0
                  • undefined
                    jay_s_uk @tekkydave
                    last edited by 6 Feb 2020, 10:28

                    I ordered the grey one too from aliexpress for £28.51.
                    Still waiting for it to get dispatched due to the "extended" chinese new year.
                    Sounds as though that won't happen till around the 18/02

                    Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      richardmckenna @tekkydave
                      last edited by 6 Feb 2020, 10:28

                      @tekkydave ah I went with this one https://www.amazon.co.uk/MakerHawk-Development-Bluetooth-Expandable-Compatible/dp/B07M71ZG6N which has the built in MPU9250 - £13 more but I get it tomorrow 🙂

                      undefined 1 Reply Last reply 6 Feb 2020, 10:29 Reply Quote 0
                      • undefined
                        jay_s_uk @richardmckenna
                        last edited by 6 Feb 2020, 10:29

                        @richardmckenna thats the grey one

                        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                        undefined 1 Reply Last reply 6 Feb 2020, 17:34 Reply Quote 1
                        • undefined
                          zapta @jay_s_uk
                          last edited by 6 Feb 2020, 17:34

                          The github repository has now a script to download the firmware to a M5Stack Core. For now it's only for windows but writing a similar shell script for Mac or Linux should be easy.

                          With this script, the Arduino IDE is not needed anymore (unless if you want to make code changes) and it just requires the Silicon Labs USB/Serial driver (available at m5stack.com and silabs.com).

                          https://github.com/zapta/misc/tree/master/duet3d_buddy/release

                          Please let me know howit works and feel free to send me pull requests.

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            tekkydave
                            last edited by 6 Feb 2020, 17:42

                            It's arrived 🙂
                            2020-02-06 17.00.59.jpg
                            2020-02-06 17.02.18.jpg
                            2020-02-06 17.01.48.jpg
                            2020-02-06 17.01.35.jpg

                            ~ tekkydave ~
                            D-Bot: 300x300mm | Duet WiFi + Duex2 | 3 independent z motors | X,Y & Z linear rails | E3D Titan Aero + V6 | Precision Piezo z-probe
                            FreeCAD, PrusaSlicer

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              hayseed_byte @zapta
                              last edited by 8 Feb 2020, 18:52

                              Very cool project!

                              Is there a way to do something similar but display the status of multiple printers on a computer monitor? Maybe with the use of a raspberry pi? I have nine printers that I'd like to monitor from another room but I don't want to buy nine of those. 😄

                              https://wildbot.me/wildbot
                              Gcode Definitions for VSCode extension: https://github.com/hayseedbyte/rrf-gcode-definitions

                              undefined 1 Reply Last reply 8 Feb 2020, 18:54 Reply Quote 0
                              • undefined
                                Phaedrux Moderator @hayseed_byte
                                last edited by 8 Feb 2020, 18:54

                                @hayseed_byte Perhaps something like this?
                                https://github.com/DanalEstes/MultiDuetWebMonitor

                                Z-Bot CoreXY Build | Thingiverse Profile

                                undefined 1 Reply Last reply 8 Feb 2020, 21:01 Reply Quote 1
                                • undefined
                                  hayseed_byte @Phaedrux
                                  last edited by 8 Feb 2020, 21:01

                                  @Phaedrux That's perfect. Thanks! Don't know how I haven't come across that.

                                  https://wildbot.me/wildbot
                                  Gcode Definitions for VSCode extension: https://github.com/hayseedbyte/rrf-gcode-definitions

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    Danal
                                    last edited by 9 Feb 2020, 03:30

                                    I've never tried it, but that should run just fine in a Pi browser. Let me know if it does not.

                                    PM here, or danal (dot) estes (at) gmail (dot) com

                                    Delta / Kossel printer fanatic

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      richardmckenna
                                      last edited by 13 Feb 2020, 14:32

                                      @zapta any chance you could move the duet buddy code to its own repo? It would make it easier to fork without pulling all your other misc stuff as well 🙂

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        richardmckenna
                                        last edited by 14 Feb 2020, 10:23

                                        I did something!

                                        IMG_20200214_075451.jpg

                                        I added a battery level indicator and the printer name. Strangely the M5Stack API only returns the battery level in increments of 25, not sure if there is a way to get round this by skipping the M5Stack API method and going straight to requesting it from the I2C. Will have to look into it more, but from what I can discern from the basic docs and the Chinese datasheet for the IP5306 it only returns 1 of 4 values depending on the voltage range.

                                        This is the current method in the API:

                                        // Return percentage * 100
                                        int8_t POWER::getBatteryLevel() {
                                        uint8_t data;
                                        if (M5.I2C.readByte(IP5306_ADDR, IP5306_REG_READ3, &data) == true) {
                                        switch (data & 0xF0) {
                                        case 0x00:
                                        return 100;
                                        case 0x80:
                                        return 75;
                                        case 0xC0:
                                        return 50;
                                        case 0xE0:
                                        return 25;
                                        default:
                                        return 0;
                                        }
                                        }
                                        return -1;
                                        }

                                        I also don't quite know what is happening with the switch statement and data & 0xF0but that's just my lack of C++ knowledge and IC programming. So if someone can educate me that would be great 😉

                                        I'm going to try adding the charging status as well for when it is plugged in and maybe tweak the layout a bit, then if someone can test it, I'll create a pull request to Zapta's original 🙂

                                        undefined 1 Reply Last reply 16 Feb 2020, 04:32 Reply Quote 0
                                        • undefined
                                          zapta @richardmckenna
                                          last edited by zapta 16 Feb 2020, 04:32

                                          @richardmckenna, very nice!

                                          The IP5306 seems to have only 25% increments for the LEDs and possibly the IP5306_I2C has the same resolution but with I2C interface instead of LEDs. Hard to find information about the IP5306_I2C.

                                          M5Stack Schematic
                                          http://community.m5stack.com/assets/uploads/files/1515402963959-97994060-2969-49dc-ad9c-7b3887d95a17-image.png

                                          IP5306 (non I2C) Datasheet
                                          https://datasheet.lcsc.com/szlcsc/1809201029_INJOINIC-IP5306_C181692.pdf

                                          The expression (data & 0xF0) returns the 8 bit value of 'data' with the four right bits forces to '0'.

                                          BTW, the two temperature fields in your picture seems to have extra characters. Is it intentional?

                                          undefined 1 Reply Last reply 16 Feb 2020, 07:57 Reply Quote 0
                                          39 out of 85
                                          • First post
                                            39/85
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA