Yea, I figured I could do this with a mysql query, but was hoping to get it 
into the database structure so I can run simple queries based on the 
numbers already being calculated as a field, as this is an important number 
to see for me in the db itself.

If I alter the table and add syntax to the table, I believe this will mess 
up the insert functionality from weewx, correct?

On Tuesday, January 1, 2019 at 3:31:04 AM UTC-5, mwall wrote:
>
> On Monday, December 31, 2018 at 12:50:45 PM UTC-5, bdf0506 wrote:
>>
>> I am looking to add information into my archive database that will show 
>> rainfall over the last 24 hours.
>>
>> Today, I have the influxdb extension, and when I look in the influxdb, I 
>> see a measurement for "rain24_in". I would like for this to also appear 
>> within the mysql DB that I am using. I currently have "rain" and "rainRate" 
>> in mysql DB, but nothing about 24hour rainfall.
>>
>> How can I accomplish this?
>>
>
> you already have it.
>
> SELECT SUM(rain), MIN(usUnits), MAX(usUnits) FROM archive WHERE dateTime>X 
> and dateTime<=Y
>
> where Y is the current time (as epoch) and X=Y-24*3600
>
> the rain24_in the influx packets is simply the value returned from that 
> query.
>
> m
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to