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 @chas2706
      last edited by

      @chas2706 Thank you for implicitly pointing out a hole in the installation instructions. I amended that to GitHub already and will fix it above in an instant.

      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
      • chas2706undefined
        chas2706
        last edited by

        @wilriker

        No problem, again thanks for your help and for producing a fantastic plugin.

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

          Important Note

          The current version of Exec On MCode is NOT compatible with DSF 1.3.0+. It will connect but fail at a random point in time which might lead to breaking side-effects. I will release a new version tomorrow or Monday. Until then, don't use this tool with DSF 1.3.0+.

          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
          • chas2706undefined
            chas2706
            last edited by

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

            Important Note

            I plan to temporarily remove this feature can you confirm that all I need to do this is to delete the extension?
            I did not enable it to run at start up.
            Many thanks for pointing this out.

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

              @chas2706 If you don't start it (automatically or manually) there is no need to do anything. It can sit in the filesystem that won't have any effect until you execute 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

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

                Release 4.0

                This version works with DuetSoftwareFramework 1.3.0 and later.

                Unfortunately due to breaking changes in the API of DSF this is NOT backwards-compatible with older versions of DuetSoftwareFramework.

                This release also has a new parameter -trace that will enable output of the underlying requests/responses to/from DuetControlServer.

                It can be downloaded as usual from GitHub Releases page.

                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 2
                • wilrikerundefined
                  wilriker
                  last edited by

                  Release v5.0

                  This release updates godsfapi to v2 and thus is only compatible with Duet Software Framework 2.1.0 and later.

                  New Features

                  • A new command-line paramter -version to output the version and exit

                  Bug fixes

                  • After a handled code is intercepted and before the assigned command is executed Flush will be called to make sure we are in sync with the machine

                  It can be downloaded as usual from GitHub Releases page

                  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
                  • gtj0undefined
                    gtj0
                    last edited by

                    So many possibilities, so little time. I'd like to take a week off from my day job to do all the things that things like this can enable. 🙂

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

                      Release 5.1

                      This release makes execonmcode compatible with Duet Software Framework 2.2.0 and later.

                      It can be found at GitHub Releases page as usual.

                      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
                      • PCRundefined
                        PCR
                        last edited by

                        got this error

                         dial unix /var/run/dsf/dcs.sock: connect: no such file or directory
                        

                        any idea?

                        1 Reply Last reply Reply Quote 0
                        • PCRundefined
                          PCR
                          last edited by

                          Sorted it out! The PI has to be connected to the Duet!

                          1 Reply Last reply Reply Quote 0
                          • PCRundefined
                            PCR
                            last edited by

                            made a little videos how to install it. Mainly for my own reference later

                            How to install and test

                            How to make it as a systemservice

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

                              @wilriker are the parameters capped at 3? If not, what are there limits? Thanks

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

                                @oozeBot It should be at least 23 (every upper-case letter except G, M and T). Possibly also every lower-case letter, but I never tried that.

                                The application itself has no enforced limit.

                                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
                                • oozeBotundefined
                                  oozeBot
                                  last edited by

                                  I posted a response a few minutes ago, but deleted it after I finally realized my mistake..

                                  One note on this that's worth mentioning is the % in the service file has to be escaped like %%. Here is an example file:

                                  
                                  [Unit]
                                  Description=Duet API listener Test
                                  After=duetcontrolserver.service
                                  Requires=duetcontrolserver.service
                                  
                                  [Service]
                                  ExecStart=/usr/local/bin/execonmcode -mCode 4567 -command "./test.sh %%A %%B %%C"
                                  Restart=always
                                  RestartSec=10
                                  
                                  [Install]
                                  WantedBy=multi-user.target
                                  
                                  wilrikerundefined 1 Reply Last reply Reply Quote 2
                                  • wilrikerundefined
                                    wilriker @oozeBot
                                    last edited by

                                    @oozeBot I added a note to the README.md. I hope this helps to prevent this trap in the future.

                                    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
                                    • docboboundefined
                                      docbobo
                                      last edited by

                                      Is this compatible with the latest beta?

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

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

                                        Is this compatible with the latest beta?

                                        Yes, it is. Though it's not built according to the DSF Plugin Specs, yet.

                                        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
                                        • A Former User?
                                          A Former User @wilriker
                                          last edited by A Former User

                                          @wilriker Good afternoon, I'm a newbie in the RFF/Duet world and I'm starting to move in all directions but I realize I need more helpt than expected....I want to install this https://forum.duet3d.com/topic/19225/timelapse-video-through-execonmcode?_=1604845400929
                                          on my Rapsby to have the capability to take timelapses of my prints. It is based on execonmcode...

                                          I am not a Raspberry/Linux expert too so I'm in trouble to undesrtand what I have to do...I have read the README.md contained in the latest version of the execonmcode but I don't exactly what to do

                                          1. this is maybe the most stupid question you have ever heard: execonmcode has to be installed in the Raspy not in the Duet's SD, right?
                                          2. Have the Raspy being connected via USB to the Duet or is enough that both are connected to the same LAN via WiFi?
                                          3. To make the script work I have understood I have to make it work as a service and configure it like this:
                                            [Unit]
                                            Description=Duet API listener for Timelapse Video by oozeBot
                                            After=duetcontrolserver.service
                                            Requires=duetcontrolserver.service
                                            [Service]
                                            ExecStart=/usr/local/bin/execonmcode -mCode 5575 -command "./scripts/timelapse.sh %%A %%F"
                                            Restart=always
                                            RestartSec=10
                                            [Install]
                                            WantedBy=multi-user.target

                                          but on github I can't find documentation about services and about where ti write down the previous lines of code I found just in the readme:

                                          • Optional: use the shutdownsbc.service systemd unit (included in the repo) to run it at startup and let it shutdown the SBC (customize to your liking)
                                            but here again I haven't understood why now you call it shutdown again...

                                          I now maybe I'm asking too much but could you help me understanding?

                                          Thanks!
                                          Andrea

                                          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                                          • jay_s_ukundefined
                                            jay_s_uk @A Former User
                                            last edited by

                                            @the_dragonlord This has to be installed on a raspberry pi connected to a duet board through SPI.
                                            Therefore it only supports duet 3's or duet 2 that have been modified to use an SBC connection.
                                            It will not work with a standard duet 2 ethernet or wifi.

                                            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

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