@gtj0
Thanks, I'll give it a go.
As a side note, I have noticed that naming the config file xyz.js (instead of xyz.json) makes no difference. Or at least it seems to make no difference.
Posts made by stuartofmt
-
RE: Possible Issue with v3.5.0-beta1
-
RE: Possible Issue with v3.5.0-beta1
@gtj0
Ah HA! Good to know about the polling.Is there a simple way to have some plain javascript executed as part of the config file? For example, I'd like to do something like this:
If (Array.isArray(state.sensors.probes[0])) { const myprobe = 0; } else if (Array.isArray(state.sensors.probes[0])) { const myprobe = 1 } else { const myprobe = "No Probe" } console.log("Probe Number is - " , myprobe)
and then later on use myprobe like this:
"field": "${state.sensors.probes[myprobe].value}"
-
RE: Possible Issue with v3.5.0-beta1
@gtj0
An update. The error was caused by me changing my default probe number from 0 to 1 and not updating the dueui configuration.Independently of that - its not clear why the error is being reported 6 times a second when the polling interval is set to 2000ms
-
RE: Clarifying BigTree Filament Sensor Connection.
@zBeeble said in Clarifying BigTree Filament Sensor Connection.:
@stuartofmt This, based on the filament position w.r.t. the header, agrees with what I have been referencing.
If I had V and GND swapped, would that kill the BigTree? What do you guys who understand the circuit diagram expect?
I did also try the e1stop --- no change there.
15 seconds into the video. Maybe.
-
RE: Clarifying BigTree Filament Sensor Connection.
Check your wiring, there are some incorrect and / or confusing diagrams on the internet. There actually may have been more than one build ..
https://www.youtube.com/watch?v=7xVRTtWErvoHere is what mine looks like (excuse the hot glue - long story involving a lost cable).
Red = V+
Space
White = Signal in
Black = Gnd -
Possible Issue with v3.5.0-beta1
I have not used Dueui for a while as I was busy upgrading etc ...
I'm currently using R3.5.0-rc.3 in SBC mode.Looking at the console log, I get the following error about 6 times per second from dueui-bundle.js:171. Dueui seems to respond,intermittently, with a delay. For example: home all seems to be ignored someties and not at other times. Is it stuck in a polling loop ?
Log: {timestamp: Wed Mar 13 2024 17:38:17 GMT-0600 (Mountain Daylight Time), severity: 'E', message: "Cannot read properties of null (reading 'value'): `${state.sensors.probes[0].value}`"} message : "Cannot read properties of null (reading 'value'): `${state.sensors.probes[0].value}`" severity : "E" timestamp : Wed Mar 13 2024 17:38:17 GMT-0600 (Mountain Daylight Time) [[Prototype]] : Object constructor : ƒ Date() getDate : ƒ getDate() getDay : ƒ getDay() getFullYear : ƒ getFullYear() getHours : ƒ getHours() getMilliseconds : ƒ getMilliseconds() getMinutes : ƒ getMinutes() getMonth : ƒ getMonth() getSeconds : ƒ getSeconds() getTime : ƒ getTime() getTimezoneOffset : ƒ getTimezoneOffset() getUTCDate : ƒ getUTCDate() getUTCDay : ƒ getUTCDay() getUTCFullYear : ƒ getUTCFullYear() getUTCHours : ƒ getUTCHours() getUTCMilliseconds : ƒ getUTCMilliseconds() getUTCMinutes : ƒ getUTCMinutes() getUTCMonth : ƒ getUTCMonth() getUTCSeconds : ƒ getUTCSeconds() getYear : ƒ getYear() setDate : ƒ setDate() setFullYear : ƒ setFullYear() setHours : ƒ setHours() setMilliseconds : ƒ setMilliseconds() setMinutes : ƒ setMinutes() setMonth : ƒ setMonth() setSeconds : ƒ setSeconds() setTime : ƒ setTime() setUTCDate : ƒ setUTCDate() setUTCFullYear : ƒ setUTCFullYear() setUTCHours : ƒ setUTCHours() setUTCMilliseconds : ƒ setUTCMilliseconds() setUTCMinutes : ƒ setUTCMinutes() setUTCMonth : ƒ setUTCMonth() setUTCSeconds : ƒ setUTCSeconds() setYear : ƒ setYear() toDateString : ƒ toDateString() toGMTString : ƒ toUTCString() toISOString : ƒ toISOString() toJSON : ƒ toJSON() toLocaleDateString : ƒ toLocaleDateString() toLocaleString : ƒ toLocaleString() toLocaleTimeString : ƒ toLocaleTimeString() toString : ƒ toString() toTimeString : ƒ toTimeString() toUTCString : ƒ toUTCString() valueOf : ƒ valueOf() Symbol(Symbol.toPrimitive) : ƒ [Symbol.toPrimitive]() [[Prototype]] : Object [[Prototype]] : Object constructor : ƒ Object() hasOwnProperty : ƒ hasOwnProperty() isPrototypeOf : ƒ isPrototypeOf() propertyIsEnumerable : ƒ propertyIsEnumerable() toLocaleString : ƒ toLocaleString() toString : ƒ toString() valueOf : ƒ valueOf() __defineGetter__ : ƒ __defineGetter__() __defineSetter__ : ƒ __defineSetter__() __lookupGetter__ : ƒ __lookupGetter__() __lookupSetter__ : ƒ __lookupSetter__() __proto__ : (...) get __proto__ : ƒ __proto__() set __proto__ : ƒ __proto__()
My dueui config file configuration is:
configFileSettings = { duet_host: "192.168.30.30", duet_password: "reprap", duet_poll_interval_1: 2000, duet_debug_polling_enabled: 0, dueui_settings_dont_send_gcode: 0, dueui_test_mode: 0, duet_polling_enabled: 1, theme_name: "Darkly" };
-
RE: HTTPS and TLS Support
Would providing VPN access to your internal network achieve your security aim?
If there are multiple printers involved, this may be simpler overall. -
RE: More than 12 fans
@Gamefanatic3D said in More than 12 fans:
@stuartofmt I am not familiar with what you are referring? Do you have a link?
just google "biqu hermit crab"
-
RE: More than 12 fans
Would a tool changer e.g. Hermit Crab, Xchange (are they still available?) suit your needs? One set of wiring and ports and let the software do the rest.
-
RE: PID Tuning Procedure
@CarlBosson said in PID Tuning Procedure:
@stuartofmt
Do I just copy and past the code
into a new Macro in the User interface?No, that would be a bad idea as the PID tuning parameters (in the first macro) depend a lot on your printer.
I offered up the macro as a way of assisting in understanding some of the parameters, assuming you may have been familiar with running macros.Can you descibe your machine ? From the config file it looks to have two different hotend heaters (H1 and H2) and a bed heater (H0) ? If so, how do you switch between the two different hotends?
Also - it looks like you may be running old versions of the firmware and DWC - can you comfirm by posting the output of M122
-
RE: PID Tuning Procedure
Not sure if this is useful for your situation, but here are two (related) macros that I put together. Basically, together, they create additional macro files that look something like this:
M307 H1 R2.673 K0.258:0.127 D9.248 E1.350 S0.80 B0 V24.16 M143 H1 S250
I then invoke the applicable macro depending on which tool I select as well as a separate macro for the bed,
; ; Macro to select PID target and parameters ; ;Invoke a PID tuning ;parameters A, B and C are mandatory ; A = "hot" if autotune hotend, A = "bed" if autotune Bed ; B = heater number (typically 0 for Bed) ; C = Target Tune Temp ; D = Tool number > 0 ; ; Optional Parameters ; E = Pwm - default is 0.8 ; F = Bed temp during hotend tuning - default is 20 deg C ; M291 R"Auto Pid Tuning" P"What to tune?" K{"Hotend","Bed","Cancel"} S4 if input = 0 var tool = state.currentTool if var.tool < 0 ; no tool selected M291 R"Auto Pid Tuning" P"What hotend?" K{"Direct(T0)","Bowden(T1)","Cancel"} S4 if input = 0 T0 elif input = 1 T1 else var msg = "Cannot run if no tool is selected" M117 {var.msg} abort {var.msg} if state.currentTool = 0 ; Tune Tool 0 to 250 deg using heater 1 with bed temp = 50 deg M98 P"0:/macros/PID_Tuning/PID_Tune.g" A"hot" B1 C240 D0 F50 elif state.currentTool = 1 ; Tune Tool 1 to 250 deg using heater 1 with bed temp = 50 deg M98 P"0:/macros/PID_Tuning/PID_Tune.g" A"hot" B1 C240 D1 F50 else abort "Invalid tool selected. Tool number "^state.currentTool elif input = 1 ; Tune Bed to 85 deg using heater 0 M98 P"0:/macros/PID_Tuning/PID_Tune.g" A"bed" B0 C85 D1 E1 else abort "Selection cancelled"
; ;Macro to perform the actual tuning and save results to another macro file ; ;Autotune heater and save the M307 settings to a macro file ; ;parameters A, B , C and D are mandatory ; A = "hot" if autotune hotend, A = "bed" if autotune Bed ; B = heater number (typically 0 for Bed) ; C = Target Tune Temp ; D = Tool number > 0 ; ; Optional Parameters ; E = Pwm - default is 0.8 ; F = Bed temp during hotend tuning - default is off ; G = ambient temp at start of autotune - default is 20 deg C ; ;Filename templates var hotfile = "0:/macros/PID_Tuning/PID_T" var bedfile = "0:/macros/PID_Tuning/PID_Bed.g" var file = "" ; Set some safe defaults var hotEnd = "hot" var tool = 0 var heater = 1 var tuneTemp = 0 var pwm = 0.8 ; optional var bedTemp = 0 ; optional - only used for Autotune Hotend var ambientTemp = 20 ; if exists(param.A) & exists(param.B) & exists(param.C) & exists(param.D) if param.A = "hot" | param.A = "bed" set var.hotEnd = param.A else abort "Invalid value for A parameter" set var.heater = param.B set var.tuneTemp = param.C set var.tool = param.D else abort "PID_Tune.g is missing mandatory parameters" if exists(param.E) set var.pwm = param.E if exists(param.F) set var.bedTemp = param.F if exists(param.H) set var.ambientTemp = param.H ; T{var.tool} ; reset temps and turn heaters off M568 S0 R0 A0 ; Reset temps and turn off hotend M140 S0 R0 ; Reset bed temps M140 S-273 ; Turn of bed heater ; G28 ; Home all - best if homing leaves the Hotend near the center of the bed ; if var.hotEnd = "hot" ; Performing Autotune on Hotend G0 Z1.5 ; Move Hotend close to bed echo "Heating bed to "^var.bedTemp^" deg" M190 S{var.bedTemp} ; wait for bed temp to stabilize M303 T{var.tool} P{var.pwm} A{var.ambientTemp} S{var.tuneTemp} else G0 Z25 ; give some clearance from the Hotend during Bed autotune. M303 H{var.heater} P{var.pwm} A{var.ambientTemp} S{var.tuneTemp} ; ; Wait until autotune complete while heat.heaters[{var.heater}].state = "tuning" G4 S10 ; ; Capture the tuned results var myR = heat.heaters[{var.heater}].model.heatingRate+0.001-0.001 var myK = heat.heaters[{var.heater}].model.coolingRate+0.001-0.001 var myF = heat.heaters[{var.heater}].model.fanCoolingRate+0.001-0.001 var myD = heat.heaters[{var.heater}].model.deadTime+0.001-0.001 var myE = heat.heaters[{var.heater}].model.coolingExp+0.001-0.001 var myS = heat.heaters[{var.heater}].model.maxPwm+0.01-0.01 var myB = 0 if !heat.heaters[{var.heater}].model.enabled set var.myB = 1 var myV = heat.heaters[{var.heater}].model.standardVoltage+0.01-0.01 ; ; Assemble the results var myPid = "M307 H"^var.heater^" R"^var.myR^" K"^var.myK^":"^var.myF^" D"^var.myD^" E"^var.myE^" S"^var.myS^" B"^var.myB^" V"^var.myV echo "New PID settings = "^var.myPid ;write out to file var maxTemp = "" if var.hotEnd = "hot" set var.file = var.hotfile^var.tool^".g" set var.maxTemp = "M143 H"^var.heater^" S"^{var.tuneTemp+10} ;Set max hotend temp else set var.file = var.bedfile set var.maxTemp = "M143 H"^var.heater^" S"^{var.tuneTemp+5} ;Set max bed temp echo "Saving to file "^var.file echo > var.file {var.myPid} echo >> var.file {var.maxTemp} ; ; reset temps and turn heaters off M568 S0 R0 A0 ; Reset temps and turn off hotend M140 S0 R0 ; Reset bed temps M140 S-273 ; Turn of bed heater ; G0 Z50
-
RE: issues installing on PI 3 B+
I do not mean to be rude, so please do not take it that way but:
The last few weeks started out because you jumped into the middle of an installation without reading the instructions.
https://github.com/stuartofmt/DuetLapse3/blob/main/Documents/Getting Started.md
In particular (1) trying to install on an unsupported release and (2) not following the pre-installation checks. As it turned out, the plugin version (the only version tested on 3.5 beta of the software) works, without change, on a standalone setup.
The weeks in between have been a mix of "jumping around" and, to be fair, wresting to get some of the 3rd party software libraries installed but again, this is covered in the installation instructions.
To be successful with this sort of software, you need to be methodical and avoid "spot reading". I have put a lot of time and effort into the documentation and appreciate feedback where it is unclea, outdated or requires editing. That way, together, we can make it better. What I cannot do is "read" it for you.
Please read through documentation, then if anything is unclear, report that and I can improve the documentation for everyone.
Answers below:
1-i copied the M3291 macro from the post you made if you have a link to download it from github please provide
Have a look in this document (its elsewhere as well but this will explain what M3291 is about)
https://github.com/stuartofmt/DuetLapse3/blob/main/Documents/Controlling with gcode.md2-so the normal operation is the cam will take let say 100 pic and at the end it will make a mp4 video , what setting in the duetlapse.config that ask for that ?
minivideo and max video ?The answer is in the documentation.
https://github.com/stuartofmt/DuetLapse3/blob/main/Documents/DuetLapse3.md3-am able to move the head and pause no issue but the camera takes the pic not while the head in pause or moved to the place i asked to be moved to its random so i wonder if am missing a setting in the config
The answer is in the documentation.
https://github.com/stuartofmt/DuetLapse3/blob/main/Documents/DuetLapse3.md-basedir /home/pi/DuetLapse
-duet 10.0.1.126
-port 8082
-seconds 30
-extratime 500
-minvideo 3
-maxvideo 30
-pause yes
-movehead 10 10
-weburl1 http://10.0.1.110/stream
-camera1 stream
-detect layer
-keepfiles -
RE: issues installing on PI 3 B+
@sankafola said in issues installing on PI 3 B+:
I didn’t know that I need to edit the M3291 I will check that out
One question is the editing of the M3291 will make the camera take the pic when the printer head is moved and paused or it’s another setting because I search for that part in the document but couldn’t find it
i only want it to take the pic while the printer head is moved to postion as in the config and paused
Thanks for your patience
You must not edit the M3291 macro. Just replace the version you made with the one in github. There is something wrong with your edited version (perhaps the name - perhaps something else)
To move the head to a given position before taking the picture - read the section about
-detect
-pause
and-movehead
.There is also an example in the useage examples documentation.
-
RE: issues installing on PI 3 B+
Again - please read the documentation.
There is nothing wrong.
2023-12-30 10:19:32,811 - makeVideo - Error: Camera1: Cannot create video shorter than 5 second(s).
Length would have been 3.6666666666666665 second(s).You have video min duration set to 5 seconds.
This is all explained in the documentation.
I suspect that you also did not replace your M3291 macro with my original (which would explain the errors about M3291 (they are being handled in the code and are not affecting anything).
-
RE: issues installing on PI 3 B+
To help I need some more information, usually the video will be created at the end of the print job (unless somehow you have told DuetLapse not to).
Using a small print job (say 5 minutes)
Please post (better as file attachments)
- your duetlapse config file
- the M3291 commands you are using (if any) - usuallly these will be in the "start print" "end print" of your slicer.
- The complete log file.
After several minutes (but before the end) of printing please capture:
A screenshot of the status tab
A screenshot of the video tab
A screenshot of the files tabAs a side note - it is best to start off with something simple until you get the hang of it. For exampe:
- you do not need to use M3291.
- from memory, I have included a simple test configuration / approach in the documentation.
-
RE: issues installing on PI 3 B+
Please read the instructions. Duetlapse will create a video for you.
The Duetlapse documentation describes options for moving the head out of the way before a picture is taken.
The same for M3291. It has many uses.
-
RE: issues installing on PI 3 B+
The first lot of “errors” are an artifact of scanning for available cameras. They are not true errors.
The disconnect messages are to do with connections being closed (e.g. browser window). Again, not true errors.
Enjoy! -
RE: issues installing on PI 3 B+
I’ve never tried it on the Mac.
Otherwise try it and see. Same potential issues with opencv. It worked fine in the past -
RE: issues installing on PI 3 B+
As a follow up. Go through the procedure described here
https://github.com/stuartofmt/Pi-Notes/blob/master/Resolution Testing.md
As an observation; getting camera setting that work is largely trial and error. Different combinations of computer, operating system, streaming software, camera type ( usb vs pi) , camera libraries etc
Finding working combination requires an approach that is methodical (one thing at a time), consistent (use only the appropriate commands for the type of camera). Jumping from one approach to the other creates false trails. Even for a camera that is working, not all the resolutions ( for example) that it reports as supported will necessarily work.
-
RE: issues installing on PI 3 B+
As I said a while back - I don’t have access to my test septup. This is too hard trying to do it remotely. I’ll pick it back up in the new year and we can try again. Happy New Year !