Pronterface se ha vuelto imposible de instalar para mi, así que vamos a probar Octoprint dockerizado, así ya lo tenemos controlado para instalarlo en una Orangepi Zero en la propia impresora.
El fichero docker-compose.yml para el Octoprint (cortesía de Caligari):
version:'2.4'services:octoprint:image:octoprint/octoprintcontainer_name:octoprintrestart:unless-stoppednetwork_mode:bridgeports:- "80:80"devices:- "/dev/bus/usb"volumes:- "./data:/octoprint"- "/run/udev:/run/udev:ro"device_cgroup_rules:- "c 188:* rmw"# USB to serial- "c 81:* rmw"# USB webcams# uncomment the lines below to ensure camera streaming is enabled when# you add a video device#environment:# - ENABLE_MJPG_STREAMER=true##### uncomment if you wish to edit the configuration files of octoprint# refer to docs on configuration editing for more information#####config-editor:# image: linuxserver/code-server# ports:# - 8443:8443# depends_on:# - octoprint# restart: unless-stopped# environment:# - PUID=0# - PGID=0# - TZ=America/Chicago# volumes:# - octoprint:/octoprint
Tenemos que adaptar la parte del mapeo del puerto USB para usarlo en nuestro ordenador.
A continuación algunas notas de como se puede hacer el mapeo del puerto USB en nuestro ordenador.
DSMdockerUIapplicationdoesnothaveoptiontoset"device".Butyoustillcandothisbyfollowingsteps:create"octoprint"containerwithallsettingsyouneed(volumes,portsetc)select"Settings"->"Export"andexportdockercontainerconfigurationJSONtolocalcomputeropenexportedJSONinanyeditorfindstring"devices":null,andreplaceitwith"devices":[{"pathOnHost":"/dev/ttyUSB0","PathInContainer":"/dev/ttyUSB0","CgroupPermissions":"rwm"}],ImportJSONfilebacktoDSMdockerUIP.S.AlsoIfoundthatmy"/dev/ttyUSB0"has"crw-------"permission,andcan't be accessed inside docker by octoprint application. So I have to manually set to "crw-rw-rw-" withchmoda+rw/dev/ttyUSB0-----alsoSuggestaddinginstructionstotoidentifytheUSBportbeingusedandthenpassingthisdeviceintothecontainer.Withthepiconnectedtotheprinterviausbls/dev|grepttyThisshouldreturnalonglistof'tty'TheoneweneedisfoundattheendofthelistandisprobablyttyUSB0ifnootherUSBdevicesarepluggedin.InordertousethisttyUSB0addthistoyourdockerruncommanddockerrun-device/dev/ttyUSB0:/dev/ttyUSB0.....NowoctoprintcandetectthetheUSBportandconnecttotheprinter.Hiiinstalledeverythinganditworks.unfortunatelyIcan't enable the usb and launching the command (pi4): docker: invalid reference format: repository name must be lowercase.See'docker run --help'.someadvice?