-
Notifications
You must be signed in to change notification settings - Fork 4
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
rainmeter.cpp is wrong #14
Comments
Hi, could someone give information how to reset the stored rain value after sending the MQTT string? |
Hi Pakl8, this is going to be a bit tricky. The architecture has no direct path back to the value generating units. One way would be to extend the "Sensor channels" that can be found inside the station and build one that will, if read, reset the value. Also note that the Rainmeter is an Object so a direct access to it with external may be a way with some helper functions inside the .ino code file. I try to get some time to implement it and also fix the other bugs that are currently left....... Regards Mathias Claußen |
Hi,
Thanks for your reply. Let me explain this request.
If you send out information to a time driven destination the stored information needs to be reset after sending.
I am not familiar with thinkspeak or sensebox and how the information is processed when received.
But lets try to explain it through an example, let say the rainfall is constant during a given time.
In the first minute you send out the collected rainfall, in the next minute you sent out the collected rainfall of the previous minute and the elapsed minute.
If you look to the destination the graph it goes up, which should be horizontal. When the rainfall stops it still send the previous collected amount of rain.
[cid:image002.png@01D6BE7F.A703DAA0]
I did tried to get the stored buffer cleared, but I do understand why my attempts where not successfull.
I have added the INA260 sensor, which was easy because of how the SW is setup, so thank you for that.
But also found out that it matters where you add additional measurementvaluestype in the public DataUnits as the order influences the webpage.
MQTT, to Raspberry PI, processed by nodeRed, stored in influxdb and presented by grafana.
Regards,
Paul
Van: lab-mathias-claussen<mailto:notifications@github.com>
Verzonden: donderdag 19 november 2020 10:16
Aan: ElektorLabs/191148-RemakeWeatherStation<mailto:191148-RemakeWeatherStation@noreply.github.com>
CC: Pakl8<mailto:paul.klop@hotmail.com>; Comment<mailto:comment@noreply.github.com>
Onderwerp: Re: [ElektorLabs/191148-RemakeWeatherStation] rainmeter.cpp is wrong (#14)
Hi Pakl8,
this is going to be a bit tricky. The architecture has no direct path back to the value generating units. One way would be to extend the "Sensor channels" that can be found inside the station and build one that will, if read, reset the value. Also note that the Rainmeter is an Object so a direct access to it with external may be a way with some helper functions inside the .ino code file.
I try to get some time to implement it and also fix the other bugs that are currently left.......
Regards
Mathias Claußen
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#14 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALGPY6RHEP5PJRZSLUHJ7FDSQTO7XANCNFSM4SB5GFTA>.
|
Hi Pakl8, i would suggest i add a accumulating "Sensor" to the weater station as seperate channel ( or channels ) that can be mapped to what ever datasink you have. Best Regards Mathias Claußen |
Hi Pak8 , Hi t3hoe, changes have been made and submitted to the Dev branch. After succsessful test this will be merged back to master branch. A new internel sensor for the accumulated rain amount has been added and will be reset once read. Not ideal but a fast solution for the moment. For a full acknolage based transmission some changes in the architecture are requiered. |
Hello again,
the rainmeter.cpp Version 1.5 provides incorrect values, accept the 24h amount.
The determination of the values from the array is wrong. When you write into the array foreward, you must read backward for calculating e.g. the last hour (see line 118 to 125).
My way to do this is:
for(uint8_t i=0;i<valuecount;i++){
if (startidx > 0){
startidx--;
} else{
startidx = ( sizeof( RainAmount24h ) / sizeof( RainAmount24h[0] ) ) - 1;// 1st index is 0!!!
}
rainpulses+= RainAmount24h[startidx];
}
Regards
The text was updated successfully, but these errors were encountered: