Skip to content

Add Tapo Auto Shutdown plugin - #1487

Merged
jneilliii merged 7 commits into
OctoPrint:gh-pagesfrom
SpideRaY:gh-pages
Oct 2, 2026
Merged

jneilliii merged 7 commits into
OctoPrint:gh-pagesfrom
SpideRaY:gh-pages

Conversation

@SpideRaY

Copy link
Copy Markdown
Contributor

Plugin registration
[x] I have read the "Registering a new Plugin" guide.
[x] I want to and am able to maintain the plugin I'm registering, long-term.
[x] I understand why the plugin I'm registering works.
[x] I have read and acknowledge the Code of Conduct.

What is the name of your plugin?

Tapo Auto Shutdown + Obico Delay

What does your plugin do?

The plugin automatically controls a Tapo P110 smart plug to shut down power after a completed print. It also integrates with the Obico OctoPrint plugin to disable AI monitoring when a print starts and re-enable it after a configurable delay if the print is still running. This helps reduce unnecessary Obico AI hour usage during the early stages of a print.

Where can we find the source code of your plugin?

https://github.com/SpideRaY/OctoPrint-TapoAutoShutdown-ObicoDelay

Was any kind of genAI (ChatGPT, Copilot etc) involved in creating this plugin?

Yes. ChatGPT was used to assist with development, debugging and documentation.

Is your plugin commercial in nature?

No. The plugin is free and open source.

Does your plugin rely on some cloud services?

Yes. The Obico integration communicates with the Obico service through the installed Obico OctoPrint plugin. The Tapo P110 itself is accessed on the user's local network.

Further notes

A privacy policy is included in the plugin repository:

https://github.com/SpideRaY/OctoPrint-TapoAutoShutdown-ObicoDelay/blob/main/PRIVACY.md

This file introduces the Tapo Auto Shutdown plugin, detailing its functionality and requirements for integration with OctoPrint and Obico AI monitoring.
@jneilliii

Copy link
Copy Markdown
Contributor

nice, my tplinksmartplug plugin has tapo support in the release candidate version, but I was waiting on pyathon-kasa to fix the new authentication mechanism before releasing a stable version.

fix build errors and we can review. quick look and I think it's because you have authors section commented out, and I think the attributes have to be list items (preceded by a "-" character). recommend looking at other plugin's md file as examples.

@SpideRaY SpideRaY left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requested YAML formatting changes have been made and the validation now passes. Thanks

@jneilliii jneilliii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR just needs the archive URL to not be a direct version download. Otherwise, when you implement #1 below you will instantly get an update available on future version releases without updating the archive URL in plugin manager every time. By updating to generic download link you won't have to update the plugin listing on future version updates.

Things that need to be addressed in your plugin code:

  1. Add octoprint.plugin.softwareupdate.check_config. It will require some changes to how you're implementing the plugin, see an example block of code here from my go2rtc plugin.
  2. Running the plugin through octoscanner it identified the need for implementing is_template_autoescaped(), see this FAQ: https://faq.octoprint.org/plugin-autoescape
  3. Your plugin is using older setup methods, please update to using more modern pyproject.toml packaging. There is a tool to help you make that transition, more details here: https://docs.octoprint.org/en/main/plugins/pyproject_toml_migration.html

Comment thread _plugins/tapoautoshutdown.md Resolved
Updated archive link to point to the main branch zip.
@SpideRaY

Copy link
Copy Markdown
Contributor Author

Hi, I’ve now addressed the requested changes:

  • added softwareupdate.check_config
  • added is_template_autoescaped()
  • migrated to modern pyproject.toml packaging
  • updated the archive URL to the generic download

All PR checks are now passing. Thanks for the review.

@SpideRaY
SpideRaY requested a review from jneilliii September 27, 2026 11:44

@jneilliii jneilliii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your setup.py still contains all the older information. I'm not sure if this will create an issue or not, but definitely adds a 3rd level of complexity when your plugin version updates. As it stands now, you would have to bump the version here, here, and here.

Personally, for easier maintenance, I would remove that line from init.py, and update your setup.py and pyproject.toml to be how a plugin created with the cookiecutter template would generate. This will make the plugin more compatible with older setuptools versions in the wild.

setup.py

import setuptools

# we define the license string like this to be backwards compatible to setuptools<77
setuptools.setup(license="MIT")

pyproject.toml (make sure to replace the email field in authors)

[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "OctoPrint-TapoAutoShutdown"
version = "0.2.0"
description = "Automatically control a Tapo P110 and manage Obico AI monitoring around your prints."
authors = [
    {name = "SpideRaY", email = "you@example.com"}
]
readme = {file = "README.md", content-type = "text/markdown"}
dynamic = [
    "license"
]

requires-python = ">=3.7, <4"

# any additional requirements (besides OctoPrint) should be listed here
dependencies = [
    "tapo>=0.9.0",
]

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
include = [
    "octoprint_tapoautoshutdown",
    "octoprint_tapoautoshutdown.*"
]

[project.entry-points."octoprint.plugin"]
tapoautoshutdown = "octoprint_tapoautoshutdown"

[project.urls]
Homepage = "https://github.com/SpideRaY/OctoPrint-TapoAutoShutdown-ObicoDelay"

[project.optional-dependencies]
develop = [
    "go-task-bin"
]

Comment thread _plugins/tapoautoshutdown.md Resolved
@jneilliii
jneilliii merged commit 2d07a18 into OctoPrint:gh-pages Oct 2, 2026
@SpideRaY

Copy link
Copy Markdown
Contributor Author

Hi, thanks again for merging the original plugin listing.

I’ve released version 0.3.0 of Tapo Auto Shutdown. The official listing now advertises v0.3.0, but the installation URL still points to main.zip, which installs the code from the main branch rather than the intended version.

Official plugin listing:
https://github.com/OctoPrint/plugins.octoprint.org/blob/gh-pages/_plugins/tapoautoshutdown.md

Plugin source repository:
https://github.com/SpideRaY/OctoPrint-TapoAutoShutdown-ObicoDelay

Current installation URL (main branch):
https://github.com/SpideRaY/OctoPrint-TapoAutoShutdown-ObicoDelay/archive/main.zip

Version 0.3.0 branch:
https://github.com/SpideRaY/OctoPrint-TapoAutoShutdown-ObicoDelay/archive/refs/heads/v0.3.0.zip

Could the listing’s installation URL be updated to point to the v0.3.0 branch, so users install the version advertised?

Thanks for your help!

@jacopotediosi

Copy link
Copy Markdown
Member

@SpideRaY if you merge your 0.3.0 branch to main and publish a github release from the main branch, then your users will receive an update notification. The listing URL is only for the first installation, then updates are handled by the configuration in your get_update_information function.

@SpideRaY

Copy link
Copy Markdown
Contributor Author

Cheers all done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants