OK, that works, but only in the sense that the server comes up with the new control installed, as shown in the screenshot below. However, the printer's M109 command is never sent, and the temperature never moves off ambient.
I thought it might be because no extruder had been specified. So I sent the temperature change command M109 T0 S222 using the terminal SEND facility, and this did, in fact, move the T0 extruder temperature.
You didn't mention that was the necessary command. Appears you need to tell your printer what hot end to use, so you need to make sure that is the command that is getting sent.
Hmm, still no go. The controls show up properly, but the command never shows up in the terminal, and the temperature plot never changes. However, if I send ' M109 T0 S220 from the terminal, it immediately takes effect.
I was able to compare the 'Set Temperature' command layout with an identical (but working) section for 'Set Fan Speed'
AFAICT, the two sections are absolutely identical, except for the lowercase 's' following the closing paren on the command: line! When I changed M109 T0 S%(temp) to M109 T0 S%(temp)s, it all started working.
Looking at the Octoprint docs for custom controls here, the trailing lowercase s appears after every parameterized command. Is there any reference that explicitly explains this requirement?
my bad, that is what I missed. There was a link on the docs I think to the python format syntax that it's using, but I think s is probably all you will need because that's what technically you are sending via gcode.
Yes, it works fine for me now with the 's' appended, but it is a bit frustrating to have to learn three new languages (Gcode, YAML, Python) to get just one small thing done ;-).
Thanks for all your help - I would still be swimming upstream and getting nowhere without your input.
So I have been progressing along the learning curve for my MakerGear M3-ID custom control development, and I now see there are some very significant differences between the YAML syntax used by the Octoprint on the M3-ID and the YAML syntax shown in the Octoprint.org docs.
Parameterized commands require a trailing 's' in order to be actually sent to the printer. This doesn't show up at all in the docs.
the order of the lines comprising a command section appears to be reversed from the docs: For instance, this is an example command section from the docs:
- name: Example for multiple commands
children:
- name: Move X (static)
confirm: You are about to move the X axis right by 10mm with 3000mm/s.
commands:
- G91
- G1 X10 F3000
- G90
- name: Move X (parametric)
commands:
- G91
- G1 X%(distance)s F%(speed)s
- G90
input:
- default: 10
name: Distance
parameter: distance
- default: 3000
name: Speed
parameter: speed
And this is the arrangement that actually works on the M3-ID:
This seems so wildly different as to completely invalidate the Octoprint.org docs as development examples, but yet that's all I have to go by (other than some miscellaneous posts on the M3-ID forum). Is there something I'm missing here, or is it really this different across printer implementations?
This example has a space indentation issue. Is this a direct copy/paste from the docs? It should be the following I think.
- name: Example for multiple commands
children:
- name: Move X (static)
confirm: You are about to move the X axis right by 10mm with 3000mm/s.
commands:
- G91
- G1 X10 F3000
- G90
- name: Move X (parametric)
commands:
- G91
- G1 X%(distance)s F%(speed)s
- G90
input:
- default: 10
name: Distance
parameter: distance
- default: 3000
name: Speed
parameter: speed