How to connect nodemcu (arduino) to DWC over wifi
-
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!
-
@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.
-
@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? -
-
@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.