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

    NodeDSF : Interface nodes for Node-Red (V1.1.11 - 06-10-23).

    Scheduled Pinned Locked Moved
    Third-party software
    7
    48
    5.7k
    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.
    • MintyTreborundefined
      MintyTrebor @adamj12b
      last edited by

      @adamj12b Glad you got it working.

      If you have not done so already, I would recommend enabling node-red persistence (its required for the time-lapse flow) as described in the node-red installation section of the wiki.

      NodeDSF - Native Node-Red integration with Duet boards.
      BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
      ReleaseMgr - Duet update info inside DWC.
      Repo

      1 Reply Last reply Reply Quote 0
      • MintyTreborundefined
        MintyTrebor
        last edited by

        I have updated the nodes to V1.1 with a new experimental feature which allows connection to Duet boards directly - no SBC+DSF required! (see edited first post for details).

        NodeDSF - Native Node-Red integration with Duet boards.
        BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
        ReleaseMgr - Duet update info inside DWC.
        Repo

        Dakotaundefined 1 Reply Last reply Reply Quote 2
        • Dakotaundefined
          Dakota @MintyTrebor
          last edited by

          @MintyTrebor
          would it be possible for you to make a video guide for set up? I'm a mechanical guy, and this software requirement stuff is kind of hard for me to wrap my head around. i have a duet wifi board and i uploaded the NodeDSF_Plugin folder but as far as node red goes i have no idea how to set that up.

          MintyTreborundefined 1 Reply Last reply Reply Quote 0
          • MintyTreborundefined
            MintyTrebor @Dakota
            last edited by MintyTrebor

            @Dakota - Hi. There are written instructions on setting up node-red in the NodeDSF installation wiki pages 😉 ...

            If you prefer video instructions for installing node-red, there are many already available on youtube, for quite a few different platforms.

            The NodeDSF node-red nodes should work on any Node-Red installation regardless of platform (windows/pi/docker/linux etc).

            Edit: I forgot to add. You say that you have a Duet Wifi Board - So can I infer that you are not using the Duet Board + SBC connected over GPIO configuration?... The DWC plugin does not work for stand alone Duet Boards. (please refer to the wiki).

            The node-red NodeDSF nodes work for both standalone and board + SBC configurations.

            NodeDSF - Native Node-Red integration with Duet boards.
            BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
            ReleaseMgr - Duet update info inside DWC.
            Repo

            Dakotaundefined 1 Reply Last reply Reply Quote 1
            • Dakotaundefined
              Dakota @MintyTrebor
              last edited by

              @MintyTrebor
              Your inference is correct, I don't currently own a R-Pi (though I would like to get one at some point). So that's where I was getting really confused in the wiki since most documentation seems to point to needing a separate host like an R-Pi. Then I've been trying to figure out how install it without since you said the v1.1 could do so.

              1 Reply Last reply Reply Quote 0
              • MintyTreborundefined
                MintyTrebor
                last edited by

                V1.1.3 Update - Can now monitor global variables for changes.

                NodeDSF - Native Node-Red integration with Duet boards.
                BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
                ReleaseMgr - Duet update info inside DWC.
                Repo

                1 Reply Last reply Reply Quote 2
                • tekstyleundefined
                  tekstyle @MintyTrebor
                  last edited by tekstyle

                  @mintytrebor is there a tutorial on how to get started. I am node-red illiterate. how would I get my duetwifi board to work with this? my set up is that I have a windows laptop dedicated to DWC and it never turns off.

                  MintyTreborundefined 1 Reply Last reply Reply Quote 0
                  • MintyTreborundefined
                    MintyTrebor @tekstyle
                    last edited by MintyTrebor

                    @tekstyle There are written instructions on setting up node-red in the NodeDSF installation wiki pages, however this is primarily aimed at linux users. nodered.org has instructions on installing for windows, and general usage guidance.

                    The NodeDSF wiki has detailed information on how each its nodes work, and includes example uses, and a video of setting up a flow to send an email on printer status change.

                    If you want general node-red guidance nodered.org or youtube are your friends.

                    Sorry - should of also added:
                    In terms of getting your duet wifi board to work. All you need to know is your Duet Wifi's IP address (and user name and password if you have set one up). You do not have to configure anything on the duet side in order for NodeDSF to work.

                    NodeDSF - Native Node-Red integration with Duet boards.
                    BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
                    ReleaseMgr - Duet update info inside DWC.
                    Repo

                    tekstyleundefined 2 Replies Last reply Reply Quote 1
                    • tekstyleundefined
                      tekstyle @MintyTrebor
                      last edited by

                      @mintytrebor Thank you for the guidance! got a lot on my plate but will look into this in the near future.

                      1 Reply Last reply Reply Quote 0
                      • tekstyleundefined
                        tekstyle @MintyTrebor
                        last edited by

                        @mintytrebor
                        i am trying to follow your tutorial to setup email but I am getting this when I click on deploy after dragging the debug green box to the flow chart.

                        "Your flow credentials file is encrypted using a system-generated key. If the system-generated key is lost for any reason, your credentials file will not be recoverable, you will have to delete it and re-enter your credentials. You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change."

                        I am unsure where to go from here. I am using windows as my machine to run node-red.

                        MintyTreborundefined 1 Reply Last reply Reply Quote 0
                        • MintyTreborundefined
                          MintyTrebor @tekstyle
                          last edited by

                          @tekstyle I don't think that is an error msg just a warning - probably because you have put a user name and password into the send email node. Node-Red stores these types of variables (credentials, api keys, etc) in a separate secured file. The warning is telling you the default encryption of this file is tied to your machine, and not a "key" you have provided.

                          From the Node-red Forum:

                          "Open your Node-RED settings file (typically settings.js - but Node-RED logs the full path to the file it is using so you can check).

                          Find the credentialSecret entry. Remove the // from the start of the line to uncomment it and then change the value (a-secret-key) to be whatever string you want to use to encrypt your credentials file. You will need to remember that value if you every want to move your flows to another machine (for example).

                          Restart Node-RED. Done."

                          NodeDSF - Native Node-Red integration with Duet boards.
                          BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
                          ReleaseMgr - Duet update info inside DWC.
                          Repo

                          tekstyleundefined 1 Reply Last reply Reply Quote 0
                          • tekstyleundefined
                            tekstyle @MintyTrebor
                            last edited by tekstyle

                            @mintytrebor

                            i found the settings.js. uncommented the // as shown below then restarted by closing command prompt. restarted and starting up the service again by typing "node-red" [enter]. went to http://127.0.0.1:1880/ on my web browser. I am stuck here where I don't know where to enter the credential "12345"

                              // By default, credentials are encrypted in storage using a generated key. To
                                // specify your own secret, set the following property.
                                // If you want to disable encryption of credentials, set this property to false.
                                // Note: once you set this property, do not change it - doing so will prevent
                                // node-red from being able to decrypt your existing credentials and they will be
                                // lost.
                                credentialSecret: "12345",
                            

                            this is my start up log:

                            16 Dec 02:22:22 - [info] Node-RED version: v1.3.5
                            16 Dec 02:22:22 - [info] Node.js  version: v14.17.1
                            16 Dec 02:22:22 - [info] Windows_NT 10.0.19041 x64 LE
                            16 Dec 02:22:23 - [info] Loading palette nodes
                            16 Dec 02:22:25 - [info] +-----------------------------------------------------
                            16 Dec 02:22:25 - [info] | uibuilder initialised:
                            16 Dec 02:22:25 - [info] |   Using Node-RED's webserver
                            16 Dec 02:22:25 - [info] |   root folder: \Users\dell\.node-red\uibuilder
                            16 Dec 02:22:25 - [info] |   version . .: 3.3.1
                            16 Dec 02:22:25 - [info] |   packages . : socket.io
                            16 Dec 02:22:25 - [info] +-----------------------------------------------------
                            16 Dec 02:22:25 - [info] Settings file  : C:\Users\dell\.node-red\settings.js
                            16 Dec 02:22:25 - [info] Context store  : 'default' [module=memory]
                            16 Dec 02:22:25 - [info] User directory : \Users\dell\.node-red
                            16 Dec 02:22:25 - [warn] Projects disabled : editorTheme.projects.enabled=false
                            16 Dec 02:22:25 - [info] Flows file     : \Users\dell\.node-red\flows_DESKTOP-PI7LP0S.json
                            16 Dec 02:22:25 - [info] Server now running at http://127.0.0.1:1880/
                            16 Dec 02:22:25 - [info] Waiting for missing types to be registered:
                            16 Dec 02:22:25 - [info]  - ui_group
                            16 Dec 02:22:25 - [info]  - ui_tab
                            16 Dec 02:22:25 - [info]  - ui_template
                            16 Dec 02:22:25 - [info]  - ui_button
                            16 Dec 02:22:25 - [info]  - ui_toast
                            16 Dec 02:22:25 - [info]  - ui_gauge
                            16 Dec 02:22:25 - [info]  - ui_text
                            
                            MintyTreborundefined 1 Reply Last reply Reply Quote 0
                            • MintyTreborundefined
                              MintyTrebor @tekstyle
                              last edited by

                              @tekstyle Sorry not following you.

                              You have already specified your credentialSecret as "12345" in settings.js. You should not need to enter it anywhere else.

                              If you want to change it, then change "12345" in settings.js.

                              NodeDSF - Native Node-Red integration with Duet boards.
                              BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
                              ReleaseMgr - Duet update info inside DWC.
                              Repo

                              tekstyleundefined 1 Reply Last reply Reply Quote 0
                              • tekstyleundefined
                                tekstyle @MintyTrebor
                                last edited by

                                @mintytrebor

                                i don't think node-red is communicating with DUET when following the email tutorial (https://www.youtube.com/watch?v=cn_XXR3FJ00). link text
                                here is what my debug looks like. I am now doing this on a rasp pi4 as it wasn't working on my windows 10 machine. I also followed the instructions at link text to install node-red and NODE DSF on it.

                                dsfModel : msg : Object
                                object
                                topic: "dsfModel"
                                payload: null
                                dsf: object
                                monitorMode: "DSF"
                                monitorError: "No server defined or cannot connect to DSF. Checking again in 10 seconds"
                                _msgid: "adf0ddc76a5d1eae"
                                
                                MintyTreborundefined 1 Reply Last reply Reply Quote 0
                                • MintyTreborundefined
                                  MintyTrebor @tekstyle
                                  last edited by

                                  @tekstyle Are you using a standalone duet control board, or do you have it connected to an SBC using a ribbon/spi cable?

                                  If you are using a standalone control board you need to set the type to Duet in the connection properties of the monitor node

                                  8b943b05-d5b5-437f-ad7d-15793b470658-image.png

                                  Then

                                  55ef833e-cd6a-4165-90e8-9a32ca1d6dab-image.png

                                  NodeDSF - Native Node-Red integration with Duet boards.
                                  BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
                                  ReleaseMgr - Duet update info inside DWC.
                                  Repo

                                  tekstyleundefined 2 Replies Last reply Reply Quote 0
                                  • tekstyleundefined
                                    tekstyle @MintyTrebor
                                    last edited by

                                    @mintytrebor

                                    i am using a duet2wifi with a rasp pi4 for node-red.

                                    1 Reply Last reply Reply Quote 0
                                    • tekstyleundefined
                                      tekstyle @MintyTrebor
                                      last edited by tekstyle

                                      @mintytrebor

                                      i changed the type to DUET. i also changed my credentialSecret code to false. it seems to be getting something under debug window on the right now. but following your example, i can not see the OM for the command M117 "xxx". if you go to line 141, that is were STATE starts and I do not see the field for displaymessage = "xxx"

                                      12/20/2021, 9:32:20 AM
                                      msg : string[57]
                                      "Error loading flows: Error: Failed to decrypt credentials"
                                      12/20/2021, 9:32:20 AMnode: b881bf70e5d5eca0
                                      dsfModel : msg : Object
                                      object
                                      topic: "dsfModel"
                                      payload: object
                                      fullModel: object
                                      boards: array[1]
                                      0: object
                                      directories: object
                                      empty
                                      fans: array[3]
                                      0: object
                                      actualValue: 0
                                      requestedValue: 0
                                      rpm: -1
                                      1: object
                                      actualValue: 0
                                      requestedValue: 1
                                      rpm: -1
                                      2: object
                                      actualValue: 0
                                      requestedValue: 0
                                      rpm: -1
                                      global: object
                                      ext1: 1
                                      SensorTriggered: 2
                                      heat: object
                                      heaters: array[3]
                                      0: object
                                      active: -273
                                      current: 15.1
                                      standby: 0
                                      state: "active"
                                      1: object
                                      active: 0
                                      current: 14.2
                                      standby: 160
                                      state: "active"
                                      2: object
                                      active: 0
                                      current: -273.1
                                      standby: 0
                                      state: "off"
                                      inputs: array[12]
                                      [0 … 9]
                                      0: object
                                      feedRate: 50
                                      lineNumber: 69
                                      state: "idle"
                                      1: object
                                      feedRate: 50
                                      lineNumber: 0
                                      state: "idle"
                                      2: object
                                      3: object
                                      4: object
                                      5: object
                                      6: object
                                      7: object
                                      8: null
                                      9: object
                                      [10 … 11]
                                      job: object
                                      build: null
                                      duration: null
                                      filePosition: 0
                                      layer: null
                                      layerTime: null
                                      pauseDuration: null
                                      rawExtrusion: null
                                      timesLeft: object
                                      warmUpDuration: null
                                      limits: object
                                      empty
                                      move: object
                                      axes: array[3]
                                      0: object
                                      machinePosition: 0
                                      userPosition: 0
                                      1: object
                                      2: object
                                      currentMove: object
                                      extruders: array[1]
                                      0: object
                                      virtualEPos: -3
                                      network: object
                                      empty
                                      scanner: object
                                      empty
                                      sensors: object
                                      analog: array[3]
                                      0: object
                                      lastReading: 15.1
                                      1: object
                                      2: object
                                      endstops: array[3]
                                      0: object
                                      triggered: false
                                      1: object
                                      2: object
                                      filamentMonitors: array[1]
                                      0: object
                                      status: "ok"
                                      gpIn: array[2]
                                      0: null
                                      1: object
                                      value: 0
                                      probes: array[1]
                                      0: object
                                      value: array[1]
                                      seqs: object
                                      boards: 0
                                      directories: 0
                                      fans: 6
                                      global: 2
                                      heat: 14
                                      inputs: 29753
                                      job: 39
                                      move: 82
                                      network: 7
                                      reply: 168
                                      scanner: 1
                                      sensors: 36
                                      spindles: 0
                                      state: 45
                                      tools: 13
                                      volChanges: array[2]
                                      0: 77
                                      1: 0
                                      volumes: 64929
                                      spindles: array[4]
                                      0: object
                                      current: 0
                                      state: "unconfigured"
                                      1: object
                                      2: object
                                      3: object
                                      state: object
                                      messageBox: object
                                      title: null
                                      message: null
                                      atxPower: true
                                      currentTool: 0
                                      gpOut: array[0]
                                      laserPwm: null
                                      msUpTime: 634
                                      nextTool: 0
                                      previousTool: -1
                                      status: "idle"
                                      time: "2021-12-20T09:32:32"
                                      upTime: 476541
                                      tools: array[2]
                                      0: object
                                      active: array[1]
                                      0: 0
                                      standby: array[1]
                                      state: "active"
                                      1: object
                                      volumes: array[2]
                                      0: object
                                      empty
                                      1: object
                                      patchModel: null
                                      prevModel: null
                                      dsf: object
                                      monitorMode: "Duet"
                                      _msgid: "7916fbc1145cf6f1"
                                      
                                      MintyTreborundefined 1 Reply Last reply Reply Quote 0
                                      • MintyTreborundefined
                                        MintyTrebor @tekstyle
                                        last edited by

                                        @tekstyle ""Error loading flows: Error: Failed to decrypt credentials" is a node-red error (not from NodeDSF) because you have changed your credentialSecret code configuration in your setting.js.

                                        The help text for credentialSecret states changing it will prevent node-red from decrypting existing credentials:

                                        // By default, credentials are encrypted in storage using a generated key. To
                                         // specify your own secret, set the following property.
                                         // If you want to disable encryption of credentials, set this property to false.
                                         // Note: once you set this property, do not change it - doing so will prevent
                                         // node-red from being able to decrypt your existing credentials and they will be
                                         // lost.
                                         //credentialSecret: "a-secret-key",
                                        

                                        Which means any ip addresses, usernames, passwords (etc) you configured in your nodes before you changed credentailSecret are no longer accessible to node-red.

                                        I suggest you Reset the settings.js beck to what it was before you changed it.
                                        The default setting is just commented out eg:

                                        //credentialSecret: "a-secret-key",
                                        

                                        NodeDSF - Native Node-Red integration with Duet boards.
                                        BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
                                        ReleaseMgr - Duet update info inside DWC.
                                        Repo

                                        tekstyleundefined 1 Reply Last reply Reply Quote 0
                                        • tekstyleundefined
                                          tekstyle @MintyTrebor
                                          last edited by tekstyle

                                          @mintytrebor
                                          i changed it back to credentialsecret: "a-secret-key" with it commented out. restarted. this is my start log

                                          Starting as a systemd service.
                                          20 Dec 20:55:41 - [info]
                                          Welcome to Node-RED
                                          ===================
                                          20 Dec 20:55:41 - [info] Node-RED version: v2.1.4
                                          20 Dec 20:55:41 - [info] Node.js  version: v14.18.2
                                          20 Dec 20:55:41 - [info] Linux 5.10.63-v7l+ arm LE
                                          20 Dec 20:55:42 - [info] Loading palette nodes
                                          20 Dec 20:55:44 - [info] Dashboard version 3.1.2 started at /ui
                                          20 Dec 20:55:44 - [info] Settings file  : /home/pi/.node-red/settings.js
                                          20 Dec 20:55:44 - [info] Context store  : 'storeInFile' [module=localfilesystem]
                                          20 Dec 20:55:44 - [info] Context store  : 'default' [module=memory]
                                          20 Dec 20:55:44 - [info] User directory : /home/pi/.node-red
                                          20 Dec 20:55:44 - [warn] Projects disabled : editorTheme.projects.enabled=false
                                          20 Dec 20:55:44 - [info] Flows file     : /home/pi/.node-red/flows.json
                                          20 Dec 20:55:44 - [info] Server now running at http://127.0.0.1:1880/
                                          20 Dec 20:55:44 - [warn]
                                          ---------------------------------------------------------------------
                                          Your flow credentials file is encrypted using a system-generated key.
                                          If the system-generated key is lost for any reason, your credentials
                                          file will not be recoverable, you will have to delete it and re-enter
                                          your credentials.
                                          You should set your own key using the 'credentialSecret' option in
                                          your settings file. Node-RED will then re-encrypt your credentials
                                          file using your chosen key the next time you deploy a change.
                                          ---------------------------------------------------------------------
                                          20 Dec 20:55:44 - [warn] Error loading credentials: SyntaxError: Unexpected token � in JSON at position 1
                                          20 Dec 20:55:44 - [warn] Error loading flows: Error: Failed to decrypt credentials
                                          20 Dec 20:55:44 - [info] +-----------------------------------------------------
                                          20 Dec 20:55:44 - [info] | uibuilder v4.1.4 initialised
                                          20 Dec 20:55:44 - [info] | root folder: /home/pi/.node-red/uibuilder
                                          20 Dec 20:55:44 - [info] | Using Node-RED's webserver at:
                                          20 Dec 20:55:44 - [info] |   http://127.0.1.1:1880/ or http://localhost:1880/
                                          20 Dec 20:55:44 - [info] | Installed packages:
                                          20 Dec 20:55:44 - [info] |   jquery, socket.io
                                          20 Dec 20:55:44 - [info] +-----------------------------------------------------
                                          20 Dec 20:55:44 - [info] Starting flows
                                          20 Dec 20:55:44 - [info] Started flows
                                          
                                          

                                          settings.js below

                                              flowFile: 'flows.json',
                                          
                                              /** By default, credentials are encrypted in storage using a generated key.$
                                               * specify your own secret, set the following property.
                                               * If you want to disable encryption of credentials, set this property to f$
                                               * Note: once you set this property, do not change it - doing so will preve$
                                               * node-red from being able to decrypt your existing credentials and they w$
                                               * lost.
                                               */
                                          //    credentialSecret: false,
                                          //    credentialSecret: "a-secret-key",
                                          

                                          for every change made, how do I apply those changes so node-red knows to reset itself or something to decrypt exisiting credentials properly? right now , I just do node-red-stop followed by node-red-start in terminal.

                                          MintyTreborundefined 1 Reply Last reply Reply Quote 0
                                          • MintyTreborundefined
                                            MintyTrebor @tekstyle
                                            last edited by MintyTrebor

                                            @tekstyle Node-red has probably generated a new key automatically now..

                                            Look for a file called something like "flows_#####cred.json" in .node-red folder (the same folder as settings.js) and rename it to "flows#####_cred.old". Then restart node red.

                                            It will probably clear all of the node settings you have already entered, but it should clear the error.

                                            You will have to re-enter the IP and set the mode to Duet in the monitor node of your flow.

                                            NodeDSF - Native Node-Red integration with Duet boards.
                                            BtnCmd - Customise DWC with user defined buttons/layouts/panels (DWC Plugin)
                                            ReleaseMgr - Duet update info inside DWC.
                                            Repo

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