GCODE system command

I am new to the "GCODE system command" plugin,

in the plugin setup i created a entry OCTO90 with 'sudo shutdown -h now' for the system command.
when i am in the terminal window i can type OCTO90 and my system shuts down, however there is zero documentation on how to format this in the gcode

i have tried the following lines in the gcode

OCTO90
M118 // action:OCTO90
M118 A1 action:OCTO90

all fail, no errors. i do not even see the lines in the terminal window. it is like octoprint ignored it completely.
i cannot seam to run it from the gcode scripts either.

From the looks of the plugin code, it should just be a simple OCTO90, just like any other G or M code. You can have a look in the octoprint.log, it should show when it receives the command & log some output. Note that it will not show up in the printer, as it is intercepted by the plugin.

that is the first one i tried

below is a log snippit with the only mention of OCTO90

2020-08-14 06:19:44,796 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python2 -m pip" as command to invoke pip
2020-08-14 06:19:45,384 - octoprint.util.pip - INFO - Version of pip is 19.3.1
2020-08-14 06:19:45,385 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-08-14 06:19:45,386 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-08-14 06:19:45,390 - octoprint.plugin.core - INFO - Initialized 29 plugin implementation(s)
2020-08-14 06:19:45,399 - octoprint.plugins.gcodesystemcommands - INFO - Add command definition OCTO90 = sudo shutdown -h now
2020-08-14 06:19:45,409 - octoprint.plugins.psucontrol - INFO - Using GPIO for On/Off
2020-08-14 06:19:45,409 - octoprint.plugins.psucontrol - INFO - Using GPIO for tracking PSU on/off state.
2020-08-14 06:19:45,410 - octoprint.plugins.psucontrol - INFO - Running RPi.GPIO version 0.7.0
2020-08-14 06:19:45,411 - octoprint.plugins.psucontrol - INFO - Using GPIO sensing to determine PSU on/off state.
2020-08-14 06:19:45,411 - octoprint.plugins.psucontrol - INFO - Configuring GPIO for pin 40
2020-08-14 06:19:45,412 - octoprint.plugins.psucontrol - INFO - Using GPIO for On/Off
2020-08-14 06:19:45,412 - octoprint.plugins.psucontrol - INFO - Configuring GPIO for pin 40

I just took a quick peak at the code to and @Charlie_Powell should be right. I guess the only question is are you printing your gcode file from SD card or from OctoPrint's "Local" storage? If you're printing from SD card it won't work.

I am printing from octoprints local storage

terminal window output below. OCTO90 never appears

