-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unreliably identifying the SPS30 sensor #25
Comments
Hi @oylern Thanks for the bug report. It will take me some days to come up with a patch, but here is what I figured out from your debug output. I do not have this sensor, so I wrote the module from the examples on the datasheet.
which can be seen on the rejected messages. |
I think that the last commits should solve the problem. pip install pypms-0.6.1.tar.gz |
Thanks for the super fast efforts on this! I loaded this version on my system and it seems to be catching the new error messages, but also throwing other errors sometimes:
|
Turned off debug again and got another interesting output:
|
sorry, I left some of the debug prints |
was not catching exceptions raised by the "short messages" on |
you should be able install this version with straight from github with
|
Looks like that branch (or tag) was deleted? pip tried anyway and hit a dependency error. I eventually went back to the standard install command, which looks like it recognizes 0.6.1 is available, but same output:
|
It looks like pip did not install the version from github, most likely because it has the same version number that the one I asked to install earlier. I hope this command works. pip install --force-reinstall git+https://github.com/avaldebe/PyPMS.git@54f5fe4 PS: sorry for the inconvenience |
No worries at all! Thank you for working on the fix. :) I ran into the same problem as before initially, uninstalled pypms, but then still couldn't install it again. Turns out I needed to upgrade pip to a newer version than what was shipped with Raspbian (
|
Hi @oylern I'm glad the fix worked. Would you be so kind to contribute the output of the following command?
|
Happy to. Here you go-
|
When running the
pms
command, it seems to have trouble reliably identifying my SPS30 sensor. I can run it back to back a few times until the sensor is identified correctly and gives me readings. Here is example where it failed twice and worked the third time:Here is another time it errored where the initial response from the sensor was much shorter:
I should be able to work around this by capturing the error and looping the command until I get some kind of expected results, but maybe the SPS30 has been updated and has some new identifiers? I do see the buffer length was 54 when it worked vs the 55 and 14 seen previously. No idea what might be going on.
Hardware: Raspberry Pi model B rev 2
OS: Raspbian GNU/Linux 10 (buster)
SPS30: attached to UART interface on pi (serial RX/TX, pins 8 and 10) and +5v and ground
The text was updated successfully, but these errors were encountered: