Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Api duet responses to Gcode sent

    Duet Web Control wishlist
    5
    14
    1217
    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.
    • Biketrial981
      Biketrial981 last edited by

      Hi, sorry for my bad English, I'm using a translator.

      I am creating a dashboard for my printers with duet and see all the centralized info. I have a question with the api:

      Does not return response from the gcode sent?

      For example, I can not see the response of an M122 for diagnosis?

      Thank you!

      dc42 1 Reply Last reply Reply Quote 0
      • Danal
        Danal last edited by

        By "I am creating a dashboard" do you mean you've written new HTML code? Different from what comes with the Duet itself?

        If so, you should be aware that any "response" from the board will only be available until any web interface retrieves that response. Meaning, if you are running the provided web interface, AND your new web interface, only one of them will get the response.

        Delta / Kossel printer fanatic

        1 Reply Last reply Reply Quote 0
        • Danal
          Danal last edited by

          Also, if your goal is to monitor multiple printers from one page, please see:

          https://github.com/DanalEstes/MultiDuetWebMonitor

          Delta / Kossel printer fanatic

          robm 1 Reply Last reply Reply Quote 0
          • Biketrial981
            Biketrial981 last edited by

            alt text

            it is not the web of control itself, but a personalized dashboard where you can see my 4 printers with duet, with touch screen.

            I have seen that software, but I want to use it on touch screen and have buttons for each machine for quick access. preheat, change plastic, home etc ... and not have to open the web of each, although it is inside the dashboard as well.

            I also want it to be with a personalized look. I can send the gcode without problem, but I would like to recover important values of the M122, but I think that there is no answer, only the buffer free space.

            We are also working on a wireless screen, soon news! 😉

            alt text

            alt text

            T3P3Tony 1 Reply Last reply Reply Quote 3
            • dc42
              dc42 administrators @Biketrial981 last edited by

              @biketrial981 said in Api duet responses to Gcode sent:

              Hi, sorry for my bad English, I'm using a translator.

              I am creating a dashboard for my printers with duet and see all the centralized info. I have a question with the api:

              Does not return response from the gcode sent?

              For example, I can not see the response of an M122 for diagnosis?

              Thank you!

              The standard rr_status response indicates whether there is a reply, but you need to use the rr_reply HTTP request to fetch the reply.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              Biketrial981 1 Reply Last reply Reply Quote 1
              • Danal
                Danal last edited by

                Mostly, these interfaces "poll" for status. They generally do not look for the exact response to a given command. This makes them "self healing", if they miss an update for whatever reason, the next poll fixes it. In fact, the web interface included in the Duet (DWC) polls every 1/2 second. Personally, I think that's a bit excessive.

                Anyway, polling the printer with a rr_status would seem to do what you want.

                Delta / Kossel printer fanatic

                1 Reply Last reply Reply Quote 0
                • T3P3Tony
                  T3P3Tony administrators @Biketrial981 last edited by

                  @biketrial981 "wireless screen, soon news" Looking forward to it!

                  Duet Hardware Designer
                  www.duet3d.com

                  Biketrial981 1 Reply Last reply Reply Quote 0
                  • Biketrial981
                    Biketrial981 @T3P3Tony last edited by Biketrial981

                    @t3p3tony the idea started with the simple version, only informative.

                    But we found a wemos with stick, screen and 18650 battery cheap.

                    https://www.aliexpress.com/item/1PC-ESP8266-Preflashed-Development-Board-OLED-version-ESP8266-18650-OLED-Integrated-Circuits/32832553517.html?spm=a2g0s.9042311.0.0.260a4c4dTZ6bQO

                    With this we can now launch commands and macros, in addition to changing some parameters.

                    The idea is to have something to move around the house. If you are in the room, have something on the table that indicates the state of the print and not depend on the phone. More than to replace the screen of the printer, it is a gadget or complement 😉

                    1 Reply Last reply Reply Quote 0
                    • T3P3Tony
                      T3P3Tony administrators last edited by T3P3Tony

                      @biketrial981 Ahh fair enough. I saw it more as a really easy way to add simple feedback on the printer - so you could grab your phone or laptop to make changes if required. No doubt people will use it for both $10 is pretty impressive for a screen + ESP+ addons. I hope you will release your firmware for it?

                      Duet Hardware Designer
                      www.duet3d.com

                      Biketrial981 1 Reply Last reply Reply Quote 0
                      • Biketrial981
                        Biketrial981 @T3P3Tony last edited by

                        @t3p3tony Of course! In a short time we will have something already usable so that people can go playing and modifying it 😉

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

                          @danal not to hijack the thread but is there a screenshot somewhere? I looked around your other threads a bit with no luck.

                          1 Reply Last reply Reply Quote 0
                          • Biketrial981
                            Biketrial981 @dc42 last edited by Biketrial981

                            @dc42 said in Api duet responses to Gcode sent:

                            @biketrial981 said in Api duet responses to Gcode sent:

                            Hi, sorry for my bad English, I'm using a translator.

                            I am creating a dashboard for my printers with duet and see all the centralized info. I have a question with the api:

                            Does not return response from the gcode sent?

                            For example, I can not see the response of an M122 for diagnosis?

                            Thank you!

                            The standard rr_status response indicates whether there is a reply, but you need to use the rr_reply HTTP request to fetch the reply.

                            Thank you! with Request URL: http://192.168.0.13/rr_reply I can obtain the data that I was missing, for the advanced section of the dashboard

                            could it affect the printing consult the gcode M122?

                            the bad thing is that it returns plain text, if it were a json it would be wonderful xD

                            1 Reply Last reply Reply Quote 0
                            • dc42
                              dc42 administrators last edited by

                              What would be the advantage in having the reply sent as JSON, given the that reply consists of plain text?

                              Duet WiFi hardware designer and firmware engineer
                              Please do not ask me for Duet support via PM or email, use the forum
                              http://www.escher3d.com, https://miscsolutions.wordpress.com

                              1 Reply Last reply Reply Quote 0
                              • Biketrial981
                                Biketrial981 last edited by

                                For normal use there is no advantage, but at the time of processing the data is much more comfortable indexes and to use a Vin.min for example and not having to parse all the text.

                                It is not something that contributes anything, and with a function it would not be complicated to create the json, but I understand that the use would be minor. I will try to do it in my server part, since I am interested in some data of the diagnosis gcode.

                                The rr_reply has helped me a lot 😉

                                Sorry for my bad english!

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