Jump to content

Outdoor Weather Station - Reseting Rain gauge


fmatovic
 Share

Recommended Posts

Hi guys,

I'm trying to implement a daily reset command to be exectured through cron job on raspberry pi (through which the Brick and Outdoor Weather Station Bricklet are connected) for the rain gauge.

 

So... anyone has any idea how to reset the rain gauge through python or any other way except the one removing the batteries and reseting the whole brick etc.?

 

Thanks

Link to comment
Share on other sites

Okay but, just a workaround the total will still remain the same.

Any idea how i can do that in my python script? with API from tinkerforge?

Wihout creating additional column in my db and storing another value each day and then representing it on frontend oldValue - newValue ?

Link to comment
Share on other sites

In the database you can save the global value for each day.

 

When you want to display the value you get the value from last day from the database and the value from today and the difference is the amount of rain from the last 24 hours.

 

You can do the same for the amount of rain for the last 1 hour etc, depending on the frequency with which you save data to the database.

Link to comment
Share on other sites

Yes yes, but that's all done on my DB and Cron jobs. On the other side you can't just send values to DB each 24 hours, cause then you don't have other values like, wind, temp and hum in real time (each 40 sec). So you would have to split the rain with separate script to store its rain. Nvm... seems like CRON job to run each day at midnight and new column in table will have to do it. I was thinking if there was something in the API which could help me trigger the rain gauge to reset or dump its stored data on bricket directlly.

 

Thanks anyway :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...