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

    [DSF Extension] Exec On MCode (was: Shutdown SBC)

    Scheduled Pinned Locked Moved
    DSF Development
    22
    117
    10.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.
    • wilrikerundefined
      wilriker @CrazyCreator
      last edited by wilriker

      @crazycreator Hm, there is something strange here. I can now reproduce your issue. I have to investigate that.

      EDIT: It seems that you discovered a but in DCS 3.3-rc2 (and possibly earlier) that will be fixed in the next RC (I have to confirm that still).

      Manuel
      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
      with probably always latest firmware/DWC (incl. betas or self-compiled)
      My Tool Collection

      CrazyCreatorundefined 1 Reply Last reply Reply Quote 0
      • CrazyCreatorundefined
        CrazyCreator @wilriker
        last edited by

        @wilriker
        Why does this always have to happen to me?

        Which RRF version do you use?
        How long do you think it will take to get to the RC?

        http://www.crazycreatorcube.com

        wilrikerundefined 1 Reply Last reply Reply Quote 0
        • wilrikerundefined
          wilriker @CrazyCreator
          last edited by

          @crazycreator It's not RRF but DSF (DCS to be exact) that has that problem. And the next RC is planned to be released within the next couple of days unless important issues will postpone it.

          Manuel
          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
          with probably always latest firmware/DWC (incl. betas or self-compiled)
          My Tool Collection

          oozeBotundefined 1 Reply Last reply Reply Quote 0
          • CrazyCreatorundefined
            CrazyCreator
            last edited by

            @wilriker
            then I will probably have to wait ... or you can send me an image of your SD card πŸ˜„

            http://www.crazycreatorcube.com

            1 Reply Last reply Reply Quote 0
            • oozeBotundefined
              oozeBot @wilriker
              last edited by

              @wilriker - just adding in that I'm experiencing the same thing on 3.3rc2.. I was able to capture it from a console when running below.

              Do you know if the issue has been found and is being corrected in 3.3rc3? Any interim builds out there floating around I could download to get past this issue?

              Thanks

              Capture.PNG

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

                @oozebot said in [DSF Extension] Exec On MCode (was: Shutdown SBC):

                Any interim builds out there floating around I could download to get past this issue?

                You could test with this build but be aware there are other potential issues.

                https://www.dropbox.com/sh/1bblsmpe8m6kb0p/AAD4J_9-uEEnr-Rvh3OjlXyZa?dl=0

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 0
                • wilrikerundefined
                  wilriker
                  last edited by

                  @CrazyCreator @oozeBot I can confirm that this bug will be fixed with DSF v3.3-rc3.

                  Manuel
                  Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                  with probably always latest firmware/DWC (incl. betas or self-compiled)
                  My Tool Collection

                  1 Reply Last reply Reply Quote 0
                  • wilrikerundefined
                    wilriker @oozeBot
                    last edited by

                    @oozebot said in [DSF Extension] Exec On MCode (was: Shutdown SBC):

                    Any interim builds out there floating around I could download to get past this issue?

                    There are no interim builds of DSF available. You would have to build it yourself from sources. What @Phaedrux posted was "only" preliminary builds of RRF 3.3-rc3.

                    Manuel
                    Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                    with probably always latest firmware/DWC (incl. betas or self-compiled)
                    My Tool Collection

                    1 Reply Last reply Reply Quote 1
                    • CrazyCreatorundefined
                      CrazyCreator
                      last edited by

                      With the new release 3.3RC3 it works πŸ™‚

                      Now I have to put the code for power off the shelly-pm in my shutdownsbc.service

                      next adventure for me πŸ˜‰

                      http://www.crazycreatorcube.com

                      1 Reply Last reply Reply Quote 1
                      • CrazyCreatorundefined
                        CrazyCreator @CrazyCreator
                        last edited by

                        @crazycreator

                        here I am ... can someone help me again?

                        After the update, execonmode now works wonderfully.

                        But unfortunately I can't start the web call to switch the shelly off.

                        Unfortunately i can't really work with the console. So it would be nice if someone could take me by the hand and show me the right way so that I know what I can try or test where.

                        So I want to achieve the following:

                        when a certain MCode is called, my Shelly 1PM should be switched off.
                        This would work in my case with the following command:
                        http://192.168.1.47/relay/0?turn=off

                        If I enter this line in a browser (of course only at home in my own network) the Shelly switches off.

                        My goal is now to achieve this via Execonmcode.

                        please help me

                        http://www.crazycreatorcube.com

                        oozeBotundefined 1 Reply Last reply Reply Quote 0
                        • oozeBotundefined
                          oozeBot @CrazyCreator
                          last edited by

                          @crazycreator this should probably be it’s own thread.. but you’ll need to code a shell script to accomplish this. Here is something similar I did for Wemo. Maybe you can take some hints from it.

                          https://forum.duet3d.com/topic/18989/script-to-control-wemos-from-gcode-using-dsf

                          CrazyCreatorundefined 1 Reply Last reply Reply Quote 0
                          • CrazyCreatorundefined
                            CrazyCreator @oozeBot
                            last edited by

                            @oozebot
                            I answered you there once

                            http://www.crazycreatorcube.com

                            1 Reply Last reply Reply Quote 0
                            • CthulhuLabsundefined
                              CthulhuLabs
                              last edited by CthulhuLabs

                              Is execonmcode blocking? Meaning if I make an M1999 Mcode which executes a command that takes a moment will my Duet pause till the script is finished?

                              EDIT: Found my own answer.

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

                                @cthulhulabs said in [DSF Extension] Exec On MCode (was: Shutdown SBC):

                                EDIT: Found my own answer.

                                What's the answer?

                                Z-Bot CoreXY Build | Thingiverse Profile

                                wilrikerundefined 1 Reply Last reply Reply Quote 0
                                • wilrikerundefined
                                  wilriker @Phaedrux
                                  last edited by

                                  @phaedrux said in [DSF Extension] Exec On MCode (was: Shutdown SBC):

                                  What's the answer?

                                  The answer is that it depends on whether or not you use the -execAsync flag when starting execonmcode. If you do it won't block and if you omit it it will wait until the command has finished.

                                  Manuel
                                  Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                  with probably always latest firmware/DWC (incl. betas or self-compiled)
                                  My Tool Collection

                                  1 Reply Last reply Reply Quote 1
                                  • oozeBotundefined
                                    oozeBot @wilriker
                                    last edited by

                                    @wilriker said in [DSF Extension] Exec On MCode (was: Shutdown SBC):

                                    @oozeBot said in [DSF Extension] Exec On MCode (was: Shutdown SBC):

                                    @wilriker Could you please provide a simple example of using the -returnOutput flag? Thanks

                                    Simple example:

                                    execonmode -mCode 7777 -command "whoami" -returnOutput
                                    

                                    will not just confirm successful completion of the command but as part of this return the output of whoami (that returns the user execonmcode is started as, so probably root) so you can see it e.g. in DWC.

                                    Digging this back up.. Does anyone know if it is possible to assign the -returnOutput to a variable?

                                    T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                                    • chrishammundefined chrishamm referenced this topic
                                    • T3P3Tonyundefined
                                      T3P3Tony administrators @oozeBot
                                      last edited by

                                      @wilriker @Falcounet

                                      Just replying here to point to the python version:
                                      https://forum.duet3d.com/topic/29783/execonmcode-v0-1

                                      www.duet3d.com

                                      1 Reply Last reply Reply Quote 1
                                      • wilrikerundefined wilriker locked this topic
                                      • Phaedruxundefined Phaedrux referenced this topic
                                      • First post
                                        Last post
                                      Unless otherwise noted, all forum content is licensed under CC-BY-SA