Every full 5 minutes, XX:00 missing? **solved**

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

Moderator: Mattk

Post Reply
droiddk
Senior Boarder
Senior Boarder
Posts: 75
Joined: Sun May 01, 2016 10:55 pm

Every full 5 minutes, XX:00 missing? **solved**

Post by droiddk »

Hello

Testing the Meteobridge with the MySQL-service and I have chosen "Every full 5 minutes" and this is what I see in my database:

10:30
10:35
10:40
10:45
10:50
10:55
11:05
11:10

So 11:00 is missing?

Kind Regards
droiddk
Senior Boarder
Senior Boarder
Posts: 75
Joined: Sun May 01, 2016 10:55 pm

Re: Every full 5 minutes, XX:00 missing?

Post by droiddk »

I just looked at "Live data" and noticed this error I have seen a few time now:

2016-05-02 23:00:01 Error: MYSQL query 'INSERT INTO weatherdata (ID, Time, Sun, Temp, Hum, Uv, Press, Windspeed, Windgust, Winddir, Windchill, Rain_hour, Rain_day, Rain_year, Dewpoint, Evaporation_hour, Evaporation_day, Evaporation_year) VALUES (NULL, '2016-05-02 23:00', 0.0, 9.9, 64.0, 0.0, 1016.9, 1.8, 1.9, 141.0, 9.1, [rain0total-hoursum], 0.0, 0.0, 3.4, 1, 1, 1 )' failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '[rain0total-hoursum], 0.0, 0.0, 3.4, 1, 1, 1 )' at line 1 (no more tries):

"23:00:01" -> gives me the impression that the XX:00 error is related to "[rain0total-hoursum]" in the query:
Meteobrigde tries to get the value of [rain0total-hoursum] but fails and sends "[rain0total-hoursum]" with the query but that will result in a error since the database is looking for a number and not a string.

Maybe?

Is the [rain0total-hoursum:0] the right thing to do?

Kind Regards

My setup is: Davis Vantage Pro2 -> Meteostick-> Meteobridge -> MySQL
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Every full 5 minutes, XX:00 missing?

Post by admin »

Congrats, this is very good analysis of the problem!
When using variables you should always give a default value (indicated by ":").
Which default fits best depends on your application.
droiddk
Senior Boarder
Senior Boarder
Posts: 75
Joined: Sun May 01, 2016 10:55 pm

Re: Every full 5 minutes, XX:00 missing?

Post by droiddk »

admin wrote:Congrats, this is very good analysis of the problem!
When using variables you should always give a default value (indicated by ":").
Which default fits best depends on your application.
Hi, thanks for your reply. It makes sense that the hoursum will make a error when running at XX:00.

Been using the product for some time now and been overall impressed, very stable product. Almost ready to go get the license :)

Regarding the ":" - can the default value be the last recorded value? That would be very smart :D I know there may be some limits when running on the 2030 but last recorded value would be great.

I also had some moments when there was no data inserted in the database but I think I have fixed that by increasing the "tolerated age of data". Test-inserting every 5 minutes and total insert last 24 hour is 279 and 288 is maximum, successrate = 97%.

Kind Regards
Post Reply