• Tags
  • Documentation
  • Order
  • Register
  • Login
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
4.9k
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
    MintyTrebor @tekstyle
    last edited by MintyTrebor 28 Dec 2021, 08:04

    @tekstyle Great!

    First check you are on the latest release (v1.1.4) through the palette manager, I found a bug whilst answering your query, so please make sure you are updated before going any further. (It can sometimes take a while before updates show in palette manager)
    ef224228-bde4-409a-b8c4-0e70aef16c8f-image.png

    Then add an DSF Event node plus a debug node and configure it like this:
    7052ba96-d9b7-4da8-a3e7-eb39137efc26-image.png
    Deploy, start the monitor and send a M117 message in DWC and it should appear in the debug window (like the picture above).

    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

    undefined 1 Reply Last reply 8 Jan 2022, 10:59 Reply Quote 0
    • undefined
      tekstyle @MintyTrebor
      last edited by 8 Jan 2022, 10:59

      @mintytrebor

      i finally got this to work. that last post was a great help! thank you! now on to setting up email notification.

      undefined 1 Reply Last reply 8 Jan 2022, 17:44 Reply Quote 0
      • undefined
        MintyTrebor @tekstyle
        last edited by 8 Jan 2022, 17:44

        @tekstyle Great! I'm glad you got it working. It's worthwhile spending some time learning node-red, it's really powerful and easy to use, and there are loads of nodes available for interfacing with other IOT stuff etc. I run all my lights, home automation, & printers with it.

        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

        undefined 1 Reply Last reply 9 Jan 2022, 00:14 Reply Quote 0
        • undefined
          tekstyle @MintyTrebor
          last edited by tekstyle 1 Sept 2022, 01:32 9 Jan 2022, 00:14

          @mintytrebor so i used an email node with app password to get it to work. i just want it to display a message with m117 right now. however, it sends me the whole payload of dsf model.

          i copied the path "payload.fullModel.state.displayMessage" . i just copied and paste. but it still keeps sending me the whole thing. anyway to zero it down to just what i request of it on the debug node?

          undefined 1 Reply Last reply 9 Jan 2022, 09:28 Reply Quote 0
          • undefined
            MintyTrebor @tekstyle
            last edited by MintyTrebor 1 Sept 2022, 09:28 9 Jan 2022, 09:28

            @tekstyle Using the same example as before:

            The DSF Event node sends the value of the event to msg.dsf.eventValue

            8e258c54-675f-40c9-88b5-814ba2f4760c-image.png

            Look at the help for the DSF Event node and its fully described:
            b0dd80f2-b3c1-4463-a50e-dbfaef645e52-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

            undefined 1 Reply Last reply 10 Jan 2022, 05:08 Reply Quote 0
            • undefined
              tekstyle @MintyTrebor
              last edited by 10 Jan 2022, 05:08

              @mintytrebor

              My DSF event node/model path = state.displayMessage

              debug node/output = msg.dsf.eventValue

              the debug window above looks like this:

              1/9/2022, 9:07:14 PMnode: aebd8e98337002b3
              dsfModel : msg.dsf.eventValue : string[4]
              "dfsf"
              

              my email looks like this:

              {"fullModel":{"boards":[{"axisMins":[-198.7,-244,0,0],"axisMaxes":[214,196,365,141],"accelerations":[900,900,100,800,500,500,500,500,1250,1250,600,1250],"currents":[1000,1000,1700,0,0,0,0,0,680,680,500,680],"firmwareElectronics":"Duet WiFi 1.02 or later + DueX5","firmwareName":"RepRapFirmware for Duet 2 WiFi/Ethernet","firmwareVersion":"3.3","dwsVersion":"1.26","firmwareDate":"2021-06-15","sysdir":"0:/sys/","idleCurrentFactor":30,"idleTimeout":30,"minFeedrates":[33.33,33.33,8.33,0.83,15,15,15,15,50,50,5,50],"maxFeedrates":[333.33,333.33,8.33,133.33,100,100,100,100,133.33,133.33,60,133.33],"mcuTemp":{"current":29.7},"vIn":{"current":24.1}}],"directories":{},"fans":[{"actualValue":0,"requestedValue":0,"rpm":-1},null,null,{"actualValue":0,"requestedValue":1,"rpm":-1},{"actualValue":1,"requestedValue":1,"rpm":-1},{"actualValue":1,"requestedValue":1,"rpm":-1},{"actualValue":0,"requestedValue":1,"rpm":-1},null,{"actualValue":0,"requestedValue":0,"rpm":-1},{"actualValue":0,"requestedValue":0,"rpm":-1}],"global":{"PTOOL":-1,"BH3":0,"BH2":0,"BH1":0,"BH0":0,"BED":0,"PCCFHOTENDR":160,"PCCFHOTENDS":265},"heat":{"heaters":[{"active":0,"current":18,"standby":0,"state":"off"},{"active":0,"current":18,"standby":0,"state":"off"},{"active":0,"current":-273.1,"standby":0,"state":"off"},{"active":0,"current":-273.1,"standby":0,"state":"off"},{"active":0,"current":18,"standby":0,"state":"off"},{"active":0,"current":18,"standby":0,"state":"off"},{"active":0,"current":18.3,"standby":0,"state":"off"},{"active":0,"current":20.3,"standby":0,"state":"off"}]},"inputs":[{"feedRate":50,"lineNumber":2,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},{"feedRate":50,"lineNumber":67965,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},null,{"feedRate":50,"lineNumber":0,"state":"idle"},null,{"feedRate":50,"lineNumber":0,"state":"idle"}],"job":{"build":null,"duration":null,"filePosition":0,"layer":null,"layerTime":null,"pauseDuration":null,"rawExtrusion":null,"timesLeft":{"filament":null,"file":null,"slicer":null},"warmUpDuration":null},"limits":{},"move":{"axes":[{"machinePosition":0,"userPosition":0},{"machinePosition":0,"userPosition":0},{"machinePosition":0,"userPosition":0},{"machinePosition":0,"userPosition":0}],"currentMove":{"acceleration":0,"deceleration":0,"laserPwm":null,"requestedSpeed":0,"topSpeed":0},"extruders":[{"position":0,"rawPosition":0},{"position":0,"rawPosition":0},{"position":0,"rawPosition":0},{"position":0,"rawPosition":0},{"position":0,"rawPosition":0}],"virtualEPos":0},"network":{},"scanner":{},"sensors":{"analog":[{"lastReading":18},{"lastReading":18},{"lastReading":18.3},{"lastReading":20.3},{"lastReading":18},{"lastReading":-273.1},{"lastReading":-273.1},{"lastReading":18}],"endstops":[{"triggered":false},{"triggered":false},null,{"triggered":true}],"filamentMonitors":[null,null,null,{"status":"ok"}],"gpIn":[],"probes":[{"value":[0]}]},"seqs":{"boards":0,"directories":0,"fans":14,"global":8,"heat":42,"inputs":11,"job":1,"move":48,"network":4467,"reply":2,"scanner":1,"sensors":12,"spindles":0,"state":3,"tools":22,"volChanges":[1,0],"volumes":120},"spindles":[{"current":0,"state":"unconfigured"},{"current":0,"state":"unconfigured"},{"current":0,"state":"unconfigured"},{"current":0,"state":"unconfigured"}],"state":{"messageBox":{"title":null,"message":null},"atxPower":null,"currentTool":-1,"gpOut":[],"laserPwm":null,"msUpTime":71,"nextTool":-1,"previousTool":-1,"status":"idle","time":"2022-01-09T20:57:15","upTime":11396,"displayMessage":"he"},"tools":[{"active":[],"standby":[],"state":"off"},{"active":[0],"standby":[0],"state":"off"},{"active":[0],"standby":[0],"state":"off"},{"active":[0],"standby":[0],"state":"off"},{"active":[0],"standby":[0],"state":"off"}],"volumes":[{},{}]},"patchModel":{"boards":{"0":{"vIn":{"current":24.1}}},"heat":{"heaters":{"0":{"current":18},"1":{"current":18},"4":{"current":18},"5":{"current":18},"6":{"current":18.3}}},"inputs":{"0":{"lineNumber":2}},"sensors":{"analog":{"0":{"lastReading":18},"1":{"lastReading":18},"2":{"lastReading":18.3},"4":{"lastReading":18},"7":{"lastReading":18}}},"seqs":{"reply":2,"state":3},"state":{"msUpTime":71,"time":"2022-01-09T20:57:15","upTime":11396,"displayMessage":"he"}},"prevModel":{"boards":[{"axisMins":[-198.7,-244,0,0],"axisMaxes":[214,196,365,141],"accelerations":[900,900,100,800,500,500,500,500,1250,1250,600,1250],"currents":[1000,1000,1700,0,0,0,0,0,680,680,500,680],"firmwareElectronics":"Duet WiFi 1.02 or later + DueX5","firmwareName":"RepRapFirmware for Duet 2 WiFi/Ethernet","firmwareVersion":"3.3","dwsVersion":"1.26","firmwareDate":"2021-06-15","sysdir":"0:/sys/","idleCurrentFactor":30,"idleTimeout":30,"minFeedrates":[33.33,33.33,8.33,0.83,15,15,15,15,50,50,5,50],"maxFeedrates":[333.33,333.33,8.33,133.33,100,100,100,100,133.33,133.33,60,133.33],"mcuTemp":{"current":29.7},"vIn":{"current":24.2}}],"directories":{},"fans":[{"actualValue":0,"requestedValue":0,"rpm":-1},null,null,{"actualValue":0,"requestedValue":1,"rpm":-1},{"actualValue":1,"requestedValue":1,"rpm":-1},{"actualValue":1,"requestedValue":1,"rpm":-1},{"actualValue":0,"requestedValue":1,"rpm":-1},null,{"actualValue":0,"requestedValue":0,"rpm":-1},{"actualValue":0,"requestedValue":0,"rpm":-1}],"global":{"PTOOL":-1,"BH3":0,"BH2":0,"BH1":0,"BH0":0,"BED":0,"PCCFHOTENDR":160,"PCCFHOTENDS":265},"heat":{"heaters":[{"active":0,"current":18.1,"standby":0,"state":"off"},{"active":0,"current":18.1,"standby":0,"state":"off"},{"active":0,"current":-273.1,"standby":0,"state":"off"},{"active":0,"current":-273.1,"standby":0,"state":"off"},{"active":0,"current":17.9,"standby":0,"state":"off"},{"active":0,"current":17.9,"standby":0,"state":"off"},{"active":0,"current":18.1,"standby":0,"state":"off"},{"active":0,"current":20.3,"standby":0,"state":"off"}]},"inputs":[{"feedRate":50,"lineNumber":1,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},{"feedRate":50,"lineNumber":67965,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},{"feedRate":50,"lineNumber":0,"state":"idle"},null,{"feedRate":50,"lineNumber":0,"state":"idle"},null,{"feedRate":50,"lineNumber":0,"state":"idle"}],"job":{"build":null,"duration":null,"filePosition":0,"layer":null,"layerTime":null,"pauseDuration":null,"rawExtrusion":null,"timesLeft":{"filament":null,"file":null,"slicer":null},"warmUpDuration":null},"limits":{},"move":{"axes":[{"machinePosition":0,"userPosition":0},{"machinePosition":0,"userPosition":0},{"machinePosition":0,"userPosition":0},{"machinePosition":0,"userPosition":0}],"currentMove":{"acceleration":0,"deceleration":0,"laserPwm":null,"requestedSpeed":0,"topSpeed":0},"extruders":[{"position":0,"rawPosition":0},{"position":0,"rawPosition":0},{"position":0,"rawPosition":0},{"position":0,"rawPosition":0},{"position":0,"rawPosition":0}],"virtualEPos":0},"network":{},"scanner":{},"sensors":{"analog":[{"lastReading":18.1},{"lastReading":17.9},{"lastReading":18.1},{"lastReading":20.3},{"lastReading":18.1},{"lastReading":-273.1},{"lastReading":-273.1},{"lastReading":17.9}],"endstops":[{"triggered":false},{"triggered":false},null,{"triggered":true}],"filamentMonitors":[null,null,null,{"status":"ok"}],"gpIn":[],"probes":[{"value":[0]}]},"seqs":{"boards":0,"directories":0,"fans":14,"global":8,"heat":42,"inputs":11,"job":1,"move":48,"network":4467,"reply":1,"scanner":1,"sensors":12,"spindles":0,"state":2,"tools":22,"volChanges":[1,0],"volumes":120},"spindles":[{"current":0,"state":"unconfigured"},{"current":0,"state":"unconfigured"},{"current":0,"state":"unconfigured"},{"current":0,"state":"unconfigured"}],"state":{"messageBox":{"title":null,"message":null},"atxPower":null,"currentTool":-1,"gpOut":[],"laserPwm":null,"msUpTime":838,"nextTool":-1,"previousTool":-1,"status":"idle","time":"2022-01-09T20:57:14","upTime":11395},"tools":[{"active":[],"standby":[],"state":"off"},{"active":[0],"standby":[0],"state":"off"},{"active":[0],"standby":[0],"state":"off"},{"active":[0],"standby":[0],"state":"off"},{"active":[0],"standby":[0],"state":"off"}],"volumes":[{},{}]}}

              undefined 1 Reply Last reply 10 Jan 2022, 07:21 Reply Quote 0
              • undefined
                MintyTrebor @tekstyle
                last edited by 10 Jan 2022, 07:21

                @tekstyle The help from the email node states:
                8eec5444-73bb-4df5-934b-b26e56cccbb6-image.png

                So if you want the email to just be the M117 msg text you have to set msg.payload = msg.dsf.eventValue

                you need to add a change node to make this change

                9780ae87-61ea-4889-a5aa-1b475997391d-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

                undefined 1 Reply Last reply 10 Jan 2022, 23:32 Reply Quote 0
                • undefined
                  tekstyle @MintyTrebor
                  last edited by 10 Jan 2022, 23:32

                  @mintytrebor Thank you for the tip to check the email node's help. still learning how to use it.

                  I was able to just send the M117 message. now i am working on how i can send values from the object modelling to it. It will take some time to play around with.

                  Thanks for getting me started and helping me get a little familiar with how node-red works.

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    MintyTrebor @MintyTrebor
                    last edited by 23 Jan 2022, 10:21

                    V1.1.5 Update - Improved communication in Duet mode which should resolve issue where board could crash or fail to respond, plus fixed node not stopping on deploy when active.

                    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

                    undefined 1 Reply Last reply 25 Jan 2022, 06:59 Reply Quote 1
                    • undefined
                      tekstyle @MintyTrebor
                      last edited by tekstyle 25 Jan 2022, 06:59

                      @mintytrebor

                      I am curious to understand how NodeDSF works. so even though I am just trying to monitor for changes in the display message when a M117 is entered, what I noticed is that when ANY thing gets posted in the console, it trigger a flow no matter if a new M117 command was evoked. I just want to make sure I got this correct.

                      Regarding your update, majority of my wifi issues came from having a node-red server running on the same network as my duet2wifi. I was getting frequent disconnects that was impossible to resolve. Your update seems to have fixed some of those issues but I still have to mess around with it some more to make sure that was the case.

                      Currently, I have a very interesting setup. I have 2 wifi adapters on my laptop. 1 integrated, and 1 via USB. i have my integrated connected to my home WIFI. i have the USB connected to the duet in access point mode. i have node-red installed on my windows 10 machine. I am able to access the internet and connect to both node-red and duet2 board with a working nodeDSF.

                      undefined 2 Replies Last reply 25 Jan 2022, 07:15 Reply Quote 0
                      • undefined
                        MintyTrebor @tekstyle
                        last edited by 25 Jan 2022, 07:15

                        @tekstyle The monitor node gets the machine object model from the sbc/control board about every 200ms (much like DWC does), and pushes it to the next node as a msg, with 3 main categories: The new Full Model, the Delta Model (just what's changed since the last msg), and the Previous Model.

                        Essentially the monitor node is emulating the same method the DWC uses to get data from the board, what happens with that information is up to your flow design.

                        The event node is designed to watch for user defined object model keys that change from the monitor node so you can trigger specific flows/actions only when the value changes, eg when the printer state changes from printing to paused.

                        The other nodes are specific functions to send gcode commands back to the sbc/control board, and to look for specially formatted M291 messages (see the NodeDSF 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
                        • undefined
                          MintyTrebor @tekstyle
                          last edited by MintyTrebor 25 Jan 2022, 07:17

                          @tekstyle I would not recommend running node-red & NodeDSF on the same PC where DWC is also open in a browser, its the same as running 2 DWC sessions at the same time, which will generate a lot of network traffic. Your dual wifi may have mitigated this restriction.

                          My original use case for NodeDSF was to integrate the printer with my existing home automation solution running on Node-Red, which is running on a standalone SBC, so the design kind of reflects that original use case (and probably why I never experienced any crashes/issues)

                          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

                          undefined 1 Reply Last reply 30 Jan 2022, 09:10 Reply Quote 0
                          • undefined
                            tekstyle @MintyTrebor
                            last edited by tekstyle 30 Jan 2022, 09:10

                            @mintytrebor

                            thanks for the recommendation. i am in the process of converting my duet2wifi to SBC. just waiting on the adapter for the wifi module pinout.

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              jgrg1
                              last edited by 27 Jun 2023, 11:30

                              Have to say, this project is excellent. Having never used NodeRed, it was relatively trivial to setup on my Raspberry pi 3b+ SBC board (following the instructions) and get going. I then wired up a pushover node, and voila, I now have notifications on my phone.

                              Essentially, I wanted to recreate the pushover notifications that you get with octoprint, and this worked a treat. It's actually more powerful, as the DSF-Event nodes let you look for specific changes with the Duet object model.

                              I used the DSF-Intercept node (with custom g-code added in the slicer) to check for layer changes and report when the first layer was started and finished.

                              undefined 1 Reply Last reply 6 Oct 2023, 11:15 Reply Quote 1
                              • undefined
                                ilias.khizan
                                last edited by 7 Jul 2023, 09:25

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  MintyTrebor @jgrg1
                                  last edited by 6 Oct 2023, 11:15

                                  V1.1.11 Update - Nodes updated to RRF 3.5 comptability. Update through Node-Red Palette manager.

                                  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

                                  DIY-O-Sphereundefined 1 Reply Last reply 30 Oct 2023, 10:16 Reply Quote 1
                                  • DIY-O-Sphereundefined
                                    DIY-O-Sphere @MintyTrebor
                                    last edited by 30 Oct 2023, 10:16

                                    @MintyTrebor
                                    I would like to share my experience with installing NodeDSF.
                                    I am running Node-Red in a Docker container on a PI4.
                                    It is important not to load the latest Node-Red image when setting up the container.
                                    If you do, NodeDSF will not install. (Incompatible node.js version).
                                    With nodered/node-red:3.1.0-18 as image it worked.
                                    Info about specific images are here https://github.com/node-red/node-red-docker
                                    It took me hours to figure this out....

                                    (UTC+1)

                                    undefined 1 Reply Last reply 30 Oct 2023, 10:27 Reply Quote 0
                                    • undefined
                                      MintyTrebor @DIY-O-Sphere
                                      last edited by 30 Oct 2023, 10:27

                                      @DIY-O-Sphere NodeDSF is built against the recommended NodeJS version (18) as stated by node-red here https://nodered.org/docs/faq/node-versions
                                      Unfortunately if the docker image maintainers have not updated thier "latest" image to NodeJS18 there is not much I can do about it.

                                      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

                                      DIY-O-Sphereundefined 1 Reply Last reply 30 Oct 2023, 10:48 Reply Quote 0
                                      • DIY-O-Sphereundefined
                                        DIY-O-Sphere @MintyTrebor
                                        last edited by 30 Oct 2023, 10:48

                                        @MintyTrebor
                                        This should not be a criticism rather meant as a help for others.
                                        And it's a bit strange that the latest image contains such old versions of node.js....

                                        (UTC+1)

                                        undefined 1 Reply Last reply 30 Oct 2023, 10:53 Reply Quote 0
                                        • undefined
                                          MintyTrebor @DIY-O-Sphere
                                          last edited by 30 Oct 2023, 10:53

                                          @DIY-O-Sphere said in NodeDSF : Interface nodes for Node-Red (V1.1.11 - 06-10-23).:

                                          And it's a bit strange that the latest image contains such old versions of node.js....

                                          Yep - a user of my nodes for klipper (moonnode) hit the same problem (v18 nodes on v16 docker image), he raised the issue with the docker image maintainers and there response was something like "we wont update the node version until the next major release" - which is not ideal

                                          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
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA