Extreme Block 1970

Post Reply
Saszalez
Observer
Observer
Posts: 17
Joined: Thu Feb 24, 2022 1:51 pm
Station model: Davis Vantage Pro 2
Software: WeatherLink

Extreme Block 1970

Post by Saszalez » Mon Mar 28, 2022 11:20 am

Hello. I have installed the "Extremes Block", and when looking at the list, the first minimum value of any of the variables is 0, registered on January 1, 1970. There is no value for that date; it is always 0. How can it be corrected?
Attachments
Captura de pantalla 2022-03-28 a las 12.13.40.png
Captura de pantalla 2022-03-28 a las 12.13.40.png (23.76 KiB) Viewed 5161 times
Image

davidefa
Expert
Expert
Posts: 888
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Extreme Block 1970

Post by davidefa » Mon Mar 28, 2022 12:49 pm

You can remove this erroneous data ( via the meteotemplate control panel ) database -> edit data and database -> edit data extra sensors, remove any data of 01/01/1970 ( it should be only one ).
If you have several of these wrong data it could be faster to remove them via phpmyadmin ( accessibkle via your hosting provider's control panel )
Image

Saszalez
Observer
Observer
Posts: 17
Joined: Thu Feb 24, 2022 1:51 pm
Station model: Davis Vantage Pro 2
Software: WeatherLink

Re: Extreme Block 1970

Post by Saszalez » Mon Mar 28, 2022 6:14 pm

I have looked where you have told me, and there is no data. Therefore, I cannot delete anything.
Image

davidefa
Expert
Expert
Posts: 888
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Extreme Block 1970

Post by davidefa » Mon Mar 28, 2022 9:17 pm

I see.
To pinpoint the problem you can try executing the following query ( in phpmyadmin ):

Code: Select all

SELECT DayAvg, DATETIME
			FROM (
				SELECT DATETIME, AVG(T) AS DayAvg
				FROM alldata
				GROUP BY YEAR(DATETIME), MONTH(DATETIME), DAY(DATETIME)
				ORDER BY DATETIME
			) AS DailyMaxTable
			ORDER BY DayAvg
			LIMIT 10
This is the same query that is executed to retrieve minimum average temperature:

extremes01.png
extremes01.png (26.66 KiB) Viewed 5145 times
Image

Saszalez
Observer
Observer
Posts: 17
Joined: Thu Feb 24, 2022 1:51 pm
Station model: Davis Vantage Pro 2
Software: WeatherLink

Re: Extreme Block 1970

Post by Saszalez » Mon Mar 28, 2022 10:26 pm

If I run the code I get the following:
Attachments
Captura de pantalla 2022-03-28 a las 23.25.41.png
Captura de pantalla 2022-03-28 a las 23.25.41.png (37.19 KiB) Viewed 5142 times
Image

davidefa
Expert
Expert
Posts: 888
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Extreme Block 1970

Post by davidefa » Tue Mar 29, 2022 9:28 am

I'd say you have a record on 1970-01-01
This query ( in phpmyadmin ) should return exactly 1 result:

Code: Select all

SELECT * FROM `alldata` WHERE DateTime <= '2020-01-01 00:00:00'
And this query should delete it:

Code: Select all

DELETE FROM `alldata` WHERE DateTime <= '2020-01-01 00:00:00'
P.S.
Is always a good idea to make a backup of the database before executing these ( potentially destructive ) queries
Image

Post Reply