PSU Control - TPLink Setup

I am having difficulty setting this up for my tp link Hs103 smart plug. I do have one for the printer and one for Octopi. I installed the plugin and entered the ip address of my Octopi controlled smart plug but nothing happens. I don't get any other options. What am I doing wrong? Thank you in advance.

Did you install PSUControl?

Thanks for your response. Yes I did.

So In PSUControl you should select Plugin for Switching and Sensing then select PSUControl - TPLink. Should work then.

That worked thank you so much!

Hoorah! :partying_face:

1 Like

I'm having the same issue. I have gone in and selected PSUControl - TPLink, however, when I attempt to connect to the printer, it does not power on the printer.

What do the logs say? Look for lines with psucontrol.

2021-05-20 12:49:58,300 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #2 with timeout 2.0s
2021-05-20 12:49:58,306 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-05-20 12:50:00,309 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #3 with timeout 2.0s
2021-05-20 12:50:00,315 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-05-20 12:50:02,318 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyACM0, baudrate 230400
2021-05-20 12:50:02,321 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-05-20 12:50:02,327 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-05-20 12:50:04,330 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #2 with timeout 2.0s
2021-05-20 12:50:04,335 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-05-20 12:50:06,338 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #3 with timeout 2.0s
2021-05-20 12:50:06,344 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-05-20 12:50:08,347 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyACM0, baudrate 57600
2021-05-20 12:50:08,348 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-05-20 12:50:08,355 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-05-20 12:50:10,360 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #2 with timeout 2.0s
2021-05-20 12:50:10,367 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-05-20 12:50:12,370 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #3 with timeout 2.0s
2021-05-20 12:50:12,376 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-05-20 12:50:14,378 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyACM0, baudrate 38400
2021-05-20 12:50:14,380 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-05-20 12:50:14,386 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0

Basically unable to make a handshake/connection with the printer that is currently powered off. Makes sense why it wouldn't. However, this is where the plugin should come into play.....

So currently the plugin won't turn on power when pressing connect. It should turn on when pressing the lightning bolt :zap: icon or when sending a job if the relevant options are on. Theres an option to connect when turning on power. Should achieve the same result.

Where are you seeing that Icon? I hit the "connection" and it attempts but doesn't turn anything on. I have the "power on when connect" tab checked.

2021-05-20 18:24:17,133 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Opening serial connection"
2021-05-20 18:24:17,134 - octoprint.util.comm - INFO - Connecting to port /dev/ttyACM0, baudrate 115200
2021-05-20 18:24:17,157 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial connection" to "Connecting"
2021-05-20 18:24:17,161 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-05-20 18:24:29,188 - octoprint.plugins.camerasettings - INFO - Excluding camera bcm2835-isp-capture0 based on ^bcm2835-isp-\w+
2021-05-20 18:24:29,190 - octoprint.plugins.camerasettings - INFO - Excluding camera bcm2835-codec-isp based on ^bcm2835-codec-\w+
2021-05-20 18:24:29,191 - octoprint.plugins.camerasettings - INFO - Excluding camera bcm2835-codec-decode based on ^bcm2835-codec-\w+$
2021-05-20 18:24:29,192 - octoprint.plugins.camerasettings - INFO - Excluding camera bcm2835-isp-capture1 based on ^bcm2835-isp-\w+
2021-05-20 18:24:29,194 - octoprint.plugins.camerasettings - INFO - Excluding camera bcm2835-isp-output0 based on ^bcm2835-isp-\w+
2021-05-20 18:24:29,195 - octoprint.plugins.camerasettings - INFO - Excluding camera bcm2835-codec-encode based on ^bcm2835-codec-\w+
2021-05-20 18:24:29,228 - octoprint.plugins.camerasettings - INFO - Excluding camera bcm2835-isp-stats2 based on ^bcm2835-isp-\w+

There is no "power on when connect" but there is a "connect when powered on".

If you're still having trouble after looking at those links then follow Troubleshooting · kantlivelong/OctoPrint-PSUControl Wiki · GitHub while also including a screenshot or video.

Where am I going wrong? After reading the wiki from the links my settings are:

Switching Method - Plugin
Switching Plugin - PSU Control - TPLink
Sensing Method - Plugin
Sensing Plugin - PSU Control - TPLink
Polling Interval - 5 sec
**Automatically turn PSU ON
Trigger Commands
G0,G1,G2,G3,G10,G11,G28,G29,G32,M104,M106,M109,M140,M190,M80
Post On Delay - 0 sec
**Connect when powered on.
**Automatically turn PSU OFF when idle
Idle Timeout - 10 min
Ignore Commands - M105
Wait For Temperature - 50°C

I've attempted all the different sensing options with no luck.

It doesn't turn on automatically. You will have to turn the PSU on manually using the icon, then connect.

I'll probably be adding this on connect event monitoring to my TPLinkSmartplug plugin the way I have added it to the Tasmota plugin.