entrippy / OctoPrint-OctoHue

Illuminate your print job and signal its status using a Philips Hue lights.
GNU Affero General Public License v3.0
18 stars 4 forks source link

feature request: Hook actionsto GCODE #13

Closed LMS0815 closed 4 years ago

LMS0815 commented 4 years ago

Thank you for this fantastic plugin.

I would like to have the actions hooked to a GCODE.

See: https://github.com/kantlivelong/OctoPrint-GCodeSystemCommands Instead of isung numeric IDs you could name the actions like RED, OFF, GREEN, WHITE or ALERT, OK, INFO, NOTIFY....

This would enable us to insert a GCODE (e.g. HUE_RED, HUE_OFF, HUE_GREEN, HUE_ALERT) into the GCODE Scripts and/or use it with Action Command Definitions plugin.

In addition to HUE switch support, this would add a maximum an flexibility. In addition you do not need to monitor any events like you currently do.

This is what I currently use as a Start print job:

HUE_GREEN; hue on GREEN <<<<<<<<<<<<<<<<<<<<<
M117 Pre print bed/nozzle heating & UBL probe ...
M412 S0; Disable filament runout detection
M420 S; Turn leveling on
G28 X Y; Homing XY
G29 L; Load the previously-activated mesh
G29 F 10.0 ; Set Fade Height for correction at 10.0 mm
G29 A; Activate the UBL System
HUE_YELLOW; hue on YELLOW  <<<<<<<<<<<<<<<<<<<<<
M104 S200; Set Hotend Temperature
M190 S60; Wait for Bed Temperature
G29 J; Mesh calc
M400; wait in a loop until all moves in the planner are completed
HUE_OFF L2; hue 2 off  <<<<<<<<<<<<<<<<<<<<<
M117 Start processing job.

You could even use a payload e.g. Lx for lamp or Sx for switch definition.

entrippy commented 4 years ago

I think this falls in line with the intent of the plugin, so I'm ok with adding it to the roadmap. I'll have a think on its place in the queue of features and update this once I know where it will sit.

LMS0815 commented 4 years ago

There is a plugin (hue Command) already providing this. THX.