schs писал(а): ↑26 дек 2019, 19:14
На вкладке терминала в вэб интерфесе некоторые действия видны.
Спойлер
Connection closed, closing down monitor
Changing monitoring state from "Operational" to "Offline"
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /tmp/printer SerialException: '[Errno 11] Could not exclusively lock port /tmp/printer: [Errno 11] Resource temporarily unavailable' @ comm.py:_openSerial:2661 (hook default)
Connecting to: /tmp/printer
Changing monitoring state from "Offline" to "Opening serial port"
Connected to: Serial<id=0x6cecce70, open=True>(port='/tmp/printer', baudrate=250000, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Changing monitoring state from "Opening serial port" to "Connecting"
Send: N0 M110 N0*125
Send: N0 M110 N0*125
Recv: ok
Changing monitoring state from "Connecting" to "Operational"
Send: N0 M110 N0*125
Recv: ok
Recv: ok
Send: N1 M115*39
Send: N2 M21*18
Recv: ok FIRMWARE_VERSION:v0.8.0-87-g0bfb655f FIRMWARE_NAME:Klipper
Recv: SD card ok
Send: M20
Recv: ok
Recv: Begin file list
Recv: CFFFP_head_duct_short_v2.gcode 905870
Recv: End file list
Мой скрипт:
Код: Выделить всё
#!/bin/sh
curl … Команда на запуск автоматизации в умном доме.
sleep 30s
curl -s -H "Content-Type: application/json" -H "X-Api-Key: ключ" -X POST -d '{ "command":"select", "print": true }' http://192.168.1.5:5000/api/files/local/$1
event:
Код: Выделить всё
events:
enabled: true
subscriptions:
- command: home/pi/power_on.sh {file}
event: MetadataAnalysisStarted
type: system
Что не так не понимаю. Подозреваю, что все же не передается имя.