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

[HELP] How to use DueUI without a Duet using chrome

Scheduled Pinned Locked Moved
DueUI
3
73
3.3k
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
    gtj0 @Dario02
    last edited by 10 May 2020, 15:41

    @Dario02
    dueui_config_simple.json

    undefined 1 Reply Last reply 10 May 2020, 18:38 Reply Quote 1
    • undefined
      Dario02 @gtj0
      last edited by 10 May 2020, 18:38

      @gtj0 i'll check it soon, thank you for the support. I know I'm making lots of questions

      1 Reply Last reply Reply Quote 0
      • undefined
        Dario02
        last edited by 14 May 2020, 16:41

        @gtj0 Hi, I noticed that you must name some variables as the system would expect... for example I can't name the "header_panel" as "main_header_panel" and the first id must be "dueui". I would like to know where I could find the variables names ("header_panel", "menubar" etc... and some predefined IDs..)

        undefined 1 Reply Last reply 15 May 2020, 00:57 Reply Quote 0
        • undefined
          gtj0 @Dario02
          last edited by 15 May 2020, 00:57

          @Dario02 header_panel and menubar are fixed because that's what the class DueuiTabbedPanel in dueui_panel.js expects them to be. You can't change them and there's no reason to change them. What you put in those variables has id fields and that's how you refer to them. For instance...

          /* This has to be "dueui_content" because that's what the code expects. */
          dueui_content = {
          /*
          * But the value of "id" can be anything you want.
          * This is how you'd refer to the element using jQuery... #my_top_tabbed_panel
          */
          "id": "my_top_tabbed_panel",
          "type": "tabbed_panel",
          /* Same here. This has to be "header_panel" because the code expects it. */
          "header_panel": {
          /* But you can set its id to anything you want and reference it as #<id>. */
          "id": "main_header_panel",
          "type": "panel",
          },
          /* Same again. This has to be "menubar" because the code expects it. */
          "menubar": {
          /* But you can set its id to anything you want and reference it as #<id>. */
          "id": "main_dueui_menubar",
          "type": "panel",
          "button_defaults": {
          "style": {
          "margin-right": "5px"
          }
          }
          },
          }
          undefined 1 Reply Last reply 15 May 2020, 17:41 Reply Quote 0
          • undefined
            Dario02 @gtj0
            last edited by 15 May 2020, 17:41

            @gtj0 Are there others fixed defintion that I should know? If yes where can I find them?

            undefined 1 Reply Last reply 15 May 2020, 19:18 Reply Quote 0
            • undefined
              gtj0 @Dario02
              last edited by 15 May 2020, 19:18

              @Dario02

              Anything on the left side of an "=" or ":" inside "dueui_content", including "dueui_content" itself, is fixed because that's how the Javascript code finds it.

              Same for "status_map". Those key names are what the Duet firmware sends for statuses.

              1 Reply Last reply Reply Quote 0
              • undefined
                Dario02
                last edited by Dario02 19 May 2020, 09:39

                @gtj0 You asked me to report you what examples don't work. For now I found:
                https://github.com/gtjoseph/DueUI/wiki/File-List
                https://github.com/gtjoseph/DueUI/wiki/Heater

                undefined 1 Reply Last reply 19 May 2020, 13:20 Reply Quote 0
                • undefined
                  gtj0 @Dario02
                  last edited by 19 May 2020, 13:20

                  @Dario02 When you say "'don't work" what do you mean? Can you share the JSON you used to configure them?

                  undefined 1 Reply Last reply 19 May 2020, 13:23 Reply Quote 0
                  • undefined
                    Dario02 @gtj0
                    last edited by 19 May 2020, 13:23

                    @gtj0 simply if I add one of them the code doesn't run

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      Dario02
                      last edited by Dario02 19 May 2020, 13:24

                      @gtj0 try adding one of them, now I can't

                      class DueUIConfig {
                      "dueui_content" = {
                      "id": "dueui",
                      "type": "tabbed_panel",
                      "header_panel": {
                      "id": "dueui_header_main",
                      "type": "panel",
                      "element_configs": [
                      {
                      "id": "video_html",
                      "type": "image",
                      "src": "http://192.168.1.118/rr_download?name=/images/logo.png",
                      "style": {
                      "width": "128px",
                      "height": "41px"
                      },
                      "position": {
                      "my": "left top",
                      "at": "left top",
                      "of": "#dueui"
                      }
                      },
                      {
                      "id": "status",
                      "type": "status",
                      "style": {
                      "width": "128px"
                      },
                      "position": {
                      "my": "left top",
                      "at": "right-115 top+3",
                      "of": "#dueui"
                      }
                      }
                      ]
                      },
                      "menubar": {
                      "id": "dueui_menubar",
                      "type": "panel",
                      "button_defaults": {},
                      "position": {
                      "my": "left top",
                      "at": "left+8 bottom-28",
                      "of": "#dueui"
                      }
                      },
                      "element_configs": [
                      {
                      "id": "dueui_panel_movement",
                      "type": "tab_panel",
                      "menubar_label": "HOME",
                      "element_configs": [
                      {
                      "id": "video_html",
                      "type": "image",
                      "src": "http://duet3:8080/stream",
                      "style": {
                      "width": "320px",
                      "height": "210px"
                      },
                      "position": {
                      "my": "left top",
                      "at": "left top",
                      "of": "#dueui_panel_movement"
                      }
                      }
                      ]
                      }
                      ]
                      };
                      "status_map" = {
                      "idle": { "label": "Idle", "classes": "btn-success" },
                      "P": { "label": "Printing", "classes": "btn-success" },
                      "S": { "label": "Stopped", "classes": "btn-warning" },
                      "C": { "label": "Starting Up", "classes": "btn-success" },
                      "paused": { "label": "Paused", "classes": "btn-primary" },
                      "pausing": { "label": "Pausing", "classes": "btn-success" },
                      "resuming": { "label": "Resuming", "classes": "btn-success" },
                      "changingTool": { "label": "Tool<br>Change", "classes": "btn-warning" },
                      "busy": { "label": "Busy", "classes": "btn-success" },
                      "updating": { "label": "Updating", "classes": "btn-danger" },
                      "halted": { "label": "Halted", "classes": "btn-danger" },
                      "off": { "label": "Off", "classes": "btn-danger" },
                      "processing": { "label": "Processing", "classes": "btn-warning" },
                      "simulating": { "label": "Simulating", "classes": "btn-primary" },
                      "connected": { "label": "Connected", "classes": "btn-success" },
                      "connecting": { "label": "Connecting", "classes": "btn-warning" },
                      "reconnected": { "label": "Connected", "classes": "btn-success" },
                      "disconnected": { "label": "Disconnected", "classes": "btn-warning" },
                      "retrying": { "label": "Retrying", "classes": "btn-warning" },
                      "failed": { "label": "Failed", "classes": "btn-danger" },
                      "unknown": { "label": "?", "classes": "btn-secondary" }
                      };
                      }
                      undefined 1 Reply Last reply 19 May 2020, 13:34 Reply Quote 0
                      • undefined
                        gtj0 @Dario02
                        last edited by 19 May 2020, 13:34

                        @Dario02 I'm sorry but I don't understand. The json you posted seems to work fine but doesn't have either a file list or a heater in it to test.

                        undefined 1 Reply Last reply 19 May 2020, 13:35 Reply Quote 0
                        • undefined
                          Dario02 @gtj0
                          last edited by Dario02 19 May 2020, 13:35

                          @gtj0 Yes it works fine because I removed what didn't work... as I told you try adding one of the element/widget that I reported you and the code should not work properly. If you can't understand what I mean, please wait until I'll be free to work on this with you ^_^

                          undefined 1 Reply Last reply 19 May 2020, 13:55 Reply Quote 0
                          • undefined
                            gtj0 @Dario02
                            last edited by 19 May 2020, 13:55

                            @Dario02 OK, when you get a chance, I'll need you to send me the exact json configuration you tried that didn't work.

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              Dario02
                              last edited by Dario02 19 May 2020, 14:47

                              @gtj0 I managed one error you didn't write the "," after "standby": "G10 P0 S${value}"
                              } <---- missing ","

                              "set_temp_commands": {
                              "active": "G10 P0 R${value}",
                              "standby": "G10 P0 S${value}"
                              }
                              /*
                              * The two input fields for setting the active and standby can be hidden
                              * if desired. The default is to show them.
                              */
                              "show_set_fields": false

                              it should be:

                              "set_temp_commands": {
                              "active": "G10 P0 R${value}",
                              "standby": "G10 P0 S${value}"
                              },
                              /*
                              * The two input fields for setting the active and standby can be hidden
                              * if desired. The default is to show them.
                              */
                              "show_set_fields": false
                              undefined 1 Reply Last reply 19 May 2020, 14:59 Reply Quote 0
                              • undefined
                                gtj0 @Dario02
                                last edited by 19 May 2020, 14:59

                                @Dario02 Ah, yeah that's an issue. I'll fix that. Also I think I reversed the "R" and "S" parameters. "active" should be "S" and standby should be "R". I'll fix that as well.

                                undefined 1 Reply Last reply 19 May 2020, 15:18 Reply Quote 0
                                • undefined
                                  Dario02 @gtj0
                                  last edited by 19 May 2020, 15:18

                                  @gtj0 ok well, I'll let you know for the other error

                                  1 Reply Last reply Reply Quote 0
                                  67 out of 73
                                  • First post
                                    67/73
                                    Last post
                                  Unless otherwise noted, all forum content is licensed under CC-BY-SA