Skip to content

Add OctoPrint-PlotlyGraph-LYWSD03MMC plugin entry (#1)#1416

Open
yutaka551 wants to merge 3 commits intoOctoPrint:gh-pagesfrom
yutaka551:gh-pages
Open

Add OctoPrint-PlotlyGraph-LYWSD03MMC plugin entry (#1)#1416
yutaka551 wants to merge 3 commits intoOctoPrint:gh-pagesfrom
yutaka551:gh-pages

Conversation

@yutaka551
Copy link

@yutaka551 yutaka551 commented Feb 22, 2026

  • Add LYWSD03MMC Plugin for PlotlyTempGraph entry
  • You have read the "Registering a new Plugin" guide.
  • You want to and are able to maintain the plugin you are registering, long-term.
  • You understand why the plugin you are registering works.
  • You have read and acknowledge the Code of Conduct.

What is the name of your plugin?

LYWSD03MMC Plugin for PlotlyTempGraph

What does your plugin do?

This plugin integrates Xiaomi LYWSD03MMC Bluetooth temperature and humidity sensors with OctoPrint, providing real-time environmental data visualization using Plotly graphs. It allows users to monitor temperature and humidity near their 3D printer directly from the OctoPrint interface.

Where can we find the source code of your plugin?

https://github.com/yutaka551/lywsd03mmc-plugin-for-plotly-temp-graph

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

Yes, GitHub Copilot were used to assist with code generation and documentation.

Is your plugin commercial in nature?

No, this plugin is open-source and not commercial.

Does your plugin rely on some cloud services?

No, the plugin operates locally and does not depend on any cloud services.

Further notes

None

* Add OctoPrint-PlotlyGraph-LYWSD03MMC plugin entry
Copilot AI review requested due to automatic review settings February 22, 2026 07:03

This comment was marked as off-topic.

@jacopotediosi
Copy link
Contributor

@yutaka551 Can you please fill the PR template?

@jneilliii
Copy link
Contributor

jneilliii commented Feb 22, 2026

I can tell what it is because it integrates with my PlotlyTempGraph plugin (obviously copilot is involved). The functionality I can tell will work purely based on the programming logic, but there are issues with plugin:

  • importing the library every time it goes to read the sensor here rather than just a simple import with the rest at top to initialize on load. the module is defined in plugin_requires so no need for the whole try/catch block for the ImportError here
  • software update here return doesn't match plugin identifier defined here.
  • missing plugin author email
  • using old setup.py method rather than newer pyproject.toml used in current cookiecutter template
  • not actually an issue, but version defined here and in setup.py, make sure to update both places in future updates or it will cause update loops.
  • do you even need the AssetPlugin if you're not actually returning anything, this whole block could be removed and this line.

@yutaka551
Copy link
Author

Thank you very much for your thorough review and comments. You are absolutely right, and I will make the
necessary changes. I learned a great deal—thank you again.

@foosel
Copy link
Member

foosel commented Mar 7, 2026

To once more repeat the request made earlier: please fill in the PR template.

And speak to us directly and not through some AI please. If you are worried about your English, by all means use a translation tool like Google Translate or DeepL to help you, but don't make us feel like we are talking to ChatGPT.

@yutaka551
Copy link
Author

I have made the following changes. Please review them.

Revised the setup method to use pyproject.toml. Accordingly, setup.py has been removed.
Modified the code to perform imports at the beginning.
Updated the plugin name and repository URL.

@yutaka551
Copy link
Author

I misunderstood about checking the PR template.
I apologize for not fully understanding it.

I have filled out the PR template at the top of this pull request.
I also reviewed the source code step by step while learning, and reflected the points you mentioned.

I am sorry for the trouble, but I kindly ask you to review it.
Thank you very much for your thorough and helpful feedback.

Copy link
Contributor

@jneilliii jneilliii left a comment

Choose a reason for hiding this comment

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

Please see comments.

---
layout: plugin

id: OctoPrint-LYWSD03MMC-Plugin-for-PlotlyTempGraph
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this id is wrong, should be lywsd03mmc_plugin_for_plotly_temp_graph to match the entry point https://github.com/yutaka551/lywsd03mmc-plugin-for-plotly-temp-graph/blob/main/pyproject.toml#L26

layout: plugin

id: OctoPrint-LYWSD03MMC-Plugin-for-PlotlyTempGraph
title: OctoPrint-LYWSD03MMC-Plugin-for-PlotlyTempGraph
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to change this to match your plugin's display name?

LYWSD03MMC Plugin for PlotlyTempGraph


---

# OctoPrint-PlotlyGraph-LYWSD03MMC
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to update this to match your readme?

LYWSD03MMC Plugin for PlotlyTempGraph

compatibility:
octoprint:
- 1.3.6
python: ">=3,<4"
Copy link
Contributor

Choose a reason for hiding this comment

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

should match pyproject.toml.

  python: ">=3.7,<4"

@github-project-automation github-project-automation bot moved this to In Progress in OctoPrint Backlog Mar 8, 2026
@jneilliii
Copy link
Contributor

jneilliii commented Mar 8, 2026

One other thing I noticed after installing in OctoPrint is a restart wasn't triggered, only a reload. I believe this is due to the removal of the asset plugin mixin. As a result you should add the RestartNeeding plugin mixin otherwise the server won't be restarted and your plugin code won't run.

class Lywsd03mmcPluginForPlotlyTempGraph(
    octoprint.plugin.SettingsPlugin,
    octoprint.plugin.TemplatePlugin,
    octoprint.plugin.StartupPlugin,
    octoprint.plugin.RestartNeedingPlugin
):

@jacopotediosi
Copy link
Contributor

Besides the observations Jim already noted above, I also took a look and didn't find anything else to flag

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

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

6 participants