Rain block

Post Reply
bengtdg
Newbie
Newbie
Posts: 3
Joined: Thu Apr 29, 2021 5:38 am
Station model: netatmo
Software: netatmo plugin

Rain block

Post by bengtdg » Wed Jul 28, 2021 7:14 am

Hi
Having issues with the rain block.
It only shows rain today.

This month and This year is always zero
Block version 7.1

Weather station netatmo

Bengt

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

Re: Rain block

Post by davidefa » Wed Jul 28, 2021 8:52 am

- do other block report rain data correctly ( for example block station data )?
- do graphs show past rain data correctly ( which is equivalent to previous question and should verify that rain data is correctly saved in database )?
- when did you start weather data recording in meteotemplate

Please post a link to your site
Image

bengtdg
Newbie
Newbie
Posts: 3
Joined: Thu Apr 29, 2021 5:38 am
Station model: netatmo
Software: netatmo plugin

Re: Rain block

Post by bengtdg » Wed Jul 28, 2021 9:09 am

Link: https://selevaret.casadelsele.com/meteo/

Started collecting data sinse mid april this year.

Now i see that block station data also shows 0 mm when selecting month or year

Bengt

bengtdg
Newbie
Newbie
Posts: 3
Joined: Thu Apr 29, 2021 5:38 am
Station model: netatmo
Software: netatmo plugin

Re: Rain block

Post by bengtdg » Wed Jul 28, 2021 10:25 am

Found the fix

ran this command:
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

I had problem with the interactive graph as well, both solved:)

djpoppy
Observer
Observer
Posts: 15
Joined: Mon Oct 30, 2023 6:22 pm
Location: Diano Marina - Italy
Station model: GW2000 - WS90
Contact:

Re: Rain block

Post by djpoppy » Fri Nov 10, 2023 7:32 am

I have the same problem. Where should I run the command? In this console?
Attachments
Acquisizione schermata 10.11.2023 alle 08.30.39.png
Acquisizione schermata 10.11.2023 alle 08.30.39.png (118.56 KiB) Viewed 314 times
Image

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

Re: Rain block

Post by davidefa » Sat Nov 11, 2023 11:59 am

Yes, you can do it from the Sql tab, or in the Variables tab you should be able to edit the sql_mode variable directly
Image

djpoppy
Observer
Observer
Posts: 15
Joined: Mon Oct 30, 2023 6:22 pm
Location: Diano Marina - Italy
Station model: GW2000 - WS90
Contact:

Re: Rain block

Post by djpoppy » Sat Nov 11, 2023 12:43 pm

Sorry but I've never edited on SQL. Is this one? What should I enter or change?
Attachments
Acquisizione schermata 11.11.2023 alle 13.41.21.png
Acquisizione schermata 11.11.2023 alle 13.41.21.png (57.33 KiB) Viewed 293 times
Image

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

Re: Rain block

Post by davidefa » Sat Nov 11, 2023 1:39 pm

Simply remove the

Code: Select all

ONLY_FULL_GROUP_BY,
at the beginning
Image

djpoppy
Observer
Observer
Posts: 15
Joined: Mon Oct 30, 2023 6:22 pm
Location: Diano Marina - Italy
Station model: GW2000 - WS90
Contact:

Re: Rain block

Post by djpoppy » Sat Nov 11, 2023 2:39 pm

It gives me an error when modifying the sqlmode database because I don't have super privileges even if the database is mine :( :?:
Image

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

Re: Rain block

Post by davidefa » Sat Nov 11, 2023 9:17 pm

You still have a few options:
- verify in the control panel of your hosting provider if you have any 'database setting options' to disable the only_full_group_by flag ( a mysql.ini editor or the like )
- verify in the control panel of your hosting provider if you can change the 'sql version' ( in mysql that option is enabled by default starting from ver 5.7, in mariaDb is disabled )
- you could add the following to your config.php script near line 15 ( after line beginning with '$con =' ). I used in my aruba domain which has the same problem, and it seems working.

Code: Select all

mysqli_query($con,"SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))");
( if you run the 'main configuration script' and click the save button, you will need to reenter this mod )
Image

djpoppy
Observer
Observer
Posts: 15
Joined: Mon Oct 30, 2023 6:22 pm
Location: Diano Marina - Italy
Station model: GW2000 - WS90
Contact:

Re: Rain block

Post by djpoppy » Sun Nov 12, 2023 7:47 am

@davidefa I have to thank you again... I used the "third method" you listed.
I have a TopHost domain and had the same problem.
Now it seems to work. I have to remember that if I make changes in the main configuration I have to go and edit the config.php file again.
My php version is 7.4.
Attachments
Acquisizione schermata 12.11.2023 alle 08.43.17.png
Acquisizione schermata 12.11.2023 alle 08.43.17.png (39.12 KiB) Viewed 278 times
Image

Post Reply