TP-Link Smartplug

What is the problem?
I just tried installing the TP-Link plug in and i lack the knowledge to get it up and running. The green lightning bolt shows on my octoprint desktop and when i click it it does cut the power to the smart switch. The lightning bolt , still green now rotates. if i click it again a message comes up asking if i want to cut power?

Basically, the status is just out of sync. Force a refresh of your browser and things should get straightened out.

Still nothing but thank you for your fast response
Ed

I'll need you to enable debug logging, restart octoprint, force a reload of the browser (shift + f5 in chrome) and try again. Then in the login section of octoprint download octoprint.log and plugin_tplinksmartplug_debug.log and check for any errors or post here after removing any personal identifiable information.

I merged your posts so it's easier to read them.

If you want to post a log please upload the whole file or at least use the </> button in the textbox :slight_smile:

:v: :octopus: :v:

Ok, the plugin seems to be getting the information from the plug, and it's showing the smartplug is on. Now we need to see if the browser side is getting any errors. Press F12 to open the developer tools and look for any errors on the console tab during the initial page load, and when you press the button.

1 Like
A cookie associated with a cross-site resource at http://youtube.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
/#temp:1 A cookie associated with a cross-site resource at https://youtube.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
packed_core.js?3514a079:16964 Starting dependency resolution...
packed_core.js?3514a079:17074 ... dependency resolution done
packed_core.js?3514a079:17384 Initial application setup done, connecting to server...
packed_core.js?3514a079:15010 Connected to the server
packed_core.js?3514a079:17349 Finalizing application startup
packed_core.js?3514a079:17224 Going to bind 37 view models...
packed_core.js?3514a079:17277 Did not bind view model UsageViewModel to target #wizard_plugin_tracking since it does not exist
packed_core.js?3514a079:17277 Did not bind view model ThespaghettidetectiveViewModel to target #wizard_plugin_thespaghettidetective since it does not exist
packed_core.js?3514a079:17277 Did not bind view model SoftwareUpdateViewModel to target #softwareupdate_confirmation_dialog since it does not exist
packed_core.js?3514a079:17277 Did not bind view model SoftwareUpdateViewModel to target #wizard_plugin_softwareupdate since it does not exist
packed_core.js?3514a079:3334 User art1st@optonline.net logged in
packed_core.js?3514a079:17316 ... binding done
packed_core.js?3514a079:17328 Application startup complete
/api/plugin/tplinksmartplug:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/sockjs/info?t=1588109870161:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/sockjs/info?t=1588109888703:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/sockjs/info?t=1588109896191:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/sockjs/info?t=1588109906703:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/sockjs/info?t=1588109922736:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
packed_core.js?3514a079:15010 Connected to the server

This looks like you're losing the connection for some reason when making the request to the server for status information.

Do you have any idea how I can resolve this and getting plugin to work?

make this thread great again :wink:

Try enabling the polling option with a low amount of time and restart OctoPrint to see if gets back into sync.

Also, looking at the post you withdrew with the logs, you hadn't restarted OctoPrint yet. The timestamps from octoprint.log were earlier than those shown in the plugin_tplinksmartplug_debug.log.file. At this point, I think we need to move this over to an issue on the repository's tracker here if you continue to have problems..

I just reformatted card , reinstalled octoprint with the tp plugin all seems to work now, thank you for hanging in there with me!

Cool, when in doubt burning it to the ground and rebuilding is definitely an option. Most people aren't willing to do that.