Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.9.1 (build 3096) - 31 October 2020 (please see announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

Data not written to database

Discussion of the Weather34 web site template

Moderators: saratogaWX, weatherist34

Post Reply
ole.vik
Posts: 3
Joined: Mon 19 May 2014 11:42 am
Weather Station: Davis Vantage Vue
Operating System: Win 2012
Location: Norge

Data not written to database

Post by ole.vik »

Hi

Just installed the template and it seemingly Works as it should. But, when i check the db, nothing is written there.
So i guess a lot of statistics are getting lost atm. Any chance of getting a pointer to how i can go by to fix this?
I have double and triple checked the db_name, db_user and db_host parameters, so that should be correct.
The database and tables are generated. Perhaps there is some testscript i could try against the db?

Site: https://www.tyrirabben.net

ole.vik
Posts: 3
Joined: Mon 19 May 2014 11:42 am
Weather Station: Davis Vantage Vue
Operating System: Win 2012
Location: Norge

Re: Data not written to database

Post by ole.vik »

So..no one? I can provide more info if wanted.

As mentioned, my database is working, i just can't find out where and how data is supposed to be written to it.
Do i have to set up a Cron job? Do i have to specify somewhere that the realtime data, should be written to the database?

The only Reference i have found on using the defined database in the setup script, is in the Cron scripts. But then only
as a Source for chartgeneration.

**
if ($chartsource =="mbcharts"){
//connect to mysqli db for homeweatherstation save to csv files october 2017
$conn = mysqli_connect($db_host,$db_user,$db_pass,$db_name);
$result = mysqli_query($conn,'SELECT * FROM `weatherstation`');
if (!$result) die('Couldn\'t fetch records');
**

First of all, where do i define the variable "mbcharts" ? If i had historical data in my database, i'd like to use that Source instead of WU
Second, to get actual data into the referenced MySQL database - i cant find any scripts doing it. I've sniffed tcp Connections from the
webserver, and it never tries to even contact the sql server. Not even when i specify the host/user/pass in the initial setup.

Any help appreciated. If its not possible, please let me know. I hate losing historical data.

Post Reply