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

    Duet integration with NodeRed (Home Automation / Print Farms)

    Scheduled Pinned Locked Moved
    Third-party software
    3
    4
    532
    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.
    • mwolterundefined
      mwolter
      last edited by mwolter

      Sharing this in case anyone is interested in integrating their Duet based printer with other systems via NodeRed. Here is an overview of NodeRed in case you are not familiar. Basically it's a cross-platform flow-based programming interface used to integrate disparate systems and hardware and is heavily used in DIY home automation systems. It's based on javascript and has very low overhead, so it runs well on a raspberry pi.

      For example, you could use NodeRed to send text, email or push notifications on the printer's status, print time remaining or printer faults on your phone or computer. NodeRed is extremely flexible and also includes a web-based dashboard interface that can be used to display the received info without requiring any other software.

      In my case, NodeRed queries the Duet, parses the received JSON message and transmits it via MQTT to my home automation system (HomeSeer). HomeSeer then presents the printer status on tablets throughout my house. This could be easily expanded to several dozen or hundred printers to provide an overview of an entire print farm.

      This flow screenshot below provides a basic overview of how I'm integrating NodeRed with a Duet. At this point, I am only using NodeRed to provide printer status. NodeRed does not control the printer, although it could very easily.

      Screen Shot 2020-03-24 at 3.19.03 PM.jpg

      1 Reply Last reply Reply Quote 4
      • mwolterundefined
        mwolter
        last edited by

        I'll use this second message to post flows that can be imported into NodeRed.

        This flow will create the NodeRed nodes in the screenshot above. It pings the Duet and only queries the rr_status page if the Duet responds. The response is then parsed, several of the values (such as homed) are translated into human-readable text (such as yes) then transmitted to the MQTT broker.
        NodeRed Duet MQTT Flow.txt

        1 Reply Last reply Reply Quote 0
        • littlehobbyshopundefined
          littlehobbyshop
          last edited by

          Thanks for sharing!
          I have an application that this might solve. I've been playing with Python to try and achieve it but this certainly looks like it would be much simpler and I didn't even know it existed. Will get to playing with it immediately!

          BLV MGN Cube w/Hemera, K8200, Sunlu S8

          1 Reply Last reply Reply Quote 0
          • Thaliosundefined
            Thalios
            last edited by

            Thank you so much for this.

            Took some getting used to it, but it works very well! Now I just need to figure out how to format the email I made it send.

            Railcore II 300ZL with lots of upgrades (Duet 3 6HC)
            Heavily modified Ender 3 Pro (Duet 3 6HC)
            Heavily modified Tronxy X5SA-500 Pro with Chimera+ and dual bondtech (Duet 3 6HC)
            CR-10S Pro V2 (Duet 3 Mini 5+)
            and a bunch of SLA printers..

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