[Idea] Air Quality / Health Impact Plugin - HELP WANTED!

There'll be nothing in that, it's all in the develop branch

I also tried installing that but when it installs there is a pop-up that says "Plugin management log, Installed Unknown" Then it doesn't show up in the list of plugins in the plugin manager and there is still no settings menu.

with that error, check octoprint.log. Typically it's related to a missing dependency.

In the log it says "ModuleNotFoundError: No module named 'plantower'" but if I do "pip list" on my raspberry pi it shows up in the list. Am I missing something else? I have attached the most recent log file.
octoprint3.log (56.6 KB)

you need to make sure it's installed inside the venv of OctoPrint. Typically that's ~/oprint/bin/ on a standard octopi image, so running the command ~/oprint/bin/pip install plantower should do the trick.

@stringsonfire if that is dependency it should be added to the plugin_requires list in setup.py.

That fixed it, thank you!

Now I got the settings menu to show up and can add my sensor (PMS5003) through the serial port /dev/ttyUSB0 but whenever I restart Octoprint it removes any sensors that I configure in settings. Is that supposed to happen? Also, how do I know it is actually reading data from the sensor and putting it into the air_quality.db?

You'll need to set this up and run it like a developer, as it's not production-ready. Docs and tutorial here will help you get started. Then you'll be able to see in detail what the plugin is doing - as I have it logging all actions to the console.

I'll try to find some time to add a proper readme to make it easier to jump in, though I'm on holiday soon and then moving house, so it might take me a while. The code is very well commented though, last I remember, so understanding how it works should be relatively easy.

I have no idea where that plantower requirement is coming from, I used the PyPMS library, and searching my repo for "plantower" comes back empty :confused: could be a dependency of a dependency that wasn't required when I last worked on this?

it's imported here.

Good spot, thanks! GitHub Repo search was coming up empty weirdly. I'll remove that when I next set it up locally.

search doesn't search non-default branches.

I have set up the developer environment for Octoprint on my raspberry pi based on the tutorial. In the terminal, it says that there is no device available even though the sensor is plugged in and I added the sensor to the list of devices. Am I missing something? Thanks in advance!

Hmm - I wonder if the way Octoprint detects/reserves the printer port has changed? I had to work around that a while ago, but that was a good view Octoprint versions ago. Not something I can investigate yet, but I'll start with that when I can.

This issue ended up being related to the test database here. After manually adding my sensor there I was able to get it to read from the sensor and write into the .db file.

I attempted to get the data to graph using Plotly, using TPLingSmartplug as a reference but have been unsuccessful. I added code here, here, and here in an attempt to get the data to graph. Does anyone have any idea what I might be missing?