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

DuetLapse3

Scheduled Pinned Locked Moved
Third-party software
20
296
30.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
    stuartofmt
    last edited by stuartofmt 4 Jan 2023, 22:45 14 Jan 2021, 00:06

    This is a modified version of the original DuetLapse created by Danal Estes.
    We should all remember him for his generous work

    General Description

    DuetLapse3 provides a highly configurable program for creating timelapse videos from printers using the Deut3D software.
    It can be run as a one-of or continuously in the background.

    It is also available as an SBC plugin.

    A companion program startDuetLapse 3 provides administration capabilities and is especially useful if multiple instances of DuetLapse3 are running and connected to multiple printers. This is largely redundant due to continuous improvements in the DuetLapse3 UI and the ability to control DuetLapse3 with gcode instructions.

    Details of DuetLapse3 are in this document:

    DuetLapse3.md

    In addition to a browser interface DuetLapse3 can be controlled directly from gcode.

    Controlling with gcode.md

    Useage examples are in this document:

    DuetLapse3 Useage Examples.md

    Version 5.0.0

    [1] Completely revised UI
    [2] Added display of last captured image to UI
    [3] Added ability to specify a config file with -file option This avoids the need for long command lines. Options in command line over-write those in config file
    [4] Added -maxvideo. Limits the maximum length of video by varying fps as needed
    [5] Added ability to change -fps -minvideo and -maxvideo in the UI
    [6] UI gives indication of video creation status
    [7] Changed logfile name on startup
    [8] Sequential jobs are numbered
    [9] Misc bug fixes

    Version 5.1.0

    [1] Removed the use of M117 messages and replace with M291 messages as this gives much better control.
    [2] Set new default, minimum values for -seconds (20) and -poll (10) along with some logic changes to avoid an occassional race condition.
    [3] Fixed a code error associated with -extratime
    [4] Some minor bug UI / Typo fixes

    Version - 5.2.0

    [1] Fixed snapshot when called from gcode
    [2] Process all M291 messages without delay
    [3] Refactored loop control to prevent thread blocking
    [4] Prevent first layer capture if -pause yes
    [5] Added -password option to support passwords
    [6] Released as a plugin for SBC

    Code / Detailed Instructions / Documentation are here:

    Github

    The readme.md file contains the full version history

    Please post suggestions for improvement in this forum, not in the github. That way we get the wider, interested audience.

    undefined 1 Reply Last reply 14 Jan 2021, 01:43 Reply Quote 10
    • undefined
      JohnOCFII @stuartofmt
      last edited by 14 Jan 2021, 01:43

      @stuartofmt Excellent way to carry on Danal's work!

      1 Reply Last reply Reply Quote 2
      • undefined
        PCR
        last edited by PCR 14 Jan 2021, 09:21

        @stuartofmt

        wget https://github.com/stuartofmt/DuetLapse3/blob/main/DuetLapse3.py
        

        should be changed to

        wget https://github.com/stuartofmt/DuetLapse3/raw/main/DuetLapse3.py
        

        😉

        undefined 1 Reply Last reply 14 Jan 2021, 16:34 Reply Quote 0
        • undefined
          PCR
          last edited by 14 Jan 2021, 09:29

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • undefined
            PCR
            last edited by PCR 14 Jan 2021, 09:59

            @stuartofmt I am running the LPC SBC Port of RRF. But i can not connect to my Pi.
            here is my Object Model
            alt text

            192.168.140.126
            192.168.140.126 The printer at 192.168.140.126 did not respond
            192.168.140.126 Check the ip address or logical printer name is correct
            192.168.140.126 Duet software version must be at RRF3 or above and suppotr rr_model

            Best

            1 Reply Last reply Reply Quote 0
            • undefined
              jay_s_uk
              last edited by 14 Jan 2021, 10:20

              @stuartofmt
              The duet+SBC doesn't support the object model and uses machine/status instead.
              The DuetWebAPI handled both methods of obtaining information.

              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

              undefined 1 Reply Last reply 14 Jan 2021, 16:40 Reply Quote 0
              • undefined
                stuartofmt @PCR
                last edited by 14 Jan 2021, 16:34

                @PCR

                Instructions on wget for download fixed. Thanks!

                1 Reply Last reply Reply Quote 0
                • undefined
                  stuartofmt @jay_s_uk
                  last edited by 14 Jan 2021, 16:40

                  @jay_s_uk

                  Let me take a look at the SBC situation (which I do not own). I was under the impression that /machine/status was replaced (to be?) by rr_model as the preferred method.

                  It may take me a few of days to figure out.

                  undefined 1 Reply Last reply 14 Jan 2021, 16:44 Reply Quote 0
                  • undefined
                    jay_s_uk @stuartofmt
                    last edited by 14 Jan 2021, 16:44

                    @stuartofmt its the other way round.
                    rr_model is replaced by machine/status in SBC situations

                    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

                    undefined 1 Reply Last reply 14 Jan 2021, 17:11 Reply Quote 0
                    • undefined
                      stuartofmt @jay_s_uk
                      last edited by 14 Jan 2021, 17:11

                      @jay_s_uk

                      OK - thx. It's not difficult but I will need some help testing.

                      undefined 1 Reply Last reply 14 Jan 2021, 17:12 Reply Quote 0
                      • undefined
                        jay_s_uk @stuartofmt
                        last edited by 14 Jan 2021, 17:12

                        @stuartofmt
                        i can provide a current 3.2 output from machine/status if needed.
                        i'm sure @PCR would do some testing for you

                        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

                        undefined 1 Reply Last reply 14 Jan 2021, 17:23 Reply Quote 1
                        • undefined
                          stuartofmt @jay_s_uk
                          last edited by 14 Jan 2021, 17:23

                          @jay_s_uk

                          That would be very helpful (much better than closing my eyes and imagining) - thanks!

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            jay_s_uk
                            last edited by 14 Jan 2021, 17:44

                            {"boards":[{"bootloaderFileName":null,"canAddress":0,"directDisplay":null,"firmwareDate":"2021-01-05","firmwareFileName":"Duet3Firmware_Mini5plus.uf2","firmwareName":"RepRapFirmware for Duet 3 Mini 5\u002B","firmwareVersion":"3.2","iapFileNameSBC":"Duet3_SBCiap32_Mini5plus.bin","iapFileNameSD":"Duet3_SDiap32_Mini5plus.bin","maxHeaters":32,"maxMotors":7,"mcuTemp":{"current":-273.15,"min":-273.15,"max":-273.15},"name":"Duet 3 Mini 5\u002B","shortName":"Mini5plus","state":"unknown","supports12864":true,"supportsDirectDisplay":true,"uniqueId":"P2P4H-PA67A-G65J0-40TFU-L2D0Z-ZTS4L","v12":{"current":0,"min":0,"max":0},"vIn":{"current":12.3,"min":0,"max":12.3}}],"directories":{"filaments":"0:/filaments/","firmware":"0:/sys/","gCodes":"0:/gcodes/","macros":"0:/macros/","menu":"0:/menu/","scans":"0:/scans/","system":"0:/sys/","web":"0:/www/"},"fans":[{"actualValue":0,"blip":0.1,"frequency":0,"max":1,"min":0.1,"name":"","requestedValue":0,"rpm":-1,"thermostatic":{"heaters":[],"highTemperature":null,"lowTemperature":null}},{"actualValue":0,"blip":0.1,"frequency":0,"max":1,"min":0.1,"name":"","requestedValue":1,"rpm":-1,"thermostatic":{"heaters":[1],"highTemperature":45,"lowTemperature":45}}],"heat":{"bedHeaters":[0,-1],"chamberHeaters":[-1,-1],"coldExtrudeTemperature":160,"coldRetractTemperature":90,"heaters":[{"active":0,"current":15.4,"max":120,"min":-273.1,"model":{"deadTime":2.2,"enabled":true,"gain":114,"heatingRate":0.219,"inverted":false,"maxPwm":1,"pid":{"overridden":false,"p":1.5,"i":0.1,"d":2.2,"used":true},"standardVoltage":12.2,"timeConstant":520.5,"timeConstantFansOn":520.5},"monitors":[{"action":0,"condition":"tooHigh","limit":120},{"action":null,"condition":"disabled","limit":null},{"action":null,"condition":"disabled","limit":null}],"name":null,"sensor":0,"standby":0,"state":"off"},{"active":0,"current":15.9,"max":285,"min":-273.1,"model":{"deadTime":7,"enabled":true,"gain":407.9,"heatingRate":2.343,"inverted":false,"maxPwm":1,"pid":{"overridden":false,"p":0,"i":0,"d":0.2,"used":true},"standardVoltage":12.2,"timeConstant":174.1,"timeConstantFansOn":152.7},"monitors":[{"action":0,"condition":"tooHigh","limit":285},{"action":null,"condition":"disabled","limit":null},{"action":null,"condition":"disabled","limit":null}],"name":null,"sensor":1,"standby":0,"state":"active"}]},"httpEndpoints":[],"inputs":[{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"HTTP","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"Marlin","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"Telnet","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"File","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"Marlin","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"USB","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"Aux","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":true,"name":"Trigger","stackDepth":1,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"Queue","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"LCD","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"SBC","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"Daemon","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"Aux2","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50,"inMacro":false,"name":"Autopause","stackDepth":0,"state":"idle","lineNumber":0,"volumetric":false}],"job":{"build":null,"duration":null,"file":{"filament":[],"fileName":null,"firstLayerHeight":0,"generatedBy":null,"height":0,"lastModified":null,"layerHeight":0,"numLayers":0,"printTime":null,"simulatedTime":null,"size":0,"thumbnails":[]},"filePosition":0,"firstLayerDuration":null,"lastDuration":0,"lastFileName":null,"lastFileAborted":false,"lastFileCancelled":false,"lastFileSimulated":false,"layer":null,"layerTime":null,"layers":[],"timesLeft":{"filament":null,"file":null,"layer":null},"warmUpDuration":null},"limits":{"axes":8,"axesPlusExtruders":8,"bedHeaters":2,"boards":5,"chamberHeaters":2,"drivers":14,"driversPerAxis":4,"extruders":5,"extrudersPerTool":5,"fans":16,"gpInPorts":16,"gpOutPorts":32,"heaters":32,"heatersPerTool":2,"monitorsPerHeater":3,"restorePoints":6,"sensors":56,"spindles":2,"tools":50,"trackedObjects":32,"triggers":16,"volumes":2,"workplaces":9,"zProbeProgramBytes":8,"zProbes":4},"messages":[],"move":{"axes":[{"acceleration":1000,"babystep":0,"current":1200,"drivers":["0.4"],"homed":false,"jerk":1000,"letter":"X","machinePosition":0,"max":270,"maxProbed":false,"microstepping":{"interpolated":true,"value":16},"min":0,"minProbed":false,"speed":6000,"stepsPerMm":100,"userPosition":0,"visible":true,"workplaceOffsets":[0,0,0,0,0,0,0,0,0]},{"acceleration":1000,"babystep":0,"current":1200,"drivers":["0.3"],"homed":false,"jerk":1000,"letter":"Y","machinePosition":0,"max":260,"maxProbed":false,"microstepping":{"interpolated":true,"value":16},"min":0,"minProbed":false,"speed":6000,"stepsPerMm":100,"userPosition":0,"visible":true,"workplaceOffsets":[0,0,0,0,0,0,0,0,0]},{"acceleration":200,"babystep":0,"current":1200,"drivers":["0.1","0.2"],"homed":false,"jerk":200,"letter":"Z","machinePosition":0,"max":350,"maxProbed":false,"microstepping":{"interpolated":true,"value":16},"min":0,"minProbed":false,"speed":300,"stepsPerMm":400,"userPosition":0,"visible":true,"workplaceOffsets":[0,0,0,0,0,0,0,0,0]}],"calibration":{"final":{"deviation":0,"mean":0},"initial":{"deviation":0,"mean":0},"numFactors":0},"compensation":{"fadeHeight":null,"file":null,"meshDeviation":null,"probeGrid":{"xMin":15,"xMax":230,"xSpacing":20,"yMin":15,"yMax":230,"ySpacing":20,"radius":-1},"skew":{"compensateXY":true,"tanXY":0,"tanXZ":0,"tanYZ":0},"type":"none"},"currentMove":{"acceleration":0,"deceleration":0,"laserPwm":null,"requestedSpeed":0,"topSpeed":0},"daa":{"enabled":false,"minimumAcceleration":10,"period":0},"extruders":[{"acceleration":250,"current":1000,"driver":"0.0","filament":"","factor":1,"jerk":120,"microstepping":{"interpolated":true,"value":16},"nonlinear":{"a":0,"b":0,"upperLimit":0.2},"position":0,"pressureAdvance":0,"rawPosition":0,"speed":1200,"stepsPerMm":837}],"idle":{"timeout":30,"factor":0.3},"kinematics":{"forwardMatrix":[[1,0,0],[0,1,0],[0,0,1]],"inverseMatrix":[[1,0,0],[0,1,0],[0,0,1]],"tiltCorrection":{"correctionFactor":1,"lastCorrections":[0,0],"maxCorrection":10,"screwPitch":0.5,"screwX":[-130,400],"screwY":[150,150]},"name":"cartesian"},"printingAcceleration":10000,"speedFactor":1,"travelAcceleration":10000,"virtualEPos":0,"workplaceNumber":0,"workspaceNumber":1},"network":{"corsSite":null,"hostname":"duet3","interfaces":[{"activeProtocols":[],"actualIP":"192.168.1.31","configuredIP":"192.168.1.31","firmwareVersion":null,"gateway":"192.168.1.1","mac":"B8:27:EB:C9:9C:1A","numReconnects":null,"signal":null,"speed":null,"subnet":"255.255.255.0","type":"wifi"}],"name":"duet3"},"plugins":[{"dwcFiles":["GCodeViewer.10bd9549.js","GCodeViewer.88004336.css"],"sbcFiles":[],"rrfFiles":[],"pid":-1,"name":"GCodeViewer","author":"Juan Rosario","version":"0.11.1","license":"LGPL-3.0-or-later","sourceRepository":null,"dwcVersion":"3.2.0-beta4","dwcDependencies":[],"dwcWebpackChunk":"GCodeViewer","sbcRequired":false,"sbcDsfVersion":null,"sbcData":{},"sbcExecutable":null,"sbcExecutableArguments":null,"sbcOutputRedirected":true,"sbcPermissions":[],"sbcPackageDependencies":[],"sbcPluginDependencies":[],"rrfVersion":null}],"scanner":{"progress":0,"status":"D"},"sensors":{"analog":[{"lastReading":15.4,"name":"","type":"thermistor"},{"lastReading":15.9,"name":"","type":"thermistor"}],"endstops":[{"triggered":false,"type":"inputPin","probeNumber":null},{"triggered":false,"type":"inputPin","probeNumber":null},null],"filamentMonitors":[],"gpIn":[],"probes":[{"calibrationTemperature":25,"deployedByUser":false,"disablesHeaters":false,"diveHeight":2,"lastStopHeight":0,"maxProbeCount":5,"offsets":[-27.3,3.5],"recoveryTime":0,"speed":2,"temperatureCoefficient":0,"temperatureCoefficients":[0,0],"threshold":1000,"tolerance":0.02,"travelSpeed":333.3,"triggerHeight":3.553,"type":1,"value":[671]}]},"spindles":[{"active":0,"current":0,"frequency":0,"min":60,"max":10000,"tool":-1},{"active":0,"current":0,"frequency":0,"min":60,"max":10000,"tool":-1}],"state":{"atxPower":null,"beep":null,"currentTool":0,"displayMessage":"","dsfVersion":"3.2.0","gpOut":[{"pwm":0}],"laserPwm":null,"logFile":null,"logLevel":"off","messageBox":null,"machineMode":"FFF","msUpTime":503,"nextTool":0,"powerFailScript":"","previousTool":-1,"restorePoints":[{"coords":[0,0,0],"extruderPos":0,"feedRate":50,"ioBits":0,"laserPwm":null,"spindleSpeeds":[0,0],"toolNumber":-1},{"coords":[0,0,0],"extruderPos":0,"feedRate":50,"ioBits":0,"laserPwm":null,"spindleSpeeds":[0,0],"toolNumber":-1},{"coords":[0,0,0],"extruderPos":0,"feedRate":50,"ioBits":0,"laserPwm":null,"spindleSpeeds":[0,0],"toolNumber":-1},{"coords":[0,0,0],"extruderPos":0,"feedRate":50,"ioBits":0,"laserPwm":null,"spindleSpeeds":[0,0],"toolNumber":-1},{"coords":[0,0,0],"extruderPos":0,"feedRate":50,"ioBits":0,"laserPwm":null,"spindleSpeeds":[0,0],"toolNumber":-1},{"coords":[0,0,0],"extruderPos":0,"feedRate":50,"ioBits":0,"laserPwm":null,"spindleSpeeds":[0,0],"toolNumber":-1}],"status":"idle","time":"2021-01-14T17:44:25","upTime":363424},"tools":[{"active":[0],"axes":[[0],[1]],"extruders":[0],"fans":[0],"filamentExtruder":0,"heaters":[1],"mix":[1],"name":"","number":0,"offsets":[0,0,0],"offsetsProbed":0,"retraction":{"extraRestart":0,"length":5,"speed":40,"unretractSpeed":40,"zHop":0.5},"standby":[0],"state":"active"}],"userSessions":[],"userVariables":[],"volumes":[{"capacity":29077254144,"freeSpace":20587024384,"mounted":true,"name":null,"openFiles":null,"path":"/","speed":null},{"capacity":2143281152,"freeSpace":2028986368,"mounted":true,"name":null,"openFiles":null,"path":"/boot","speed":null}]}

                            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

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              stuartofmt
                              last edited by stuartofmt 14 Jan 2021, 21:18

                              Could someone please try this? It's a test script for the SBC calls. It's read only with the exception of a M117 'Test of SBC' which should show up in DWC.

                              Once its placed in a directory permissions will need to be changed.

                              chmod +x ./SBCTEST.py
                              

                              it can then be run with the following command

                              python3 ./SBCTEST.py -duet <ipaddress of your SBC printer>

                              with a bit of luck it will report success, in any case - if the resultant SBCTEST.log file can be posted back, that would be a great help.

                              I've tested it on my non SBC duet - there may be some syntax errors in the unexercised code - but I hope not 🙂
                              If there are then a screen shot would be helpful.

                              [SBCTEST.py]

                              undefined 1 Reply Last reply 14 Jan 2021, 21:43 Reply Quote 0
                              • undefined
                                PCR
                                last edited by 14 Jan 2021, 21:28

                                Can do it tomorrow! Thank you

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  jay_s_uk @stuartofmt
                                  last edited by jay_s_uk 14 Jan 2021, 21:43

                                  @stuartofmt said in DuetLapse3:

                                  python3 ./SBCTEST.py -duet <ipaddress of your SBC printer>

                                  localhost Determine API Version
                                  localhost Testing: rr_model at address localhost
                                  localhost http://localhost/rr_model?key=boards
                                  localhost
                                  localhost Testing: /machine/system at address localhost
                                  localhost http://localhost/machine/status
                                  localhost
                                  localhost API model is: machine Version is: 3
                                  localhost Status is :idle
                                  localhost Layer is :0
                                  Traceback (most recent call last):
                                  File "./SBCTEST.py", line 147, in <module>
                                  logger.info('Send Gcode result: '+sendDuetGcode(apiModel, 'M117 Test of SBC'))
                                  File "./SBCTEST.py", line 122, in sendDuetGcode
                                  r = requests.get.post(URL, data=command)
                                  AttributeError: 'function' object has no attribute 'post'

                                  Nothing is displayed on DWC

                                  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

                                  undefined 1 Reply Last reply 14 Jan 2021, 22:26 Reply Quote 0
                                  • undefined
                                    stuartofmt @jay_s_uk
                                    last edited by stuartofmt 14 Jan 2021, 22:26

                                    @jay_s_uk

                                    Aghhhh - A definite typo ... Try this please.
                                    The rest looks good.

                                    [SBCTEST.py]

                                    undefined 1 Reply Last reply 15 Jan 2021, 07:29 Reply Quote 0
                                    • undefined
                                      PCR @stuartofmt
                                      last edited by 15 Jan 2021, 07:29

                                      @stuartofmt

                                      192.168.140.126 Determine API Version
                                      192.168.140.126 Testing: rr_model at address 192.168.140.126
                                      192.168.140.126 http://192.168.140.126/rr_model?key=boards
                                      192.168.140.126
                                      192.168.140.126 Testing: /machine/system at address 192.168.140.126
                                      192.168.140.126 http://192.168.140.126/machine/status
                                      192.168.140.126
                                      192.168.140.126 API model is: machine Version is: 3
                                      192.168.140.126 Status is :processing
                                      192.168.140.126 Layer is :0
                                      --- Logging error ---
                                      Traceback (most recent call last):
                                      File "/usr/lib/python3.7/logging/__init__.py", line 1034, in emit
                                      msg = self.format(record)
                                      File "/usr/lib/python3.7/logging/__init__.py", line 880, in format
                                      return fmt.format(record)
                                      File "/usr/lib/python3.7/logging/__init__.py", line 619, in format
                                      record.message = record.getMessage()
                                      File "/usr/lib/python3.7/logging/__init__.py", line 380, in getMessage
                                      msg = msg % self.args
                                      TypeError: not all arguments converted during string formatting
                                      Call stack:
                                      File "./sbctest.py", line 147, in <module>
                                      logger.info('Send Gcode result: '+sendDuetGcode(apiModel, 'M117 Test of SBC'))
                                      File "./sbctest.py", line 127, in sendDuetGcode
                                      logger.info("gCode command return code = ",r.status_code)
                                      Message: 'gCode command return code = '
                                      Arguments: (405,)
                                      --- Logging error ---
                                      Traceback (most recent call last):
                                      File "/usr/lib/python3.7/logging/__init__.py", line 1034, in emit
                                      msg = self.format(record)
                                      File "/usr/lib/python3.7/logging/__init__.py", line 880, in format
                                      return fmt.format(record)
                                      File "/usr/lib/python3.7/logging/__init__.py", line 619, in format
                                      record.message = record.getMessage()
                                      File "/usr/lib/python3.7/logging/__init__.py", line 380, in getMessage
                                      msg = msg % self.args
                                      TypeError: not all arguments converted during string formatting
                                      Call stack:
                                      File "./sbctest.py", line 147, in <module>
                                      logger.info('Send Gcode result: '+sendDuetGcode(apiModel, 'M117 Test of SBC'))
                                      File "./sbctest.py", line 127, in sendDuetGcode
                                      logger.info("gCode command return code = ",r.status_code)
                                      Message: 'gCode command return code = '
                                      Arguments: (405,)
                                      192.168.140.126 Method Not Allowed
                                      Traceback (most recent call last):
                                      File "./sbctest.py", line 147, in <module>
                                      logger.info('Send Gcode result: '+sendDuetGcode(apiModel, 'M117 Test of SBC'))
                                      TypeError: can only concatenate str (not "int") to str
                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        stuartofmt
                                        last edited by stuartofmt 15 Jan 2021, 17:37

                                        @PCR @jay_s_uk

                                        Thanks - there was a silly formatting error (now fixed) but underlying that it looks like there was an http 405 error returned.

                                        I've added a two more version of the send gcode function to try - hopefully one of them works. Unfortunately the documentation and other examples (which purport to work) are somewhat vague on this aspect ....

                                        ALSO - if you are running RRF3.2 the default behavior for CORS seems to have changed. With another program I am using (DueUI) - I had to add the following to config.sys (up front in the network section) - after the upgrade. BUT DuetLapse was unaffected. It MAY be different on SBC.

                                        I'd suggest first trying "as is" but if this script still does not work with one of the methods (depending on what the errors are) - the CORS thing may need to be looked into.

                                        M586 C"*" ;enable CORS

                                        New Test Script is here

                                        [SBCTEST.py]

                                        1 Reply Last reply Reply Quote 0
                                        • fractalengineerundefined
                                          fractalengineer
                                          last edited by 15 Jan 2021, 18:44

                                          Awesome Stuart, thanks for carrying on Danal's work

                                          Looks well documented too, I'll give it a shot over the weekend.

                                          Very neat of you to handle issues outside of your own setup too

                                          Do you think in it's current state this could realistically be implemented as a plugin in DWC for a possible GUI?

                                          Railcore II ZL

                                          undefined 1 Reply Last reply 15 Jan 2021, 18:49 Reply Quote 2
                                          10 out of 296
                                          • First post
                                            10/296
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA