Work inspired by OctoPrint-PSUControl and TP-Link WiFi SmartPlug Client, this plugin controls a TP-Link Smartplug via OctoPrint's nav bar.
Install via the bundled Plugin Manager or manually using this URL:
https://github.com/jneilliii/OctoPrint-TPLinkSmartplug/archive/master.zip
Once installed go into settings and enter the ip address for your TP-Link Smartplug device. Adjust additional settings as needed.
- IP
- IP or hostname of plug to control.
- Label
- Label to use for title attribute on hover over button in navbar.
- Icon Class
- Class name from fontawesome to use for icon on button.
- Warning Prompt
- Always warn when checked.
- Warn While Printing
- Will only warn when printer is printing.
- Use Countdown Timers
- Uses the plug's built in countdown timer rule to postpone the power on/off by configured delay in seconds.
- GCODE Trigger
- When checked this will enable the processing of M80 and M81 commands from gcode to power on/off plug. Syntax for gcode command is M80/M81 followed by hostname/ip. For example if your plug is 192.168.1.2 your gcode command would be M80 192.168.1.2
- Added with version 0.9.5 you can now use the custom gcode commands
@TPLINKON
and@TPLINKOFF
followed by the IP address of the plug. This option will only work for plugs with GCODE processing enabled. For example if your plug is 192.168.1.2 your gcode command would be @TPLINKON 192.168.1.2
- Auto Connect
- Automatically connect to printer after plug is powered on.
- Will wait for number of seconds configured in Auto Connect Delay setting prior to attempting connection to printer.
- Auto Disconnect
- Automatically disconnect printer prior to powering off the plug.
- Will wait for number of seconds configured in Auto Disconnect Delay prior to powering off the plug.
- Run System Command After On
- When checked will run system command configured in System Command On setting after a delay in seconds configured in System Command On Delay.
- Run System Command Before Off
- When checked will run system command configured in System Command Off setting after a delay in seconds configured in System Command Off Delay.
I programmed this plugin for fun and do my best effort to support those that have issues with it, please return the favor and support me.