Api duet responses to Gcode sent
-
@biketrial981 said in Api duet responses to Gcode sent:
Hi, sorry for my bad English, I'm using a translator.
I am creating a dashboard for my printers with duet and see all the centralized info. I have a question with the api:
Does not return response from the gcode sent?
For example, I can not see the response of an M122 for diagnosis?
Thank you!
The standard rr_status response indicates whether there is a reply, but you need to use the rr_reply HTTP request to fetch the reply.
-
Mostly, these interfaces "poll" for status. They generally do not look for the exact response to a given command. This makes them "self healing", if they miss an update for whatever reason, the next poll fixes it. In fact, the web interface included in the Duet (DWC) polls every 1/2 second. Personally, I think that's a bit excessive.
Anyway, polling the printer with a rr_status would seem to do what you want.
-
@biketrial981 "wireless screen, soon news" Looking forward to it!
-
@t3p3tony the idea started with the simple version, only informative.
But we found a wemos with stick, screen and 18650 battery cheap.
With this we can now launch commands and macros, in addition to changing some parameters.
The idea is to have something to move around the house. If you are in the room, have something on the table that indicates the state of the print and not depend on the phone. More than to replace the screen of the printer, it is a gadget or complement
-
@biketrial981 Ahh fair enough. I saw it more as a really easy way to add simple feedback on the printer - so you could grab your phone or laptop to make changes if required. No doubt people will use it for both $10 is pretty impressive for a screen + ESP+ addons. I hope you will release your firmware for it?
-
@t3p3tony Of course! In a short time we will have something already usable so that people can go playing and modifying it
-
@danal not to hijack the thread but is there a screenshot somewhere? I looked around your other threads a bit with no luck.
-
@dc42 said in Api duet responses to Gcode sent:
@biketrial981 said in Api duet responses to Gcode sent:
Hi, sorry for my bad English, I'm using a translator.
I am creating a dashboard for my printers with duet and see all the centralized info. I have a question with the api:
Does not return response from the gcode sent?
For example, I can not see the response of an M122 for diagnosis?
Thank you!
The standard rr_status response indicates whether there is a reply, but you need to use the rr_reply HTTP request to fetch the reply.
Thank you! with Request URL: http://192.168.0.13/rr_reply I can obtain the data that I was missing, for the advanced section of the dashboard
could it affect the printing consult the gcode M122?
the bad thing is that it returns plain text, if it were a json it would be wonderful xD
-
What would be the advantage in having the reply sent as JSON, given the that reply consists of plain text?
-
For normal use there is no advantage, but at the time of processing the data is much more comfortable indexes and to use a Vin.min for example and not having to parse all the text.
It is not something that contributes anything, and with a function it would not be complicated to create the json, but I understand that the use would be minor. I will try to do it in my server part, since I am interested in some data of the diagnosis gcode.
The rr_reply has helped me a lot
Sorry for my bad english!