Skip to content

Upgrade

George Joseph edited this page Apr 5, 2021 · 6 revisions

Please read these notes carefully!

3.2.5

  • This was true for the DueUI 3.2.0 release but I'm going to reiterate...You MUST be running a Duet board or Duet Software Framework installation at release 3.1.0 or higher. There were simply too many object model differences between DSF and Standalone installations and I couldn't keep up with them.
  • If you stored your DueUI settings in your dueui_config.json file, the syntax has changed slightly. Instead of declaring the settings as a class class DueUISettings {, they're now declared as an object: configFileSettings = {. See the new default config for exact syntax. Other than this change, a configuration that worked in the previous version should still work as long as it was compatible with RRF 3.1
  • The theme setting has been replaced by theme_name and theme_path. If you want to use one of the standard themes, you can just specify its name in theme_name and don't specify theme_path. For instance theme_path: "Darkly". If you want to use an external bootstrap theme, you can provide the full URL to the css file in theme_path.
  • I'm no longer going to host a DueUI installation at dueui.org. It's just too much trouble to maintain.

3.2.0

Historically, the way to get status information from a Duet board has been to use the rr_status CGI call with various "types" to retrieve a JSON document. RRF 3 and the Duet Software Framework (DSF) however, introduced the concept of a "machine model" which is a complete picture of the state of the printer.

The advantage of the model is that it's the same model whether you get it directly from the Duet board with the new rr_model CGI call or from the DSF with /machine/status REST call. The downside is that it's not compatible with the responses retrieved with rr_status so if you used Standalone mode in previous versions of DueUI, the variable references you have in your dueui_config.json file will no longer work.

To change your variable names, refer to the complete model example in State RRF 3.1 Standalone

3.0.2

Changes

There are no more defaults!

Because of the differences between combinations of devices, RepRapFirmware versions, and the use of the Duet Software Framework, it's no longer possible for me to code defaults for certain widgets. Check the wiki page for each widget to see any changes you might need.

In Settings, you must select Backend Type

You have to select DSF or Non-DSF to indicate whether you're running a Single Board Computer(SBC) with the Duet Software Framework(DSF) running on it, or are connecting directly to a Duet device.

The basic format of the config file has changed.

The format of the file has changed from a JSONP response format to a standard Javascript Class. To make the config parseable you have to make a few simple changes.

// The first line is now a class declaration
class DueUIConfig {

// Remove the double quotes around the top level
// element names and replace the ":" with an "="
	dueui_content = {
		"id": "dueui",
		"type": "tabbed_panel",
		
		/* All content goes here */
// Replace the ',' at the end of the dueui_config
// section with a ';'		
	};

// Same for status_map	
	status_map = {
		/* Map of status codes to display names */
	};
// End with just a single '}' instead of '})'	
}

The content of the dueui_content and status_map objects requires no further reformatting.
Read the Configuration Overview page for more information.

The machine state (status) has been renamed to "state"

For instance, ${status.params.atxPower} must change to ${state.params.atxPower}. You should be able to do a global replace of "status." to "state.".

Widget style and actions based on state have been changed

Old

"state": {
	"field": "${status.params.atxPower}",
	"classes": [
		"btn btn-danger",
		"btn btn-success"
	]
},
"actions_type": "state",
"actions": [
	[
		{"type": "gcode", "gcode": "M80", "label": "Power ON"},
		{"type": "log", "severity": "I", "value": "Power ON"}
	],
	[
		{"type": "gcode", "gcode": "M81", "label": "Power OFF"},
		{"type": "log", "severity": "I", "value": "Power OFF"}
	]
]

New

"state": {
	"states": [
		{ "state": false, "classes": "btn-danger", "value": "ATX is<br>Off",
			"actions": {"type": "gcode", "gcode": "M80", "message": "Power ON"}
		},
		{ "state": true, "classes": "btn-success", "value": "ATX is<br>On",
			"actions": {"type": "gcode", "gcode": "M81", "message": "Power OFF"}
		}
	],
	"field": "${state.state.atxPower}"
},

You'll notice that the state related actions are now combined into the state object.

Actions have been rearranged slightly

Old

"actions_type": "choose",
"actions": [
	{"type": "gcode", "gcode": "M666 Something", "label": "Send M666" },
	{"type": "gcode", "gcode": "M666 Something Else", "label": "Send M666 Else" },
]

New

"actions_chooser": [
	{"type": "gcode", "gcode": "M666 Something", "label": "Send M666" },
	{"type": "gcode", "gcode": "M666 Something Else", "label": "Send M666 Else" },
],

Nothing complicated.

Problems?

Check the wiki page for the widget you're having issue with.

Clone this wiki locally