You are not logged in.
Pages: 1
Currently 16x2 LCD looks too simple, I'm thinking what if I implement a big touch screen with some external development, where we can power on/off projector, select/print usb file (also support stop/pause/resume print). Is this possible?
Offline
We have a similar request from one of printer manufacturer which we are working on. It is already possible to hack things together but any change on our side could break things on the other side.
I am middle of pretty sizable new features after that I will check to see if we could stabilize things and release API.
Offline
Jeff,
Lets go through requirements.
We already have /status and /log paths which are representing current status of the printer, both are pretty stable.
First one is JSON second one is JSON streaming
For control API itself we need following things
API Versioning /api/v1/
Access control - Do you have suggestion about how it should token be generated as it is not public webservice? and probably rpi and display will be sitting in the same box
List Plates - /api/v1/plates
Printer actions - /api/v1/printer/{shutdown,restart,stop,pause,resume}
Projector actions - /api/v1/projector/{on,off}
Shutter actions - /api/v1/shutter/{on,off}
Plate get info - /api/v1/plate/id
Plate actions - /api/v1/plate/id/{delete,print}
USB file listing - /api/v1/usb
Anything else?
Offline
Any news about this? would like to use the API to make an iPhone App, LCD screen,...
Offline
Routes on NanoDLP are pretty stable. You can use current routes instead of waiting for separate API. I know couple of private app already developed to work with nanodlp without any issue.
Offline
wich routes are you talking about? Html result routes? so I have to parse html data to get, by exemple : plates? or call an html routes to move the Z axis and not have results,...?
Offline
No, you do not need to deal with html.
For list of plates there is separate path to get json instead of HTML. I will share complete list below.
GET /
GET /login
POST /login
POST /add-protection
POST /online-access
GET /camera/take
GET /printer/off
GET /printer/auto-shutdown/:mode
GET /printer/restart
GET /printer/terminate
GET /printer/restore
GET /printer/upgrade
GET /printer/upgrade/go/:version
GET /printer/distro/:distro
GET /printer/expand-fs
GET /printer/cast
GET /printer/stop
GET /printer/force-stop
GET /printer/pause
GET /printer/unpause
GET /printer/resume
GET /printer/start/:PlateID
GET /printer/ip
POST /printer/start/:PlateID
GET /setup
GET /setup/export
POST /setup/import
POST /setup/fetch
GET /setup/custom-inputs
POST /setup/custom-inputs
POST /setup
POST /setup/save-custom-inputs
POST /buttons/save
POST /add-mask
GET /button/press/:ID
GET /plates
GET /plate/add
GET /plate/add-usb
GET /plate/add-support
GET /plate/edit/:PlateID
GET /plate/delete/:PlateID
GET /plate/preview/:PlateID
GET /plate/cover/:PlateID
GET /plate/download/:PlateID
GET /plate/regenerate/:PlateID
GET /plate/3d/:PlateID
GET /plate/generator
GET /plate/layer-generator
GET /plate/paint
GET /plate/paint/add
POST /plate/paint
POST /plate/cover/:PlateID
POST /plate/add
POST /plate/add-usb
POST /plate/add-support
POST /plate/edit/:PlateID
POST /plate/generator
POST /plate/layer-generator
POST /plate/paint/add
GET /profiles
GET /profile/add
GET /profile/edit/:ProfileID
GET /profile/clone/:CloneID
GET /profile/delete/:ProfileID
GET /profile/export/:ProfileID
GET /import
GET /profile/default/:ProfileID
POST /profile/import
POST /profile/fetch
POST /profile/add
POST /profile/edit/:ProfileID
POST /profile/clone/:CloneID
GET /projector-calibration
GET /projector/display/:image
GET /projector/generate/:image
GET /projector/on
GET /projector/off
GET /projector/blank
GET /projector/lamp
GET /shutter/open
GET /shutter/close
GET /mask/form
POST /mask/grid
POST /mask/generate/:type
GET /z-calibration
GET /z-axis/move/:directon/:type/:amount
GET /z-axis/top
GET /z-axis/bottom
GET /z-axis/touch-limit
GET /z-axis/calibrate
GET /z-axis/enable/:mode
GET /ramps/reconnect
GET /term-io
GET /wifi
POST /wifi/connect
POST /term-io
POST /z-calibration
GET /debug
GET /debug/continue
GET /debug/stack
GET /status
GET /slicer
GET /log
GET /page/:file/:title
POST /save/partial
GET /help/:files
GET /term
GET /device.xml
GET /initGPU
GET /json/db/:file
GET /json/usb
GET /json/wifi
GET /help
POST /formula
POST /gcode
Offline
When I go to 127.0.0.1:8080/plates on windows, it give me HTML result and not json
Offline
/json/db/plates.json
Offline
Ok thx, so everything else is html to parse?
Offline
No you could find json for response for every action you need. Like shared one for plates file which is in json format.
Offline
Ok, but how? for exemple : http://127.0.0.1:8080/shutter/open of printer/stop,... how can I can get json response instead of html?
Offline
These are action routes. No response from these routes (no HTML or JSON) they just trigger requested action.
Offline
Can you add something plate/add/ profileno description ZipFile ?
will be nice to automate plate preparaton from remote
Thanks
Offline
You can already post data to the same url and it will be added as a plate.
Offline
You can already post data to the same url and it will be added as a plate.
Can you please share the post format or an axample?
Thank you
Offline
Open your browser inspector tool, select network tab upload file and checkout request. Even you can copy request in CURL format.
Offline
Open your browser inspector tool, select network tab upload file and checkout request. Even you can copy request in CURL format.
Hmmm, looks like I have to stream file, but I do not know how...
------WebKitFormBoundarykP2QVaXD0g1yWvnp
Content-Disposition: form-data; name="Path"
tavola 7
------WebKitFormBoundarykP2QVaXD0g1yWvnp
Content-Disposition: form-data; name="ProfileID"
4
------WebKitFormBoundarykP2QVaXD0g1yWvnp
Content-Disposition: form-data; name="USBFile"
------WebKitFormBoundarykP2QVaXD0g1yWvnp
Content-Disposition: form-data; name="ZipFile"; filename="tavola 7.stl"
Content-Type: application/octet-stream
------WebKitFormBoundarykP2QVaXD0g1yWvnp--
Offline
It is just enctype="multipart/form-data"
Offline
No, you do not need to deal with html.
For list of plates there is separate path to get json instead of HTML. I will share complete list below.
......
I'm using json/db/file.ext to download files from db folder to local, is there a way or can you implement something to upload a file also into arbitrary folder?
I'm managing actually using side sw but will be nice to have it into your engine
Thanx
Gatto
Offline
Only DB file could be replaced by uploading directly. No way to replace other files on disk.
Offline
Pages: 1