Repository navigation
Add Tapo Auto Shutdown plugin - #1487
Conversation
This file introduces the Tapo Auto Shutdown plugin, detailing its functionality and requirements for integration with OctoPrint and Obico AI monitoring.
|
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
left a comment
There was a problem hiding this comment.
The requested YAML formatting changes have been made and the validation now passes. Thanks
jneilliii
left a comment
There was a problem hiding this comment.
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:
- 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.
- Running the plugin through octoscanner it identified the need for implementing
is_template_autoescaped(), see this FAQ: https://faq.octoprint.org/plugin-autoescape - 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
Updated archive link to point to the main branch zip.
|
Hi, I’ve now addressed the requested changes:
All PR checks are now passing. Thanks for the review. |
jneilliii
left a comment
There was a problem hiding this comment.
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"
]
|
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: Plugin source repository: Current installation URL (main branch): Version 0.3.0 branch: 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! |
|
@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 |
|
Cheers all done. |
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