NodeDSF : Interface nodes for Node-Red (V1.1.11 - 06-10-23).
-
A set of custom nodes for Node-Red which interface with DSF (on SBC) or a duet control board over http and enable you to create your own event driven actions.
The project is here : https://github.com/MintyTrebor/NodeDSF.
I have written a short wiki on GitHub. Help text is available in the node-red console.
V1.1.11 Update - Updated to RRF 3.5 comptability
Note: Nodes can be directly installed through the Node-Red Palette Manager - just search for dsfnode and install.
-
@MintyTrebor said in NodeDSF : DSF interface nodes for Node-Red + DWC plugin [SBC].:
Fantastic work!
I am working on a custom filament feeder system for a large format printer and was thinking I was going to need a PLC to do the filament changing. This will work perfectly using the RPI running Node Red and integrate to the printer.
It will be a few weeks before I will be up and running but I will add it to my list of stuff to setup, but I'm sure this is going to really make a difference in my application.
Thanks!
-
Well, I couldn't resist trying this out. I said a few weeks and I didnt make it 24 hours. LOL Here are my observations.
This is on a fresh system sitting on my bench still. It is not connected to any hardware yet.
Duet 3 6HC mainboard connected to and powered from a 4GB RPI 4 running DuetPi-Lite. I installed node red and tested it out to work. I installed the
node-red-contrib-dsfnode
module. No trouble so far.I went to import the example flows, thats where I had a few small stumbles. I had to install
node-red-contrib-uibuilder
,node-red-dashboard
andnode-red-contrib-fs-ops
in order to have the flows deploy without error. While I figured it out rather quickly, this info may be useful on the readme of the examples.I tested the dashboard UI and I have the BL touch, Timelapse and my own System Control pages working.
Next, I tried to install the DWC plugin. This is where I'm stuck at currently. I upload the zip file as instructed, and it asks to install. I select yes and thats the end of it. No plugin appears in the list, and nothing else is displayed that I can see, but I'm rather new to DWC.
Im not sure where I should go from here, but I can provide logs if you tell me what to look for.
=== Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.2 running on Duet 3 MB6HC v1.01 or later (SBC mode)
-
@adamj12b I suspect you may not have read the installation wiki pages ...
You should review the node-red installation wiki page, it covers the additional nodes for the examples, plus also covers enabling node-red persistence which is required for some of the example flows.
Once installed the DWC plugin has to be enabled by going into the machine specific-plugins section. The plugin installation page in the wiki covers this. If the option to enable the plugin is missing then that may be an issue. Let me know. (FYI: plugins included with DWC by duet are in general settings-plugins, 3rd party plugins you add manually are in machine specific-plugins)
-
@MintyTrebor said in NodeDSF : DSF interface nodes for Node-Red + DWC plugin [SBC].:
@adamj12b I suspect you may not have read the installation wiki pages ...
You should review the node-red installation wiki page, it covers the additional nodes for the examples, plus also covers enabling node-red persistence which is required for some of the example flows.
Once installed the DWC plugin has to be enabled by going into the machine specific-plugins section. The plugin installation page in the wiki covers this. If the option to enable the plugin is missing then that may be an issue. Let me know. (FYI: plugins included with DWC by duet are in general settings-plugins, 3rd party plugins you add manually are in machine specific-plugins)
My apologies. I should have slowed down and RTFM... Im a little trigger happy with all this awesome new gear to play with.
Just as the instructions said, I needed to enable it under machine specific plugins. I was looking under general.
I got it all fixed up and set up my ui to match. (I cannot seem to insert a pic, so here is a link)
https://drive.google.com/file/d/1AnP76QX6w_wCXPlr4XphrErpV0kxe_Rv/view?usp=sharing
I will report back once I actually get some hardware connected and doing something.
-
@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.
-
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).
-
@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. -
@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.
-
@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. -
V1.1.3 Update - Can now monitor global variables for changes.
-
@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.
-
@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. -
@mintytrebor Thank you for the guidance! got a lot on my plate but will look into this in the near future.
-
@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.
-
@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."
-
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
-
@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.
-
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"
-
@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
Then