Navigation

    Duet3D Logo

    Duet3D

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

    Http Post from Macro

    Firmware wishlist
    8
    18
    231
    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.
    • clearlynotstef
      clearlynotstef last edited by

      As mentioned in my other post, the ability to execute an http post in a macro would be very useful. In my case I want to trigger some IoT stuff on my network when my filament sensor calls pause.g so I get a notification that my print stopped and I can go fix it. This seems very straightforward considering the duet is already connected to my network and sending data all over the place. Would be great!

      1 Reply Last reply Reply Quote 4
      • ericlmccormick
        ericlmccormick last edited by

        Bump
        I would like to trigger a webhook so that I know when there is a jam or a print is done.

        fcwilt tekstyle 2 Replies Last reply Reply Quote 1
        • fcwilt
          fcwilt @ericlmccormick last edited by

          @ericlmccormick said in Http Post from Macro:

          Bump
          I would like to trigger a webhook so that I know when there is a jam or a print is done.

          Would using Telnet be a possibility for you?

          Frederick

          Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.0

          ericlmccormick 1 Reply Last reply Reply Quote 0
          • ericlmccormick
            ericlmccormick @fcwilt last edited by

            @fcwilt I don't think so but I don't have too much experience with telnet. I want to be able to setup a trigger via webhook so I can have it do things like have an announcement via my google home speakers that there is a jam and on what printer.

            fcwilt 1 Reply Last reply Reply Quote 0
            • A Former User
              A Former User last edited by

              you could poll printers over http parse the status and send a http request as needed, but there isn't a ready made solution that doesn't requre some coding on some level (not yet at least)

              1 Reply Last reply Reply Quote 0
              • fcwilt
                fcwilt @ericlmccormick last edited by

                @ericlmccormick said in Http Post from Macro:

                @fcwilt I don't think so but I don't have too much experience with telnet. I want to be able to setup a trigger via webhook so I can have it do things like have an announcement via my google home speakers that there is a jam and on what printer.

                Do you have a link to a site that would explain how to use the google home API?

                It would be simple enough to write a Windows app that accepted a string from the Duet Telnet connection and output to a cloud based API if it uses something like JSON.

                I would likely spend more time learning to use the API then I would actually coding the application.

                Something for you to think about.

                Frederick

                Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.0

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

                  I don't have a site and I don't want to use/write an app on widows to act as an extra middle man. Most of the time my computer is hibernating anyways.
                  If the duet could trigger a webhook, then I can use IFTTT do anything such as flicker the lights when done or send me a text message if there is an error.

                  1 Reply Last reply Reply Quote 0
                  • tekstyle
                    tekstyle @ericlmccormick last edited by Phaedrux

                    @ericlmccormick
                    i would like to know too. i just got a webhook setup with the duet discord notification by @sindarius it works well to an extent as I see the notification from my phone but only if I were to go look for it. it doesn't come up as a pop up.

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

                      @dc42 sorry to bump an old thread, but now that I’m on fw 3.x and there were so many changes to firmware, is there now a way (preferably g code) I can execute a simple http request on my network? As when I started this thread, I’d like my filament monitor to call an http put/get/whatever to trigger some smarthome stuff

                      jay_s_uk 1 Reply Last reply Reply Quote 0
                      • jay_s_uk
                        jay_s_uk @clearlynotstef last edited by

                        @clearlynotstef best options I know of are btncmd for DWC or nodedsf for node red

                        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32F4 port of RRF

                        clearlynotstef 1 Reply Last reply Reply Quote 0
                        • clearlynotstef
                          clearlynotstef @jay_s_uk last edited by

                          @jay_s_uk btncmd looks like it'll go an http get based off clicking a button on dwc dashboard, but is there a way to do so automatically in a macro or in pause.g?

                          jay_s_uk 1 Reply Last reply Reply Quote 0
                          • jay_s_uk
                            jay_s_uk @clearlynotstef last edited by

                            @clearlynotstef no, there isn't. Not in standalone mode anyway.
                            You can use nodeDSF to monitor the printer for events etc.
                            The other way would be to use SBC mode (if you have a duet 3 or duet 3 mini) and use one of the APIs or execonmcode

                            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32F4 port of RRF

                            CthulhuLabs clearlynotstef 2 Replies Last reply Reply Quote 0
                            • CthulhuLabs
                              CthulhuLabs @jay_s_uk last edited by CthulhuLabs

                              @jay_s_uk If you are using an SBC you can use this project to execute Linux command line tools like wget:

                              https://github.com/wilriker/execonmcode

                              jay_s_uk 1 Reply Last reply Reply Quote 0
                              • jay_s_uk
                                jay_s_uk @CthulhuLabs last edited by

                                @cthulhulabs I mentioned execonmcode above

                                Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32F4 port of RRF

                                CthulhuLabs 1 Reply Last reply Reply Quote 0
                                • clearlynotstef
                                  clearlynotstef @jay_s_uk last edited by

                                  @jay_s_uk said in Http Post from Macro:

                                  @clearlynotstef no, there isn't. Not in standalone mode anyway.
                                  You can use nodeDSF to monitor the printer for events etc.
                                  The other way would be to use SBC mode (if you have a duet 3 or duet 3 mini) and use one of the APIs or execonmcode

                                  just duet Wi-Fi 2. I could rig a cheap esp8266 to a pin and have it do the call when gcode drives the pin, just seems crazy that the duet is already on my network and communicating but I need to use a whole additional MCU to do a simple one line long http request!

                                  DIY-O-Sphere 1 Reply Last reply Reply Quote 0
                                  • DIY-O-Sphere
                                    DIY-O-Sphere @clearlynotstef last edited by

                                    @clearlynotstef

                                    A Shelly Uni could be a viable option for you.
                                    The advantage is wifi capability with its own server out of the box. The interface should have the necessary options.
                                    I use a Shelly Switch to start my printer over the network. Basically the standard functions would have been enough for me. But then I started to work with NodeRed and made my own interface for switching.
                                    Which has also led to the fact that I now have my own smart home server....
                                    But it also took some time to get used to it. I can understand if you do not want to go that way....

                                    (UTC+1)

                                    clearlynotstef 1 Reply Last reply Reply Quote 0
                                    • clearlynotstef
                                      clearlynotstef @DIY-O-Sphere last edited by

                                      @diy-o-sphere for $3 I could just use an esp8266 to connect to my Wi-Fi, monitor a pin on the duet and do the call to my smarthome setup to trigger the routine. I've used Shellies for other things but the nodemcu would be simple for this one. Mostly I want to do it from duet directly and I'm honestly surprised I cannot. The duet is already on my network, already interacting with other things on my network, and RRF is so well thought out and capable I'm just shocked there's no way to tell it to send an http get/put

                                      1 Reply Last reply Reply Quote 0
                                      • CthulhuLabs
                                        CthulhuLabs @jay_s_uk last edited by

                                        @jay_s_uk Doh! I'm sorry I missed the last word of your post.

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