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

Http Post from Macro

Scheduled Pinned Locked Moved
Firmware wishlist
8
18
935
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
    ericlmccormick
    last edited by 26 Jul 2020, 15:59

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

    undefined undefined 2 Replies Last reply 26 Jul 2020, 16:01 Reply Quote 1
    • undefined
      fcwilt @ericlmccormick
      last edited by 26 Jul 2020, 16:01

      @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 small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

      undefined 1 Reply Last reply 26 Jul 2020, 16:15 Reply Quote 0
      • undefined
        ericlmccormick @fcwilt
        last edited by 26 Jul 2020, 16:15

        @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.

        undefined 1 Reply Last reply 26 Jul 2020, 18:17 Reply Quote 0
        • ?
          A Former User
          last edited by 26 Jul 2020, 16:37

          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
          • undefined
            fcwilt @ericlmccormick
            last edited by 26 Jul 2020, 18:17

            @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 small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

            1 Reply Last reply Reply Quote 0
            • undefined
              ericlmccormick
              last edited by 26 Jul 2020, 18:22

              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
              • undefined
                tekstyle @ericlmccormick
                last edited by Phaedrux 6 Apr 2021, 19:10 4 Jun 2021, 19:09

                @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
                • undefined
                  clearlynotstef
                  last edited by 23 Apr 2022, 01:54

                  @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

                  undefined 1 Reply Last reply 23 Apr 2022, 12:21 Reply Quote 0
                  • undefined
                    jay_s_uk @clearlynotstef
                    last edited by 23 Apr 2022, 12:21

                    @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/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                    undefined 1 Reply Last reply 23 Apr 2022, 13:36 Reply Quote 0
                    • undefined
                      clearlynotstef @jay_s_uk
                      last edited by 23 Apr 2022, 13:36

                      @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?

                      undefined 1 Reply Last reply 23 Apr 2022, 14:37 Reply Quote 0
                      • undefined
                        jay_s_uk @clearlynotstef
                        last edited by 23 Apr 2022, 14:37

                        @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/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                        undefined undefined 2 Replies Last reply 23 Apr 2022, 22:20 Reply Quote 0
                        • undefined
                          CthulhuLabs @jay_s_uk
                          last edited by CthulhuLabs 23 Apr 2022, 22:20

                          @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

                          undefined 1 Reply Last reply 24 Apr 2022, 06:00 Reply Quote 0
                          • undefined
                            jay_s_uk @CthulhuLabs
                            last edited by 24 Apr 2022, 06:00

                            @cthulhulabs I mentioned execonmcode above

                            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 25 Apr 2022, 02:32 Reply Quote 0
                            • undefined
                              clearlynotstef @jay_s_uk
                              last edited by 24 Apr 2022, 06:43

                              @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!

                              undefined 1 Reply Last reply 24 Apr 2022, 09:28 Reply Quote 0
                              • undefined
                                DIY-O-Sphere @clearlynotstef
                                last edited by 24 Apr 2022, 09:28

                                @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)

                                undefined 1 Reply Last reply 24 Apr 2022, 14:56 Reply Quote 0
                                • undefined
                                  clearlynotstef @DIY-O-Sphere
                                  last edited by 24 Apr 2022, 14:56

                                  @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
                                  • undefined
                                    CthulhuLabs @jay_s_uk
                                    last edited by 25 Apr 2022, 02:32

                                    @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