Support of Winsum ZH03B sensor Dust particle sensor in xsns_18_pms5003.ino - #19850
Merged
Merged
Conversation
The Winsum ZH03B sensor is quite similar to the Plantower PMS3003 sensor. The main difference is the response in passive mode. With these changes xsns_18_pms5003.ino can support the ZH03B sensor when PMS_MODEL_ZH03X is defined in the configuration file.
arendst
reviewed
Oct 27, 2023
arendst
reviewed
Oct 27, 2023
| Pms.valid--; | ||
| if (Settings->pms_wake_interval >= MIN_INTERVAL_PERIOD) { | ||
| PmsSendCmd(CMD_READ_DATA); | ||
| AddLog(LOG_LEVEL_DEBUG_MORE, "ZH03x: Read command issued (2)"); |
arendst
reviewed
Oct 27, 2023
| // wakeup sensor WARMUP_PERIOD before read interval | ||
| Pms.wake_mode = 1; | ||
| PmsSendCmd(CMD_WAKEUP); | ||
| AddLog(LOG_LEVEL_DEBUG_MORE, "ZH03x: Wake up command issued"); |
arendst
reviewed
Oct 27, 2023
| if (Pms.time >= Settings->pms_wake_interval) { | ||
| // sensor is awake and warmed up, set up for reading | ||
| PmsSendCmd(CMD_READ_DATA); | ||
| AddLog(LOG_LEVEL_DEBUG_MORE, "ZH03x: Read command issued (1)"); |
arendst
reviewed
Oct 27, 2023
| return true; | ||
| } | ||
|
|
||
| bool ZH03ReadDataPassive() // process the passive mode response of the ZH03x sensor |
Owner
There was a problem hiding this comment.
Place this function within #ifdef PMS_MODEL_ZH03X
arendst
reviewed
Oct 27, 2023
| * You can either support PMS3003 or PMS5003-7003 at one time. To enable the PMS3003 support | ||
| * you must enable the define PMS_MODEL_PMS3003 on your configuration file. | ||
| * For PMSx003T models that report temperature and humidity define PMS_MODEL_PMS5003T | ||
| * This module can also support de Winsum ZH03x series of dust particle sensors, |
Owner
There was a problem hiding this comment.
It's Winsen. Not Winsum, places in the Netherlands (yes there are more than one)
Contributor
Author
There was a problem hiding this comment.
Done, Thank you for the comments.
Owner
|
Thx. |
Jason2866
added a commit
to Jason2866/Tasmota
that referenced
this pull request
Oct 28, 2023
* Rectified Typos (arendst#19841) * Rectified Typos * Update settings.json * Support of Winsum ZH03B sensor Dust particle sensor in xsns_18_pms5003.ino (arendst#19850) * Update xsns_18_pms5003.ino The Winsum ZH03B sensor is quite similar to the Plantower PMS3003 sensor. The main difference is the response in passive mode. With these changes xsns_18_pms5003.ino can support the ZH03B sensor when PMS_MODEL_ZH03X is defined in the configuration file. * Update xsns_18_pms5003.ino * Update change logs * Update be_lexer.c (arendst#19856) Added check for unterminated block comments * Refactoring of storing safeboot bin (arendst#19858) * Folder for storing safeboot is now configurable * Platform 2023.10.06 * Platform 2023.10.12 --------- Co-authored-by: Dellucifer <84488210+dellucifer@users.noreply.github.com> Co-authored-by: FransOv <57999223+FransOv@users.noreply.github.com> Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com> Co-authored-by: Andreas Ziemer <aziemer@a-z-e.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support of Winsen ZH03B Dust particle sensor in xsns_18_pms5003.ino
Description:
The Winsen ZH03B sensor is quite similar to the Plantower PMS3003 sensor. The main difference is the response in passive mode. With these changes xsns_18_pms5003.ino can support the ZH03B sensor when PMS_MODEL_ZH03X is defined in the configuration file.
Related issue (if applicable): fixes #
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass