-
Notifications
You must be signed in to change notification settings - Fork 0
Add Edit Button
Minty Trebor edited this page Jul 11, 2022
·
12 revisions
Buttons can trigger one of 5 types of action on click.
- Send a gcode command to the Duet board.
- Run a gcode Macro from the default macro folder
- Send a simple http request (stateless)
- Send an MQTT message* (stateless)
- Open a URL in a pop-up window
The add/edit Button window is detailed below:
Buttons have the following standard settings:
- Button Type: gcode, Macro, http, MQTT*, Window
- Button Label: (optional) Text to display in button
- Hover Text: (optional) text to display when cursor hovers over the button - useful for additional info about the button
- Icon: (optional) icon to display in button
- Enabled In Job: Allow button to be clicked whilst a job is running.
- Colour: Choose a colour for your button.
In addition the following settings are available depending on the button type:
gcode:
- gcode command: (required) the gcode command to run on click of button
Macro:
- Macro Name: (required) the file name of the macro in the default macro folder. Must end in
.g
egMacroname.g
http:
- URL: (required) the url for the request. (full url is required), further parameters will be displayed as required.
- Post Data: Data to send with Post. Must be in JSON format (eg:
{"keyname": "string"}
or{"keyname": number}
or{"keyname": boolean}
- Post Data: Data to send with Post. Must be in JSON format (eg:
- Show Popup window with results
MQTT*:
- MQTT MSG: (required) text of the message to send
- MQTT Topic: (required) topic to send the message to
Window:
- Pop-Up URL: URL to open in a popup window
- Window Height
- Window Width
Please see Using Object Model Values, if you wish to inlcude data from the object model with HTTP or MQTT buttons.