Skip to content
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

Enable pre-heat for PMSx003 sensors #35

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

benthorner
Copy link
Contributor

The PMSA003 sensor takes approximately 10 seconds to warm up, with
InconsistentObservation and WrongMessageFormat exceptions raised
for earlier samples. From experimentation, 10 seconds is almost exactly
the warm up time, but the datasheet actually recommends 30s 1:

Stable data should be got at least 30 seconds after the sensor wakeup from the sleep mode because of the fan’s performance.

However, it makes sense to set this number based on what happens in
practice; we can always increase if others observe worse behaviour.

Footnotes

  1. https://cdn.shopify.com/s/files/1/0176/3274/files/PMSA003_datasheet.pdf?v=1619703

@@ -13,6 +13,7 @@

ALIASES = ("PMS1003", "G1", "PMS5003", "G5", "PMS7003", "G7", "PMSA003", "G10")

PREHEAT = 10 # 10 seconds
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this observation is only for PMSA003, would it make more sense to create a pmsa003.py module to keep the change isolated to that sensor?

Copy link
Owner

Choose a reason for hiding this comment

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

It might be mentioned only on the PMSA003, but it seems to me that this should affect all Plantower sensors that support sleep/wake commands.

The PMSA003 sensor takes approximately 10 seconds to warm up, with
InconsistentObservation and WrongMessageFormat exceptions raised for
earlier samples. From experimentation, 10 seconds is almost exactly
the warm up time, but the datasheet actually recommends 30s [^1]:

    Stable data should be got at least 30 seconds after the sensor wakeup from the sleep mode because of the fan’s performance.

However, it makes sense to set this number based on what happens in
practice; we can always increase if others observe worse behaviour.

[^1]: https://cdn.shopify.com/s/files/1/0176/3274/files/PMSA003_datasheet.pdf?v=1619703
@benthorner
Copy link
Contributor Author

Hi @avaldebe, just one last PR from me.

It's fairly optional from my perspective, but I thought you'd be interested in the behaviour of this sensor, at least.

@avaldebe avaldebe added the enhancement New feature or request label Dec 7, 2022
Copy link
Owner

@avaldebe avaldebe left a comment

Choose a reason for hiding this comment

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

Thanks for this and your previous PRs, and thanks for your patience dealing with my pickiness.

@avaldebe avaldebe merged commit edd8325 into avaldebe:master Dec 7, 2022
@benthorner benthorner deleted the pmsx003-preheat branch December 7, 2022 22:33
benthorner added a commit to benthorner/snsary that referenced this pull request Dec 7, 2022
This is a viable replacement for PMSx003 sensors since [^1]. It
makes sense to embed warm up knowledge in the PyPMS repository,
rather than pushing the warm up time decision forward.

[^1]: avaldebe/PyPMS#35
@benthorner
Copy link
Contributor Author

Thanks Alvaro 🙂

benthorner added a commit to benthorner/snsary that referenced this pull request Dec 9, 2022
This is a viable replacement for PMSx003 sensors since [^1]. It
makes sense to embed warm up knowledge in the PyPMS repository,
rather than pushing the warm up time decision forward.

[^1]: avaldebe/PyPMS#35
benthorner added a commit to benthorner/snsary that referenced this pull request Dec 9, 2022
This is a viable replacement for PMSx003 sensors since [^1]. It
makes sense to embed warm up knowledge in the PyPMS repository,
rather than pushing this one bit of implementation to consumers.

[^1]: avaldebe/PyPMS#35
benthorner added a commit to benthorner/snsary that referenced this pull request Dec 9, 2022
This is a viable replacement for PMSx003 sensors since [^1]. It
makes sense to embed warm up knowledge in the PyPMS repository,
rather than pushing this one bit of implementation to consumers.

[^1]: avaldebe/PyPMS#35
@benthorner
Copy link
Contributor Author

@avaldebe sorry to bother you again. Could you take a look at this: #37 ? It's the last thing on my todo list 🙂.

@avaldebe
Copy link
Owner

avaldebe commented Jan 3, 2023

just came fro holidays, will deal with this today/tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants