Jump to content

Outdoor Weather Station - Reseting Rain gauge


fmatovic

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 zu diesem Kommentar
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 zu diesem Kommentar
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 zu diesem Kommentar
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.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...