Navigation

    Duet3D Logo

    Duet3D

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

    G-Code to send a message over network

    General Discussion
    3
    7
    892
    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.
    • Maut
      Maut last edited by

      Hi,

      Is there a G-Code command that can send a message over the network? I want to put a command in my gcode to start a timelapse on a pi+camera on my network.

      Thanks,
      Roi

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

        There is M118, but I think it is still in development and should be available in one of the next release candidates for 1.21, AFAIK.
        https://duet3d.dozuki.com/Wiki/Gcode#Section_M118_Send_Message_to_Specific_Target

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

          Network is the right way to do this… and, until that is working, an output pin on the Duet hardwired to an input pin on the Pi, and some well documented setup on both, and this could potentially work sooner...

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

            For example, per the documentation, on a duet WiFi board, and the labels on the expansion connector:

            [[language]]
            Logical pin	Signal name	Expansion connector label	Expansion connector pin number
            60		CS5		CS5				50
            61		CS6		E3_STOP				9
            62		CS7		E4_STOP				14
            63		CS8		E5_STOP				19
            
            

            Therefore,

            [[language]]
            M42 P60 S0
            M42 P60 S255
            
            ```Should toggle expansion connector ping 50 to logic 0 and logic 1, respectively.
            1 Reply Last reply Reply Quote 0
            • Danal
              Danal last edited by

              On the Pi side, there are a couple of Octoprint plugins that read GPIO input and do something… but... not anything that directly "starts a timelapse capture".

              One example of a plugin that reads GPIO and does something (pauses a print job) is "FilamentSensorReloaded". This is a very short plugin, and could be easily adapted, if there were timelapse interfaces. By the way, there are all kinds of interface calls in Octoprint documentation for dealing with rendered and un-rendered timelapse files, etc, etc. Just not one for STARTING a capture. It appears this is only possible by "Starting a Job", which is much more than we want.

              Therefore, I'd suggest posting a question in Octoprint forums, the question being "What is the API call to start a video capture that later becomes a timelapse?" or similar.

              Once that is clear, stringing this all together looks pretty simple.

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

                I decided to open a feature request (because I want this as well):

                https://github.com/foosel/OctoPrint/issues/2450

                Other who want this, please either add supporting comments on Github, and/or open discussions of this on various Octoprint forums and groups.

                DanalEstes created this issue in foosel/OctoPrint

                closed [Request] API call to start timelapse separate from Start Job #2450

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

                  FYI: I created a tool to take timelapse snapshots on every layer change: https://forum.duet3d.com/topic/6058/timelapse-pictures-videos-with-duet-and-webcam-on-layer-change

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