-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add Interval to PMS5003 sensor to extend lifetime. #8128
Conversation
Current implementation will break gpio numbering. |
Thanks for the feedback. I'm brand new to Tasmota and am still trying to wrap my head around your gpio numbering methodology and the settings variables. Hope you can provide a bit of guidance with two issues:
|
|
merge latest changes from development
Tested code changes on core with PMS5003 sensor and everything works (should also work for the PMS3003 and PMS7003, but I don't have them to test). The default behavior is current functionality (RX only, read data while sensor is in ACTIVE mode) of continuous sensor readings and only requires the connection of the RX pin. New functionality allows user to set a read interval to prolong the life of the sensor by putting the sensor to sleep between reads. This will require connecting both the RX & TX pins and changing the setting: 30 seconds prior to the read interval (aka the WARMUP period) the sensor will turn on to allow it to warm up and take a reading. The read interval can vary from 60 to 65535 seconds. A read interval less than 60 will default to continuous readings (ie active mode). Hope this is useful for people! |
Add interval to PMS5003 sensor to extend lifetime (#8128)
When teleperiod is different from 10 or 300, the DeepSleep will occur at the 2nd tele period ONe possibility could be to discard the 1st tele, leaving the time for the sensor to warmup, then measure is taken, SENSOR sent and back to sleep.
|
Hi, sorry for the noob question but how do you configure the read interval from the Tasmota web interface? |
You have to open a command line from the web interface (not sure where the menu entry for command line is, look around in menus) and send the command 'Sensor18 <read interval in seconds>' |
Description:
User has option to take readings either continuously (current default) or at WAKEUP intervals of between 60-65535 seconds. If the sensor is set to take reading at intervals, it will be put to sleep and woken up 30 seconds prior to the reading being taken (the WARMUP period), then the reading will be taken and the sensor put back to sleep until 30 seconds prior to the next reading. To use this interval feature, TX pin must be connected. If user only sets up RX pin, the default ACTIVE sensor mode will be used.
NOTE: I used an existing setting variable (mcp230xx_int_timer) for the PMS5003 interval period because I am not familiar enough with the settings variables to create a new variable and update the version scheme properly. Would appreciate advice/help on creating a new uint16_t to hold the wakeup interval in seconds.
Related issue (if applicable): fixes #
Enhancement #8097
Checklist: