I cannot manage to get the current fanspeed, feedrate and position of the extruder head with REST API in Python. I read on some forums that this is not possible but I was wondering if there is any other/new way to get this data. The goal in the end is to collect as many printer variables as possible while printing to do some analysis.
What did you already try to solve it?
I managed to get the temperature data of the extruder and the bed with REST API and I can post commands for the fanspeed for example.
I use Octoprint with my laptop connected to a Prusa MK3s
There's a basic client available on the command line:
$ octoprint client --help
Usage: octoprint client [OPTIONS] COMMAND [ARGS]...
Basic API client.
Options:
-a, --apikey TEXT
-h, --host TEXT
-p, --port INTEGER
--httpuser TEXT
--httppass TEXT
--https
--prefix TEXT
--help Show this message and exit.
Commands:
command Sends a JSON command to the specified server path.
delete Sends a DELETE request to the specified server path.
get Performs a GET request against the specified server path.
listen
patch_json PATCHes JSON data to the specified server path.
post_from_file POSTs JSON data to the specified server path, taking the...
post_json POSTs JSON data to the specified server path.
upload Uploads the specified file to the specified server path.
The listen sub command is a basic push socket client that simply logs what it receives. The socket client is implemented in octoprint_client.Client#create_socket.