Octoprint,Client first step is to write a worker that will connect,get data and store them.By using the documentation,GET/api/printer and GET/api/job endpoints my key and URL http://messtonecoms.com check if it works via the wget:wget –header=”X-Api-Key:FCE6211928F24CA0884B3C67B6485C66″ http://messtonecoms.com/api/printer –2023 -01-08 22:13:33 –http://messtonecoms.com/api/printer Connecting to 192.168.1.199:5001…connected.HTTP request sent,awaiting response…409 CONFLICT 2023-01-08 22:13:33 ERROR 409:CONFLICT.Ups forgot to turn the printer onwget -S -O - --header "X-Api-Key:FCE6211928F24CAO884B3C67B6485C66" http://messtonecoms.com/api/printer --2023-01-08 22:19:14 --http://messtonecoms.com/api/printer Connecting to 192.168.1.199:5001...connected.HTTP request sent,awaiting response...HTTP/1.1 200 OK Content-Type:applicati/json Content-Length:370 Cache-Control:max-age=0 X-Clarks-Overhead:GNU Terry Pratchett server-Timing:app;dur-4 X-Robots-Tag:noindex, nofollow,noimageindex X-Content-Type-Options:nosniff Length:370[application/json]saving to:'STDOUT' -%0[ ]0 --.-KB/s{"sd":{"ready":true},"state":"error":"","flags":{"cancelling":false,"closeedOrError":false,"error":false,"finishing":false,"operational":true,"paused":false,"pausing":false,"printing":false,"ready":true,"resuming":false,"sdReady":true},"text":"Operational},"temperture":{"bed":{"actual":22.5,"offset":0,"Target":0.0},"tool0":{"actual":23.12,"offset":0,"Target":0.0}}} -100%[=====================================>] 370 --. -KB/s 2023-01-08 22-19-14(41.0 MB/s) - written to stdout[370/370] Writing a worker API endpoints Configuration to the config.ini`[octoprint]enabled=1 octoprint={“ender5pro”:[“FCE”6211928F24CAO884B3C67B6485C66″,”http://messtonecoms.com/api%5D,”ce6se”:[“2B7E383D7F5E46AB9E043A4764943C8″,”http://messtonecoms.com/api”%5D,”ender5plus”:[“9FF05313F4024AE78EFE32E7ACBFECF2″,”http://messtonecoms.com/api”%5D}freq=3s

Leave a comment