time interval - mysql **solved**

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
Marsen
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Sun Jul 06, 2014 11:48 am

time interval - mysql **solved**

Post by Marsen »

Hi,
i have a big problem with the sending data weather to the mysql database. Why the data can't be send on the indicated time (f.e. always on full hour). Now it's sending with set time interval, but when f.e. there's some problems with connection or sending is moved in time etc. it start counting intervals from the new time point. In that case you can't collect data from f.e. full hour. In few days the shifts are enormous.

That thing is crucial in professional usage of weather station and weather data.

Could you do something with that?

Best regards
Marsen
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: time interval - mysql

Post by admin »

Will think about it, but it looks to me as a design flaw when data MUST be delivered at very distinct point in time. When serving multiple targets a timing down to the second is simply not possible. Please also rethink your approach, I am sure there are more tolerant alternatives.
Marsen
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Sun Jul 06, 2014 11:48 am

Re: time interval - mysql

Post by Marsen »

The data don't have to be delivered at very distinct poit of time to the database, but it have to be taken at the distinct point of time. It can be delivered f.e. at 10:12, but it should be data taken at 10:00 (every full hour) and with that timestamp put into the database.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: time interval - mysql

Post by admin »

Meteobridge does not have capacity to hold complete data sets for every minute (for example) and is not able to provide data valid at 10:00 ten minutes later or so. However, I will add a feature that periodical triggering can be done to full hours etc. This will not go down to seconds, but it should be able to trigger the action at the desired minute.

Let me comment that making professional use of weather data works the other way round. The pros distinct between raw data they want to have delivered from the client as often as possible and then do the chunking into time frames they want to make use of by themselves. This needs of course some more understanding about raw data and derived data, but it is the way all weather networks I know of go and it is the far more reliable way instead of dropping down some ad-hoc user requirements 1:1 to the data logging application. Just my experience from the last 7 years dealing with weather data, but your milage may very ;-)
Marsen
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Sun Jul 06, 2014 11:48 am

Re: time interval - mysql

Post by Marsen »

I mean that if i set for example 10 minutes interval it will take and send data on for example 10:10, 10:20, 10:30 etc. or if i will set 15 minutes interval it will send data on 11:15, 11:30, 11:45... not 11:18, 11:33 etc.
and if there will be any problems (like a lack of power), the sending will start again at for example 12:15 (not at 12:13 or 12:21 or whenever etc). I hope now it's clear now. I think it's not so complicated to apply and it will be very helpful.
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 606
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: time interval - mysql

Post by wvdkuil »

Marsen wrote:I mean that if i set for example 10 minutes interval it will take and send data on for example 10:10, 10:20, 10:30 etc. or if i will set 15 minutes interval it will send data on 11:15, 11:30, 11:45... not 11:18, 11:33 etc.
and if there will be any problems (like a lack of power), the sending will start again at for example 12:15 (not at 12:13 or 12:21 or whenever etc). I hope now it's clear now.
The only thing you are asking is to get rid of a problem you have yourself and putting the problem at someone elses desk.
I think it's not so complicated to apply and it will be very helpful.
Exactly, if it is not so complicated, you should program it yourself.
A weatherprograms first task is to intercept the weather sensors data and to process them in meaningfull data. You can then upload that data in near realtime to your data base and then use your DB language to "massage" that data stream in time slots you find meaningfull.

Those "1 hour" or "10 minutes" or "1 hour plus 5 minutes plus 10 seconds" intervals are your idea and your problem at your DB side.

I think that other far more important programming work can be done by Boris, than this idea of yours. But that is my opinion.

In your first post you said:
That thing is crucial in professional usage of weather station and weather data.
Well, as a professional programmer, retired but still active since nearly 40 years, I always try to solve my own problems. Hope you can find the time to do the same.

Wim
Marsen
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Sun Jul 06, 2014 11:48 am

Re: time interval - mysql

Post by Marsen »

It's great that you are a professional programmer, really great, and thanks for all advices, but do you realize that not everyone is a professional programmer? If i could handle this thing on my own i will do that, believe me...

also meteobridge is not a free of charge software...
mjc775
Junior Boarder
Junior Boarder
Posts: 25
Joined: Thu May 22, 2014 10:49 am
Location: Reno, NV USA

Re: time interval - mysql

Post by mjc775 »

From the Release Log:
adds repeating time schedules that align in some respect to full hours, minutes. New defined categories are:
every full 5 minutes
every full 10 minutes
every full 15 minutes
every full half hour
every full hour
every full 2nd hour
every full 3rd hour
every full 6th hour
every full 12th hour
on day change
I was going to suggest if there was a method that I could get my hourly email of current conditions at the top of the hour, rather than 1 hour from the last email.

Thanks for delivering the feature before I had a chance to ask! :D
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: time interval - mysql **solved**

Post by admin »

Just released version does have the requested feature.
Marsen
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Sun Jul 06, 2014 11:48 am

Re: time interval - mysql **solved**

Post by Marsen »

Thanks! I really appreciate that!
Post Reply