-
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
Enhancement: Nova Fitness SDS011 Dust sensor implement working period command #3724
Comments
@edelstahlratte |
Yes, I read it and the sensor is working fine, but the 'working period' command would give the sensor a longer lifespan... |
Maybe you can help: I added some code to tasmota but I'm flying blind here... e.g. in the xns_20_novasds.ino:
I call the function in NovaSdsInit(); But it does not have any effect... Maybe the CRC wrong? Is the send command right? Don't know... How to get some output to the webconsole? Thank you. |
I'm making progress: The checksum was wrong:
The sensor will be active for 30 seconds every 5 Minutes... But I have to understand Tasmota better to really integrate it... Digging further... |
You might want to check out this PR |
You are totally right! But the changes are not merged into the development tree... That's why I didn't find them in the code... My approach was a litttle different but it achieves the same thing... At least I have learnt more about tasmota and C++ in general :) |
Will the changes from #2841 be merged into development? |
Please, ask Theo. @arendst |
Have to look at it. The way it is done currently will upset people as their GPIOs will change.... |
Could you please specify further? You mean bécause of the new |
The additional GPIO define will shift all GPIOs below one position down resulting in changed GPIO definitions. |
Thank you, that clarifies a lot... |
Would it be a solution for the GPIO Problem to hardcode the |
Yeah, also a good idea. I'll focus on a solution like I use for the modules. I'll investigate a sorted list. Once done will pick this up. |
you integrated the changes from #2841. Thank you! Should I send a pull request for my solution as well? |
If your solution presents last valid data when asked then I'm not sure if it will work out. The rule implementation queries all sensor within 2 seconds for their latest information. For some sensors I use a local storage location which is then being updated by the sensor driver in 1 minute or 5 minutes or even every 10 seconds depending on it's expected change. The driver then provides the data in the storage to the rule handler. I forsee in that case that the SDS011 will never go to sleep. On the other hand if the current implementation relies on the sleep command then that's not good either. I never use sleep so in my case the sensor would not go to sleep. I propose a solution where the sensor goes to sleep on it's own timer (preferable initiated by an amount of FUNC_EVERY_SECOND) and just stores it's values in a local storage for every software user to query at will. |
The last measurement is saved in the SDS011. So when queried it presents the saved data without waking up... It only wakes up to the specified 'working period' interval and saves the new measuremet internal... I have it running since 2 days without problems... |
That's very useful! Well if you can make a working PR and try to support this specific solution I will replace the current driver with yours. |
It's only a quite small change in the novasds.ino, because all the |
It's released just now. |
Because the sensor has a limited lifespan of abt. 8000 hours ist would be nice to have the 'working period' command implemented.
Working period means that in a given timeframe the sensor is only active for 30 seconds and goes to sleep after that.
I'm not a C++ programmer, so it is very hard for me to do it on my own :(
The SDS Control Protocol Specification states the following:
So it looks that you only have to send these 19 bytes to set the feature on the SDS011.
Maybe someone can evaluate if it's possible to use that feature in tasmota.
Thank you.
The text was updated successfully, but these errors were encountered: