G-Code to send a message over network



  • 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



  • 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



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



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


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



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



  • 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


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.