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

    How to connect nodemcu (arduino) to DWC over wifi

    Scheduled Pinned Locked Moved
    Duet Web Control
    3
    5
    209
    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.
    • andnosobabinundefined
      andnosobabin
      last edited by

      Hello,
      I have been working on some automated lighting scripts for my printer. So far I've managed to get a serial connection between my duet2 WiFi and a nodemcu and used this code to control multiple strings (ws2812B) to show error alerts, job completion, etc etc etc...

      Now what I really would like to do is have a string of lights that will show actual percentage in real time filling the string up as the print progresses.

      My thought was to have the node go to http://192.168.1.199/rr_status?type=3 (the local address of my printer) and then use that data to run the script accordingly.

      The problem I've ran into is that I can only access that page from a machine that is currently logged into the DWC.

      Is there an easier way or could someone explain how I can get the node to authenticate itself?

      Thanks!

      dc42undefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @andnosobabin
        last edited by

        @andnosobabin I recommend you use rr_model instead of rr_status because we will likely discontinue rr_status in a future firmware version.

        To authenticate, use rr_connect to establish the connection with the Duet. After that you must either send a request such a rr_model frequently (AFAIR the timeout is 8 seconds), or send rr_connect again before rr_model.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        andnosobabinundefined 2 Replies Last reply Reply Quote 0
        • andnosobabinundefined
          andnosobabin @dc42
          last edited by

          @dc42 said in How to connect nodemcu (arduino) to DWC over wifi:

          @andnosobabin I recommend you use rr_model instead of rr_status because we will likely discontinue rr_status in a future firmware version.

          To authenticate, use rr_connect to establish the connection with the Duet. After that you must either send a request such a rr_model frequently (AFAIR the timeout is 8 seconds), or send rr_connect again before rr_model.

          Awesome I'll amend that thanks!
          What is the format for the rr_connect request?

          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
          • jay_s_ukundefined
            jay_s_uk @andnosobabin
            last edited by

            @andnosobabin https://github.com/Duet3D/RepRapFirmware/wiki/HTTP-requests

            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

            1 Reply Last reply Reply Quote 1
            • andnosobabinundefined
              andnosobabin @dc42
              last edited by andnosobabin

              @dc42 When i use rr_model the information i get back is null. when i go to the page in my browser it doesnt have any values for any of the fields either. im using rrf 3.4.6

              Is it possible to just query whatever the source for the DWC % complete? I just need the number.

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