-
Notifications
You must be signed in to change notification settings - Fork 204
G CODE Control
Most of the features that can be controlled by UI buttons on the enclosure tab can be controlled by send especial G-Codes to the printer
You need to enable G-CODE control under advanced settings of the octoprint-enclosure plugin.
You need configure the output from the enclosure setting to be able to use it with g-codes.
The list of supported gcodes:
- Regular outputs
ENC O[id] S[value]
Id is generated on the setting plugin, value can be 0 to turn OFF the output or 1 to turn ON output. Ex: sending ENC O2 S1 would turn ON output 2. Ex: sending ENC O5 S0 would turn OFF output 5.
- PWM outputs
ENC O[id] S[pwm value]
Id is generated on the setting plugin, value is the duty cycle from 0 to 100. Ex: sending ENC O5 S75 would turn set duty cycle of 75% on output 5. Ex: sending ENC O1 S0 would turn set duty cycle of 0% on output 1.
- Neopixel
ENC O[id] R[red value] G[green value] B[blue value]
Id is generated on the setting plugin, value should be between 0 to 255. R, G, and B are the colors for that value. Ex: sending ENC O1 R255 G0 B0 would set neopixel with id 1 color to full red. Ex: sending ENC O2 R100 G100 B100 would set neopixel with id 2 color to a mild white color
- Temperature / Humidity Control
ENC O[id] W[wait value] S[set value]
Id is generated on the setting plugin, W specify if the plugin should wait or not for the enclosure to reach the temperature (1 is to wait), S will set the set temperature. Ex: ENC O1 W1 S45 will set temperature control with id 1 to 45 and wait until the enclosure temperature is reached to continue printing. Ex: ENC O1 W0 S45 will set temperature control with id 1 to 45 and start printing right away.