Recv: ok
[...]
Changing monitoring state from "Operational" to "Starting"
Send: N0 M110 N0*125
Recv: ok
Changing monitoring state from "Starting" to "Printing"
[...]
Send: N1 G28*18
[...]
Printer seems to support the busy protocol, will adjust timeouts and set busy interval accordingly
[...]
Recv: X:2.00 Y:2.00 Z:5.00 E:0.00 Count X:160 Y:160 Z:2005
Recv: ok
Send: N2 M113 S2*99
Recv: ok
Send: N3 M140 S0*102
Recv: ok
Send: N4 M107*33
Recv: ok
Send: N5 G1 X0 Y0*44
Recv: ok
Send: N6 M106 S0*97
Recv: ok
Send: N7 M104 S0*98
Recv: ok
Send: N8 M140 S0*109
Recv: ok
Send: N9 M84 X Y E*114
Recv: ok
Changing monitoring state from "Printing" to "Offline"
PSUControl: ok
Connection closed, closing down monitor
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 1 port/baudrate candidates: /dev/ttyUSB0@250000
Trying port /dev/ttyUSB0, baudrate 250000
Connecting to port /dev/ttyUSB0, baudrate 250000
Handshake attempt #1 with timeout 2.0s
Connected to: Serial<id=0xaada83b0, open=True>(port='/dev/ttyUSB0', baudrate=250000, bytesize=8, parity='N', stopbits=1, timeout=2.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Send: N0 M110 N0*125
Recv: start
Changing monitoring state from "Detecting serial connection" to "Operational"
Send: N0 M110 N0*125
Recv: echo:Marlin bugfix-2.0.x
Recv: 
Recv: echo: Free Memory: 12768  PlannerBufferBytes: 1200
Recv: echo:V74 stored settings retrieved (680 bytes; crc 9836)
Recv: echo:  G21    ; Units in mm (mm)
Recv: echo:  M149 C ; Units in Celsius
Recv: 
Recv: echo:Filament settings: Disabled
Recv: echo:  M200 D1.75
Recv: echo:  M200 D0
Recv: echo:Steps per unit:
Recv: echo: M92 X80.17 Y80.17 Z401.09 E144.60
Recv: echo:Maximum feedrates (units/s):
Recv: echo:  M203 X500.00 Y500.00 Z10.00 E50.00
Recv: echo:Maximum Acceleration (units/s2):
Recv: echo:  M201 X500.00 Y500.00 Z100.00 E5000.00
Recv: echo:Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
Recv: echo:  M204 P500.00 R1000.00 T500.00
Recv: echo:Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
Recv: echo:  M205 B20000.00 S0.00 T0.00 J0.01
Recv: echo:Auto Bed Leveling:
Recv: echo:  M420 S0 Z3.00
Recv: echo:  G29 W I0 J0 Z0.03156
Recv: echo:  G29 W I1 J0 Z-0.01082
Recv: echo:  G29 W I2 J0 Z-0.08313
Recv: echo:  G29 W I3 J0 Z-0.10806
Recv: echo:  G29 W I4 J0 Z-0.12052
Recv: echo:  G29 W I0 J1 Z0.01162
Recv: echo:  G29 W I1 J1 Z0.01411
Recv: echo:  G29 W I2 J1 Z-0.04822
Recv: echo:  G29 W I3 J1 Z-0.03326
Recv: echo:  G29 W I4 J1 Z-0.03825
Recv: echo:  G29 W I0 J2 Z0.07395
Recv: echo:  G29 W I1 J2 Z0.08392
Recv: echo:  G29 W I2 J2 Z0.03156
Recv: echo:  G29 W I3 J2 Z0.06148
Recv: echo:  G29 W I4 J2 Z0.06647
Recv: echo:  G29 W I0 J3 Z0.20609
Recv: echo:  G29 W I1 J3 Z0.23850
Recv: echo:  G29 W I2 J3 Z0.21855
Recv: echo:  G29 W I3 J3 Z0.23850
Recv: echo:  G29 W I4 J3 Z0.25595
Recv: echo:  G29 W I0 J4 Z0.43048
Recv: echo:  G29 W I1 J4 Z0.47785
Recv: echo:  G29 W I2 J4 Z0.48533
Recv: echo:  G29 W I3 J4 Z0.56511
Recv: echo:  G29 W I4 J4 Z0.56012
Recv: echo:Material heatup parameters:
Recv: echo:  M145 S0 H210 B50 F125
Recv: echo:  M145 S1 H240 B110 F125
Recv: echo:PID settings:
Recv: echo:  M301 P22.20 I1.08 D114.00
Recv: echo:Z-Probe Offset (mm):
Recv: echo:  M851 X43.00 Y7.00 Z-1.23
Recv: echo:Filament load/unload lengths:
Recv: echo:  M603 L0.00 U100.00
Recv: ok
Send: N1 M115*39
Recv: FIRMWARE_NAME:Marlin bugfix-2.0.x (GitHub) SOURCE_CODE_URL:https://github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Ender - 5 EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
Recv: Cap:SERIAL_XON_XOFF:0
Recv: Cap:BINARY_FILE_TRANSFER:0
Recv: Cap:EEPROM:1
Recv: Cap:VOLUMETRIC:1
Recv: Cap:AUTOREPORT_TEMP:1
Recv: Cap:PROGRESS:0
Recv: Cap:PRINT_JOB:1
Recv: Cap:AUTOLEVEL:1
Recv: Cap:Z_PROBE:1
Recv: Cap:LEVELING_DATA:1
Recv: Cap:BUILD_PERCENT:0
Recv: Cap:SOFTWARE_POWER:0
Recv: Cap:TOGGLE_LIGHTS:0
Recv: Cap:CASE_LIGHT_BRIGHTNESS:0
Recv: Cap:EMERGENCY_PARSER:0
Recv: Cap:PROMPT_SUPPORT:0
Recv: Cap:AUTOREPORT_SD_STATUS:0
Recv: Cap:THERMAL_PROTECTION:1
Recv: Cap:MOTION_MODES:0
Recv: Cap:CHAMBER_TEMPERATURE:0
Recv: ok
Send: M21
Recv: echo:Unknown command: "M21"
Recv: ok
Send: M155 S2
Recv: ok
[...]
SendAutoscroll showing 185 lines (148 of 333 total lines filtered) (Scroll to end) Copy all
 Clear all
Suppress temperature messages
Suppress SD status messages
Suppress wait responses
Suppress busy responses

here is the test Gcode i am using

G28 ;Home

M140 S0
M107

G1 X0 Y0 ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed

M84 X Y E ;Disable all steppers but Z
M81 ;Turn off print SSR
OCTO90 ;turn off octoprint

I think, it doesn't show up there because it is intercepted by the plugin - otherwise the printer would moan 'unknown command' - I think.
I can install & give it a go hooked up to a debugger at some point - could be a bug in the plugin, but then I would have thought someone else would have the issue too. As far as I can tell, you're using it right

fresh log file below, near the bottom i see a print_failed line. and i have noticed that all my time lapse videos have a -failed on the end......weird

2020-08-15 16:51:46,781 - octoprint.startup - INFO - ******************************************************************************
2020-08-15 16:51:46,782 - octoprint.startup - INFO - Starting OctoPrint 1.4.2
2020-08-15 16:51:46,783 - octoprint.startup - INFO - ******************************************************************************
2020-08-15 16:51:52,121 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity changed from offline to online
2020-08-15 16:51:52,146 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: online
2020-08-15 16:51:52,148 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 8.8.8.8:53 is working
2020-08-15 16:51:52,149 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is working
2020-08-15 16:51:52,707 - octoprint.startup - INFO - Blacklist processing done, adding 10 blacklisted plugin versions: roomtemp (any), GcodeEditor (0.1.1), GcodeEditor (0.2.0), GcodeEditor (0.2.1), GcodeEditor (0.2.2), GcodeEditor (0.2.3), GcodeEditor (0.2.4), GcodeEditor (0.2.5), GcodeEditor (0.2.6), GcodeEditor (0.2.8)
2020-08-15 16:51:52,727 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2020-08-15 16:51:53,436 - octoprint.plugin.core - INFO - Plugin SlicerSettingsTab (1.0.3) is disabled.
2020-08-15 16:51:53,519 - octoprint.plugin.core - INFO - Plugin Active Filters Extended (0.1.0) is disabled.
2020-08-15 16:51:53,566 - octoprint.plugin.core - INFO - Plugin Octolapse (0.3.4) is disabled.
2020-08-15 16:51:53,606 - octoprint.plugin.core - INFO - Plugin DisplayLayerProgress Plugin (1.20.0) is disabled.
2020-08-15 16:51:53,625 - octoprint.plugin.core - INFO - Plugin Bed Visualizer (0.1.13) is disabled.
2020-08-15 16:51:53,643 - octoprint.startup - INFO - Added settings overlay from plugin consolidate_temp_control
2020-08-15 16:51:53,644 - octoprint.plugin.core - INFO - Found 37 plugin(s) providing 32 mixin implementations, 50 hook handlers
2020-08-15 16:51:53,816 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2020-08-15 16:51:53,831 - octoprint.server - INFO - Intermediary server started
2020-08-15 16:51:53,832 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2020-08-15 16:51:53,917 - octoprint.plugin.core - INFO - Found 37 plugin(s) providing 32 mixin implementations, 50 hook handlers
2020-08-15 16:51:53,933 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /home/pi/.octoprint/uploads...
2020-08-15 16:51:54,155 - octoprint.filemanager.storage - INFO - ... file metadata for /home/pi/.octoprint/uploads initialized successfully.
2020-08-15 16:51:54,157 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_SHOW (needs: u"Need(method='role', value=u'plugin_action_command_notification_show')")
2020-08-15 16:51:54,158 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR (needs: u"Need(method='role', value=u'plugin_action_command_notification_clear')")
2020-08-15 16:51:54,159 - octoprint.server - INFO - Added new permission from plugin action_command_prompt: PLUGIN_ACTION_COMMAND_PROMPT_INTERACT (needs: u"Need(method='role', value=u'plugin_action_command_prompt_interact')")
2020-08-15 16:51:54,160 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_READ (needs: u"Need(method='role', value=u'plugin_announcements_read')")
2020-08-15 16:51:54,160 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_MANAGE (needs: u"Need(method='role', value=u'plugin_announcements_manage'), Need(method='role', value=u'plugin_announcements_read')")
2020-08-15 16:51:54,162 - octoprint.server - INFO - Added new permission from plugin appkeys: PLUGIN_APPKEYS_ADMIN (needs: u"Need(method='role', value=u'plugin_appkeys_admin')")
2020-08-15 16:51:54,162 - octoprint.server - INFO - Added new permission from plugin backup: PLUGIN_BACKUP_ACCESS (needs: u"Need(method='role', value=u'plugin_backup_access')")
2020-08-15 16:51:54,163 - octoprint.server - INFO - Added new permission from plugin firmware_check: PLUGIN_FIRMWARE_CHECK_DISPLAY (needs: u"Need(method='role', value=u'plugin_firmware_check_display')")
2020-08-15 16:51:54,164 - octoprint.server - INFO - Added new permission from plugin logging: PLUGIN_LOGGING_MANAGE (needs: u"Need(method='role', value=u'plugin_logging_manage')")
2020-08-15 16:51:54,165 - octoprint.server - INFO - Added new permission from plugin pi_support: PLUGIN_PI_SUPPORT_STATUS (needs: u"Need(method='role', value=u'plugin_pi_support_check')")
2020-08-15 16:51:54,165 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_MANAGE (needs: u"Need(method='role', value=u'plugin_pluginmanager_manage')")
2020-08-15 16:51:54,166 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_INSTALL (needs: u"Need(method='role', value=u'plugin_pluginmanager_install'), Need(method='role', value=u'plugin_pluginmanager_manage')")
2020-08-15 16:51:54,167 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CHECK (needs: u"Need(method='role', value=u'plugin_softwareupdate_check')")
2020-08-15 16:51:54,168 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_UPDATE (needs: u"Need(method='role', value=u'plugin_softwareupdate_update')")
2020-08-15 16:51:54,326 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
2020-08-15 16:51:54,931 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python2 -m pip" as command to invoke pip
2020-08-15 16:51:55,528 - octoprint.util.pip - INFO - Version of pip is 19.3.1
2020-08-15 16:51:55,529 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-08-15 16:51:55,530 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-08-15 16:51:55,534 - octoprint.plugin.core - INFO - Initialized 32 plugin implementation(s)
2020-08-15 16:51:55,544 - octoprint.plugins.gcodesystemcommands - INFO - Add command definition OCTO90 = sudo shutdown -h now
2020-08-15 16:51:55,554 - octoprint.plugins.psucontrol - INFO - Using GPIO for On/Off
2020-08-15 16:51:55,554 - octoprint.plugins.psucontrol - INFO - Using GPIO for tracking PSU on/off state.
2020-08-15 16:51:55,555 - octoprint.plugins.psucontrol - INFO - Running RPi.GPIO version 0.7.0
2020-08-15 16:51:55,556 - octoprint.plugins.psucontrol - INFO - Using GPIO sensing to determine PSU on/off state.
2020-08-15 16:51:55,556 - octoprint.plugins.psucontrol - INFO - Configuring GPIO for pin 40
2020-08-15 16:51:55,557 - octoprint.plugins.psucontrol - INFO - Using GPIO for On/Off
2020-08-15 16:51:55,557 - octoprint.plugins.psucontrol - INFO - Configuring GPIO for pin 40
2020-08-15 16:51:55,563 - octoprint.plugin.core - INFO - 37 plugin(s) registered with the system:
|  Action Command Notification Support (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_notification
|  Action Command Prompt Support (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt
|  Active Filters (0.0.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_active_filters
| !Active Filters Extended (0.1.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_active_filters_extended
|  Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements
|  Anonymous Usage Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking
|  Application Keys Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/appkeys
|  Automatic Shutdown (0.1.4) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_automaticshutdown
|  Autoselect Plugin (0.3.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_autoselect
|  Backup & Restore (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup
| !Bed Visualizer (0.1.13) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_bedlevelvisualizer
|  Consolidate Temp Control (0.1.7) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_consolidate_temp_control
|  Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/corewizard
|  Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/discovery
| !DisplayLayerProgress Plugin (1.20.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_DisplayLayerProgress
|  Dragon Order (0.1.5) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_dragon_order
|  Error Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/errortracking
|  File Check (2020.8.7) (bundled) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_file_check
|  Firmware Check (2020.6.22) (bundled) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_firmware_check
|  GCODE System Commands (1.0.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_gcodesystemcommands
|  GCode Viewer (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/gcodeviewer
|  Logging (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/logging
|  Login UI (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/loginui
|  Macro (0.2.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_macro
|  Navbar Temperature Plugin (0.14) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_navbartemp
| !Octolapse (0.3.4) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_octolapse
|  OctoPrint-WideScreen (0.1.3) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_widescreen
|  Pi Support Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pi_support
|  Plugin Manager (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager
|  Preheat Button (0.5.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_preheat
|  PSU Control (0.1.9) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_psucontrol
|  Python 3 Check (0.1.4) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_python3plugincompatibilitycheck
| !SlicerSettingsTab (1.0.3) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_SlicerSettingsTab
|  Software Update (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate
|  Tab Order (0.5.10) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_taborder
|  TouchUI (0.3.15) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_touchui
|  Virtual Printer (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/virtual_printer
Prefix legend: ! = disabled, # = blacklisted, * = incompatible
2020-08-15 16:51:55,574 - octoprint.environment - INFO - Detected environment is Python 2.7.16 under Linux (linux2). Details:
|  hardware:
|      cores: 4
|      freq: 1500.0
|      ram: 4041703424
|  os:
|      id: linux
|      platform: linux2
|  plugins:
|      pi_support:
|          model: Raspberry Pi 4 Model B Rev 1.2
|          octopi_version: 0.17.0
|  python:
|      pip: 19.3.1
|      version: 2.7.16
|      virtualenv: /home/pi/oprint
2020-08-15 16:51:55,583 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/webassets...
2020-08-15 16:51:55,603 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/.webassets-cache...
2020-08-15 16:51:56,240 - octoprint.server - INFO - Shutting down intermediary server...
2020-08-15 16:51:56,643 - octoprint.server - INFO - Intermediary server shut down
2020-08-15 16:51:56,645 - octoprint.events - INFO - Processing startup event, this is our first event
2020-08-15 16:51:56,646 - octoprint.events - INFO - Adding 1 events to queue that were held back before startup event
2020-08-15 16:51:56,652 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2020-08-15 16:51:56,660 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2020-08-15 16:51:56,660 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2020-08-15 16:51:56,662 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2020-08-15 16:51:56,737 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2020-08-15 16:51:56,848 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance "Creality Ender-5"' for _http._tcp
2020-08-15 16:51:56,906 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance "Creality Ender-5"' for _octoprint._tcp
2020-08-15 16:51:56,967 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance "Creality Ender-5" for SSDP
2020-08-15 16:51:57,358 - octoprint.server - INFO - Listening on http://127.0.0.1:5000
2020-08-15 16:51:58,014 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2020-08-15 16:51:58,631 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python2 -m pip" as command to invoke pip
2020-08-15 16:51:58,633 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-08-15 16:51:58,633 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-08-15 16:51:58,638 - octoprint.plugins.softwareupdate - INFO - Minimum free storage across all update relevant locations is 3.6GB. That is considered sufficient for updating.
2020-08-15 16:51:58,648 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2020-08-15 16:51:59,071 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2020-08-15 16:51:59,301 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:192.168.0.100
2020-08-15 16:51:59,312 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://192.168.0.120/'}
2020-08-15 16:51:59,479 - octoprint.server.util.flask - INFO - Passively logging in user HtRabbit from ::ffff:192.168.0.100
2020-08-15 16:51:59,481 - octoprint.access.users - INFO - Logged in user: HtRabbit
2020-08-15 16:51:59,482 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2020-08-15 16:51:59,609 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 1 port/baudrate candidates: /dev/ttyUSB0@250000
2020-08-15 16:51:59,611 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 250000
2020-08-15 16:51:59,613 - octoprint.util.comm - INFO - Connecting to port /dev/ttyUSB0, baudrate 250000
2020-08-15 16:51:59,660 - octoprint.plugins.tracking - INFO - Sent tracking event startup, payload: {'python': '2.7.16', 'ram': 4041703424L, u'octopi_version': u'0.17.0', 'version': u'1.4.2', 'pip': '19.3.1', 'cores': 4, 'freq': 1500.0, u'pi_model': u'Raspberry Pi 4 Model B Rev 1.2', 'os': 'linux'}
2020-08-15 16:51:59,672 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2020-08-15 16:51:59,724 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-08-15 16:52:00,056 - octoprint.server.util.sockjs - INFO - User HtRabbit logged in on the socket from client ::ffff:192.168.0.100
2020-08-15 16:52:00,333 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial connection" to "Operational"
2020-08-15 16:52:00,345 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-08-15 16:52:02,328 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin bugfix-2.0.x (GitHub)"
2020-08-15 16:52:02,341 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
2020-08-15 16:52:05,325 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 5}
2020-08-15 16:52:05,895 - octoprint.plugins.tracking - INFO - Sent tracking event pong, payload: {'python': '2.7.16', 'ram': 4041703424L, u'octopi_version': u'0.17.0', 'version': u'1.4.2', u'plugins': u'active_filters:0.0.1,python3plugincompatibilitycheck:0.1.4,autoselect:0.3.0,dragon_order:0.1.5,taborder:0.5.10,touchui:0.3.15,automaticshutdown:0.1.4,gcodesystemcommands:1.0.1,macro:0.2.0,navbartemp:0.14,widescreen:0.1.3,consolidate_temp_control:0.1.7,psucontrol:0.1.9,preheat:0.5.1', 'pip': '19.3.1', 'cores': 4, 'freq': 1500.0, u'pi_model': u'Raspberry Pi 4 Model B Rev 1.2', 'os': 'linux'}
2020-08-15 16:52:06,089 - octoprint.server.preemptive_cache - INFO - ... done in 6.78s
2020-08-15 16:52:06,423 - octoprint.plugins.tracking - INFO - Sent tracking event printer_connected, payload: {u'printer_baudrate': 250000, u'printer_port': None, 'firmware_name': u'Marlin bugfix-2.0.x (GitHub)'}
2020-08-15 16:52:28,986 - octoprint.printer.standard.job - INFO - Print job selected - origin: local, path: gcode_test.gcode, owner: HtRabbit, user: HtRabbit
2020-08-15 16:52:29,002 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Starting"
2020-08-15 16:52:29,009 - octoprint.printer.standard.job - INFO - Print job started - origin: local, path: gcode_test.gcode, owner: HtRabbit, user: HtRabbit
2020-08-15 16:52:29,064 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-08-15 16:52:29,089 - octoprint.util.comm - INFO - Changing monitoring state from "Starting" to "Printing"
2020-08-15 16:52:29,093 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G28)
2020-08-15 16:52:29,095 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2020-08-15 16:52:29,732 - octoprint.plugins.tracking - INFO - Sent tracking event print_started, payload: {'origin': u'local', 'file': 'b34fa6ee77b876ecf37e4184a2869497fdf07c64'}
2020-08-15 16:52:36,212 - octoprint.util.comm - INFO - Printer seems to support the busy protocol, will adjust timeouts and set busy interval accordingly
2020-08-15 16:52:56,643 - octoprint.util.comm - INFO - Telling the printer to set the busy interval to our "communicationBusy" timeout - 1s = 2s
2020-08-15 16:52:56,947 - octoprint.plugins.psucontrol - INFO - Switching PSU Off
2020-08-15 16:52:56,984 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Offline"
2020-08-15 16:52:57,007 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2020-08-15 16:52:57,334 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2020-08-15 16:52:57,355 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 1 port/baudrate candidates: /dev/ttyUSB0@250000
2020-08-15 16:52:57,363 - tornado.access - WARNING - 409 GET /api/printer?history=false&limit=0&exclude=sd (127.0.0.1) 6.28ms
2020-08-15 16:52:57,366 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 250000
2020-08-15 16:52:57,374 - octoprint.util.comm - INFO - Connecting to port /dev/ttyUSB0, baudrate 250000
2020-08-15 16:52:57,396 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2020-08-15 16:52:57,402 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-08-15 16:52:57,653 - octoprint.plugins.tracking - INFO - Sent tracking event print_failed, payload: {'origin': u'local', u'reason': u'error', u'commerror_text': u'', 'file': 'b34fa6ee77b876ecf37e4184a2869497fdf07c64', u'elapsed': 27}
2020-08-15 16:52:59,161 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial connection" to "Operational"
2020-08-15 16:52:59,182 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-08-15 16:53:01,119 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin bugfix-2.0.x (GitHub)"
2020-08-15 16:53:01,151 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
2020-08-15 16:53:01,646 - octoprint.plugins.tracking - INFO - Sent tracking event printer_connected, payload: {u'printer_baudrate': 250000, u'printer_port': None, 'firmware_name': u'Marlin bugfix-2.0.x (GitHub)'}
2020-08-15 16:53:02,115 - octoprint.plugins.automaticshutdown - INFO - Waiting for 1 timelapse(s) to finish rendering before starting shutdown timer...
2020-08-15 16:53:07,121 - octoprint.plugins.automaticshutdown - INFO - Waiting for 1 timelapse(s) to finish rendering before starting shutdown timer...
2020-08-15 16:53:12,126 - octoprint.plugins.automaticshutdown - INFO - Waiting for 1 timelapse(s) to finish rendering before starting shutdown timer...
2020-08-15 16:53:17,130 - octoprint.plugins.automaticshutdown - INFO - Waiting for 1 timelapse(s) to finish rendering before starting shutdown timer...
2020-08-15 16:53:22,136 - octoprint.plugins.automaticshutdown - INFO - Waiting for 1 timelapse(s) to finish rendering before starting shutdown timer...
2020-08-15 16:53:27,158 - octoprint.plugins.automaticshutdown - INFO - Waiting for 1 timelapse(s) to finish rendering before starting shutdown timer...
2020-08-15 16:53:32,164 - octoprint.plugins.automaticshutdown - INFO - Waiting for 1 timelapse(s) to finish rendering before starting shutdown timer...
2020-08-15 16:53:37,171 - octoprint.plugins.automaticshutdown - INFO - Waiting for 1 timelapse(s) to finish rendering before starting shutdown timer...

I am very new to most of this so please forgive my ignorance. Basically I am wanting to control a servo motor with a python program using the Gcode System Command. So what I did was proof out my python code so that it properly executes. It is located in /share/Swipper.py. I then created a .sh program that simply calls this python program and it's located in the same folder. I then assigned OCTO10 to /share/Swipper.sh & . This run on the terminal of Octoprint doesn't seem to modify the Servo position but when I am on CLI I try to run ./share/Swipper.sh and it says no attribute found. So then I "cd" into the /share folder and run ./Swipper.sh and it performs exactly as I would expect. So I am wondering how do I need to write these programs in order to get OCTO10 to work properly. It seems like nothing I am trying is having an effect. Below is my code:

<Swipper.sh>

#!/bin/bash
sudo python3 /share/Swipper.py &

any help would be much appreciated.

I think the issue is that your command requires the entering of a password since it has sudo in it. Just curious if you've tried any of the servo based plugins like EasyServo? I know @MegaHurtz got this to work to wipe off his nozzle with some creative between layer change gcode commands and that plugin.

@tiger5248, You have added to this old topic and started a new topic for the same issue.

Let's continue this in the new topic only.

1 Like

Thank for jneilliii, Charlie_Powell ...
I have some issues with GCodeSystemCommands, and thanks yours guide i resolve this. Now it works like a charm....
Milan