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

ExecOnMcode

Scheduled Pinned Locked Moved
Plugins for DWC and DSF
11
76
5.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
    Falcounet
    last edited by Falcounet 4 Sept 2022, 19:38

    Hello !

    I'm pleased to announce the release of my first plugin for DSF.
    ExecOnMcode is a SBC plugin for DuetSoftwareFramework and based on dsf-python to run commands on user-defined M-Codes.

    This plugin is based on the original idea from wilriker's execonmcode.

    Feel free to give some feedback, post the issues you may face and ask for improvements to this thread.

    undefined 1 Reply Last reply 5 Sept 2022, 10:58 Reply Quote 6
    • undefined T3P3Tony referenced this topic 5 Sept 2022, 10:51
    • undefined
      T3P3Tony administrators @Falcounet
      last edited by 5 Sept 2022, 10:58

      @falcounet thanks for this! Also thanks for submitting it to the plugin repository!

      I think we should have a health warning around this advice in the documentation:

      If for some reason you want to go beyond that limitation, create a 010_dsf-nopasswd file into /etc/sudoers.d/ with the following content : dsf ALL=(ALL) NOPASSWD: ALL
      Then use sudo with the command you wish to run using ExecOnMcode.

      outline the risks of allowing the dsf user to run su commands.

      www.duet3d.com

      undefined 1 Reply Last reply 5 Sept 2022, 11:05 Reply Quote 0
      • undefined
        T3P3Tony administrators @T3P3Tony
        last edited by 5 Sept 2022, 11:05

        @Falcounet Like the example you have for running a python scrip and getting information baout the state of the SBC back:

        ccbb23e3-ed49-4db5-8f93-a9e466b60761-image.png

        www.duet3d.com

        1 Reply Last reply Reply Quote 0
        • undefined
          R4ffers
          last edited by 20 Sept 2022, 20:55

          Hi, I've just been looking at this as I'd like to shutdown my SBC. How do you actually go about doing it? Thanks in advance.

          Mb6hc + 3hc + 1lc on Voron V2.4, Mini 5+ exp 2+ on Vzbot 235 AWD, Duet 2 wifi on Ox CNC and Mini 5+ on Millennium Milo v1.5 mini mill.

          undefined 1 Reply Last reply 24 Sept 2022, 14:38 Reply Quote 0
          • undefined
            Falcounet @R4ffers
            last edited by 24 Sept 2022, 14:38

            @r4ffers shutdown requires root privileges and thus isn't possible to use that plugin without hacks as the plugin runs as dsf user.
            It is recommended to use the DuetPiManagementPlugin for shutdown.

            undefined 1 Reply Last reply 24 Sept 2022, 15:05 Reply Quote 1
            • undefined
              R4ffers @Falcounet
              last edited by 24 Sept 2022, 15:05

              @falcounet thankyou

              Mb6hc + 3hc + 1lc on Voron V2.4, Mini 5+ exp 2+ on Vzbot 235 AWD, Duet 2 wifi on Ox CNC and Mini 5+ on Millennium Milo v1.5 mini mill.

              1 Reply Last reply Reply Quote 0
              • undefined
                E3D-TCW
                last edited by 3 Oct 2022, 15:08

                Hello @Falcounet

                I've tried giving this a run and during install we're coming up with the error:
                MicrosoftTeams-image.png

                Any suggestions how to resolve this? We tried installing dsf-python directly via pip install, but it did not seem to resolve it.

                undefined 1 Reply Last reply 3 Oct 2022, 16:58 Reply Quote 0
                • undefined
                  Falcounet @E3D-TCW
                  last edited by Falcounet 10 Mar 2022, 17:02 3 Oct 2022, 16:58

                  @e3d-tcw You need to use pip3 as it is a Python3 module. Install python3-pip package if pip3 isn't available on your system.
                  What DSF version do you use ? This was normally fixed in 3.4

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    CrazyCreator
                    last edited by 30 Nov 2022, 18:52

                    I like this plugin. But version 0.1 is not that advanced yet. Are you ( @Falcounet ) still developing it?

                    http://www.crazycreatorcube.com

                    undefined 1 Reply Last reply 30 Nov 2022, 18:53 Reply Quote 0
                    • undefined
                      Falcounet @CrazyCreator
                      last edited by 30 Nov 2022, 18:53

                      @CrazyCreator No real plan so far. Can you be more explicit about what you find it "not that advanced yet" ?

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        CrazyCreator
                        last edited by 30 Nov 2022, 18:54

                        @Falcounet said in ExecOnMcode v0.1:

                        @CrazyCreator No real plan so far. Can you be more explicit about what you find it "not that advanced yet" ?

                        sorry ... that was the bad google translator. The question was, are you still programming or is it finished?

                        http://www.crazycreatorcube.com

                        undefined 1 Reply Last reply 30 Nov 2022, 18:55 Reply Quote 0
                        • undefined
                          Falcounet @CrazyCreator
                          last edited by 30 Nov 2022, 18:55

                          @CrazyCreator I'm not still programming it for now but if you have improvement or feature requests, I can consider them.

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            CrazyCreator
                            last edited by 30 Nov 2022, 18:56

                            That sounds good... will try it out in the next few days.

                            http://www.crazycreatorcube.com

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              CrazyCreator
                              last edited by CrazyCreator 30 Nov 2022, 22:00

                              @Falcounet
                              Bildschirm­foto 2022-11-30 um 23.00.01.png

                              Bildschirm­foto 2022-11-30 um 23.00.31.png

                              Raspi 4 with bullseye

                              http://www.crazycreatorcube.com

                              undefined 2 Replies Last reply 30 Nov 2022, 22:02 Reply Quote 0
                              • undefined
                                Falcounet @CrazyCreator
                                last edited by 30 Nov 2022, 22:02

                                @CrazyCreator I think it's an issue with AppArmor. Do you use the DuetPi image for the SBC ?

                                undefined 1 Reply Last reply 30 Nov 2022, 22:03 Reply Quote 0
                                • undefined
                                  CrazyCreator @Falcounet
                                  last edited by 30 Nov 2022, 22:03

                                  @Falcounet
                                  No ... i make all clean today
                                  Raspi bullseye from raspi

                                  http://www.crazycreatorcube.com

                                  undefined 1 Reply Last reply 30 Nov 2022, 22:04 Reply Quote 0
                                  • undefined
                                    Falcounet @CrazyCreator
                                    last edited by 30 Nov 2022, 22:04

                                    @CrazyCreator Then try installing apparmor and try again

                                    undefined 1 Reply Last reply 30 Nov 2022, 22:15 Reply Quote 0
                                    • undefined
                                      CrazyCreator @Falcounet
                                      last edited by 30 Nov 2022, 22:15

                                      @Falcounet
                                      I don't just have to install it. This AppArmor still needs to be configured.

                                      Do you know what I have to do exactly? I'm not the Linux expert

                                      http://www.crazycreatorcube.com

                                      undefined 1 Reply Last reply 30 Nov 2022, 22:19 Reply Quote 0
                                      • undefined
                                        Falcounet @CrazyCreator
                                        last edited by Falcounet 30 Nov 2022, 22:19

                                        @CrazyCreator DSF configure it for you. Config files are stored into /etc/apparmor.d/.
                                        You should get /etc/apparmor.d/dsf.ExecOnMcode after the plugin installation.

                                        Make sure you also have installed duetpluginservice

                                        undefined 1 Reply Last reply 30 Nov 2022, 22:48 Reply Quote 0
                                        • undefined
                                          CrazyCreator
                                          last edited by CrazyCreator 30 Nov 2022, 22:33

                                          @Falcounet
                                          Bildschirm­foto 2022-11-30 um 23.32.18.png

                                          I don't have this file.

                                          But the install from the plugin is not complete, so i think the file is not created.

                                          http://www.crazycreatorcube.com

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