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

    DueUI: An Alternate Web Interface

    Scheduled Pinned Locked Moved
    DueUI
    12
    65
    11.1k
    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.
    • gtj0undefined
      gtj0
      last edited by gtj0

      Around the beginning of the year I was getting a little frustrated trying to find the "right" way to control my printer from the printer itself. I have a PanelDue but the layout just doesn't fit my work process and while I can, and have, modified the firmware to be closer to what I wanted, it just wasn't enough. So then I spent some time trying to figure out if there were a way to allow the PanelDue's layout to be controlled from a config file and quickly realized that while the PanelDue is great at what it does, dynamically laying out the UI isn't one of them. Then I had an epiphany. Just before Christmas I bought an Amazon Fire 7" Tablet for $79 as a backup to my trusty Nexus 7. It's got a Chromium based HTML5 browser. Can you see where I'm headed? No? Look at these screenshots...

      0_1550458494310_Screenshot_2019-02-17_19-23-35_localhost.png

      0_1550458528216_Screenshot_2019-02-17_18-34-16_localhost.png

      0_1550458561188_Screenshot_2019-02-17_15-47-52_localhost.png

      So now I have a UI that's close to what I want but that's not the best part. Every one of the tabs, buttons, labels, etc. were configured in 1 config file. This way you can get the layout you want.

      Here's a sample config for the 2 heater widgets...

      // Minimal config for  the Bed using the built in defaults.
      {
      	"id": "bed_heater",
      	"type": "heater",
      	"enabled": true,
      	"label": "Bed",
      	"position": {
      		"my": "left top",
      		"at": "right top",
      		"of": "#heater_labels"
      	},
      	"button_defaults": {
      		"style": {
      			"height": "2.5em"							
      		}
      	},
      	"tolerances": [
      		{"limit": 2, "style": {"background": "lightgreen"}},
      		{"limit": 5, "style": {"background": "yellow"}},
      		{"limit": 999, "style": {"background": "red"}}
      	],
      	"heater_index": 0
      },
      // Extended config for Extruder 1
      //  These use the new, as yet unreleased,  M308 command.
      {
      	"id": "extr1_heater",
      	"type": "heater",
      	"enabled": true,
      	"label": "Extr 1",
      	"position": {
      		"my": "left top",
      		"at": "right top",
      		"of": "#bed_heater"
      	},
      	"style": { "width": "100px" },
      	"button_defaults": {
      		"style": {
      			"height": "2.5em"
      		}
      	},
      	"state_styles": [
      		{"background": "gray", "color": "white"},
      		{"background": "green", "color": "white"},
      		{"background": "lightgreen", "color": "black"},
      		{"background": "red", "color": "black"},
      		{"background": "voilet", "color": "black"}
      	],
      	"tolerances": [
      		{"limit": 2, "style": {"background": "lightgreen"}},
      		{"limit": 5, "style": {"background": "yellow"}},
      		{"limit": 999, "style": {"background": "red"}}
      	],
      	"heater_index": 1,
      	"status_level": 1,
      	"current_temp_field": "${status.temps.current[1]}",
      	"active_temp_field": "${status.temps.active[1]}",
      	"standby_temp_field": "${status.temps.standby[1]}",
      	"state_field": "${status.temps.state[1]}",
      	"state_commands": {
      		"off": "M308 P1 T0",
      		"standby": "M308 P1 T1",
      	        "on": "M308 P1 T2"
      	},
      	"set_temp_commands": {
      		"standby": "M308 P1 R${value}",
      		 "active": "M308 P1 S${value}"
      	}
      },
      // Need another extruder, just cut and paste another one.
      

      I've got about another weeks worth of work before I push a release up to GitHub. I need to come up with a decent file browser layout for starting prints and I need to remove a lot of embarrassing debug code. In the mean time, comments and questions will be welcomed.

      To be clear... DueUI is NOT meant to replace the DWC or the PanelDue. It fits somewhere between the 2 and is completely independent from them. Installing DueUI doesn't affect the DWC in any way. Installation is as easy as using the DWC to upload the DueUI zip file. In fact, you don't even need to install DueUI on the Duet at all. Any device that has a reasonably functional web server, like a Raspberry Pi, will do.

      T3P3Tonyundefined 1 Reply Last reply Reply Quote 12
      • Martin1454undefined
        Martin1454
        last edited by

        looking foward to see the results! πŸ˜„

        1 Reply Last reply Reply Quote 0
        • T3P3Tonyundefined
          T3P3Tony administrators @gtj0
          last edited by

          @gtj0 nice! should be helpful for those people who want to use a smaller screen on a tablet and have a simpler interface.

          www.duet3d.com

          1 Reply Last reply Reply Quote 0
          • PuterProundefined
            PuterPro
            last edited by

            Looking great! I've been pondering this very thing, controlling from a spare Fire 8" tablet.

            I look forward to trying it when I'm up and running (I'm in Debugging stage of my CR-10S conversion to Maestro).

            1 Reply Last reply Reply Quote 0
            • thweundefined
              thwe
              last edited by

              I'am also looking foward to see the results and hope we could test asap πŸ‘

              Thomas

              1 Reply Last reply Reply Quote 0
              • gtj0undefined
                gtj0
                last edited by

                I'm writing documentation as we speak. First beta release on Saturday.

                1 Reply Last reply Reply Quote 0
                • thweundefined
                  thwe
                  last edited by

                  Hello Georg,

                  first of all many thanks for your extensive documentation and your great work.

                  I have now installed the DueUI on the DuetWifi and started.
                  I use it on a Samsung GT-N8010 (Note 10.1 inches) with Chrome as a browser.

                  I could already initiate the first movements. In the next weeks I will deal with the settings and the customizing of the interface.

                  As soon as I find my way and acquire a certain competence, I will actively participate in this project with questions and suggestions for improvement as far as my free time permits.

                  Have a beautiful Sunday!

                  Thomas

                  gtj0undefined 1 Reply Last reply Reply Quote 0
                  • gtj0undefined
                    gtj0 @thwe
                    last edited by

                    @thwe Thanks!. That's a nice tablet. Makes me sorry I sold my Nexus 10 last year.

                    1 Reply Last reply Reply Quote 0
                    • gtj0undefined
                      gtj0
                      last edited by

                      If no one's noticed...
                      https://forum.duet3d.com/topic/9257/dueui-1-0-0-alpha-is-available-for-testing

                      1 Reply Last reply Reply Quote 0
                      • DaveAundefined
                        DaveA
                        last edited by

                        I'll assume that I'm doing something wrong but here it is. I've got DueUI installed and it's displaying valid temperature and position information. What I cannot do is initiate any action. If I click on Home All I see a G28 in the upper text window but the printer doesn't home. Same for any other button.
                        Did I miss a setup step somewhere?

                        gtj0undefined 1 Reply Last reply Reply Quote 0
                        • gtj0undefined
                          gtj0 @DaveA
                          last edited by

                          @davea Check settings. You probably have "Don't Send GCode. Log Only" checked (green). For normal operation it should be off (red).

                          thweundefined DaveAundefined 2 Replies Last reply Reply Quote 0
                          • thweundefined
                            thwe @gtj0
                            last edited by thwe

                            @gtj0 said in [Preview] DueUI: An Alternate Web Interface:

                            @davea Check settings. You probably have "Don't Send GCode. Log Only" checked (green). For normal operation it should be off (red).

                            … that it will be - with me all orders are executed first.

                            Also, I've created ATX ON / OFF buttons -> runs!

                            Unfortunately, the themes do not seem to be so uniform: after switching between themes, the fields are slightly shifted

                            Values at the heaters are only displayed as soon as I have switched on my 24V supply (ie ATX ON).

                            After an ATX-OFF, the status is not updated.

                            Depending on the theme, the key cross for XY is also shifted, the midpoints are not exactly on top of each other.
                            But it can also be on my 10.1 inch tablet ... no matter, you can adapt - but you should stay with a theme!

                            Otherwise, the beginning is really good

                            0_1551085558718_Screenshot_2019-02-25-09-59-23.png

                            1_1551085558719_Screenshot_2019-02-25-09-59-34.png

                            2_1551085558719_Screenshot_2019-02-25-09-59-42.png

                            Thomas

                            gtj0undefined 1 Reply Last reply Reply Quote 0
                            • gtj0undefined
                              gtj0 @thwe
                              last edited by

                              @thwe said in [Preview] DueUI: An Alternate Web Interface:

                              @gtj0 said in [Preview] DueUI: An Alternate Web Interface:

                              @davea Check settings. You probably have "Don't Send GCode. Log Only" checked (green). For normal operation it should be off (red).

                              … that it will be - with me all orders are executed first.

                              Also, I've created ATX ON / OFF buttons -> runs!

                              The next alpha will expose the "checkbox" widget that the buttons in settings use. This way you can have a single button that toggles the ATX power state.

                              Values at the heaters are only displayed as soon as I have switched on my 24V supply (ie ATX ON).

                              After an ATX-OFF, the status is not updated.

                              I'll check on that today.

                              Unfortunately, the themes do not seem to be so uniform: after switching between themes, the fields are slightly shifted

                              Depending on the theme, the key cross for XY is also shifted, the midpoints are not exactly on top of each other.
                              But it can also be on my 10.1 inch tablet ... no matter, you can adapt - but you should stay with a theme!

                              Unfortunately, I have no control over the themes but I thought all of the themes except for "Base" were consistent. "Base" is basically "no theme" so the contents may shift when you switch between "Base" and any other theme. Does refreshing the browser between theme switches help at all?

                              For the XY Axis issue, try this for the Y axis position...

                              "position": {"my": "center center", "at": "center center", "of": "#jog_x" }
                              

                              and see if it works. That should align the 2 center blank buttons. For me, it works on some devices but not others.

                              Otherwise, the beginning is really good

                              Thanks!

                              thweundefined 1 Reply Last reply Reply Quote 0
                              • DaveAundefined
                                DaveA @gtj0
                                last edited by

                                @gtj0 Yep, that was it. Thanks.

                                gtj0undefined 1 Reply Last reply Reply Quote 0
                                • gtj0undefined
                                  gtj0 @DaveA
                                  last edited by

                                  @davea The ATX issue is that I forgot to add a status for "O" (off) to the
                                  status map at the bottom of the config file.

                                  Add...

                                  "O": {"label": "Off","style": {"background": "red","color": "black"}},
                                  

                                  to the status_map object after the entry for "H".

                                  1 Reply Last reply Reply Quote 0
                                  • thweundefined
                                    thwe @gtj0
                                    last edited by

                                    @gtj0 said in [Preview] DueUI: An Alternate Web Interface:

                                    Does refreshing the browser between theme switches help at all?

                                    No, there are little differents from hight of Buttons and so on.
                                    Never mind, now I use only theme BASE as my Basic.

                                    Other feedback:
                                    After pressing STOP, the printer stops as expected immediately - but then the DWC asks "The firmware still reports to be stopped after an emergency stop." and must be answered there - unfortunately not on DueUI. Even pressing the "RESTART" button on the DueUI does not help.

                                    Is there a solution here?

                                    Thomas

                                    gtj0undefined 1 Reply Last reply Reply Quote 0
                                    • gtj0undefined
                                      gtj0 @thwe
                                      last edited by

                                      @thwe said in [Preview] DueUI: An Alternate Web Interface:

                                      @gtj0 said in [Preview] DueUI: An Alternate Web Interface:

                                      Does refreshing the browser between theme switches help at all?

                                      No, there are little differents from hight of Buttons and so on.
                                      Never mind, now I use only theme BASE as my Basic.

                                      Other feedback:
                                      After pressing STOP, the printer stops as expected immediately - but then the DWC asks "The firmware still reports to be stopped after an emergency stop." and must be answered there - unfortunately not on DueUI. Even pressing the "RESTART" button on the DueUI does not help.

                                      Is there a solution here?

                                      Hmmm. On my Duet, when I send M112, the Duet restarts by itself and is ready again in about 15 seconds. Try it with the DWC disconnected and see what happens on DueUI.

                                      thweundefined 1 Reply Last reply Reply Quote 0
                                      • thweundefined
                                        thwe @gtj0
                                        last edited by

                                        @gtj0 said in [Preview] DueUI: An Alternate Web Interface:

                                        Hmmm. On my Duet, when I send M112, the Duet restarts by itself and is ready again in about 15 seconds. Try it with the DWC disconnected and see what happens on DueUI.

                                        Without a connect from DWC to the Duet every is OK.

                                        Other question:

                                        with

                                        "actions": [{"type": "gcode", "gcode": "M98 Px_macro_test01.g"}]
                                        

                                        i can call a file, but how can i call a macro from the macro-subfolder?

                                        ... for example "\macros\Tools\Tool bed messuring 5 points"

                                        Thomas

                                        gtj0undefined 1 Reply Last reply Reply Quote 0
                                        • thweundefined
                                          thwe
                                          last edited by thwe

                                          Below I want to show you what I have created in the last few days with the DueUI.

                                          DueUI is certainly not a replacement for DWC, but for me the ideal basis as a control panel directly on the printer.
                                          Small netbook (without touch) was ok so far, but the operation with mouse pad was not so comfortable. Also the picture quality was not so sharp.

                                          Desire was as much control panels by touch on little surfaceas as possible and not to lose the overview - so actually a contradiction.
                                          Since my 10 inch tablet only serves once a year as a navigation tool on the boat, it has now got a great job again πŸ‘

                                          Surely everyone has it's own idea of ​​what an ergonomic and clear surface is, but with the DueUI you can quite well realize your own taste.
                                          With a little bit of logical thinking, even a non-programmer like me can do something with it.

                                          Below are a few pictures of my current state in the Chrom-browser:

                                          Display in normal mode, axes homed, ATX ON
                                          0_1551293223865_Screenshot_2019-02-27-18-28-11.png

                                          ATX OFF
                                          0_1551293301469_Screenshot_2019-02-27-18-28-22.png

                                          And now in full-screen - and now the status indicator is visible
                                          0_1551293327236_Screenshot_2019-02-27-18-28-51.png

                                          After a reboot - axes not homed and ATX OFF
                                          0_1551293429821_Screenshot_2019-02-27-18-29-40.png

                                          Open selection menu
                                          0_1551293524436_Screenshot_2019-02-27-18-30-12.png

                                          The operation of the axes with the jogging as a cross is closer to reality, but so the place is much better exploited - we are all professionals and come so synonymous with itπŸ˜†

                                          If you are interested, I will gladly provide the configuration file, but without any guarantee and with the note that certain details are adapted to MY printer and probably only usable on a 10 inch tablet.

                                          Thomas

                                          gtj0undefined 1 Reply Last reply Reply Quote 4
                                          • gtj0undefined
                                            gtj0 @thwe
                                            last edited by

                                            @thwe said in [Preview] DueUI: An Alternate Web Interface:

                                            @gtj0 said in [Preview] DueUI: An Alternate Web Interface:

                                            Hmmm. On my Duet, when I send M112, the Duet restarts by itself and is ready again in about 15 seconds. Try it with the DWC disconnected and see what happens on DueUI.

                                            Without a connect from DWC to the Duet every is OK.

                                            Other question:

                                            with

                                            "actions": [{"type": "gcode", "gcode": "M98 Px_macro_test01.g"}]
                                            

                                            i can call a file, but how can i call a macro from the macro-subfolder?

                                            ... for example "\macros\Tools\Tool bed messuring 5 points"

                                            When a macro is in a subdirectory, you have to use the full path...
                                            M98 P"/macros/Tools/Tool bed messuring 5 points.g"

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