Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.0.0 (build 4022) - 11 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V4 release 4.0.0 (build 4022) - 11 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Database and CumulusMX
Moderators: saratogaWX, weatherist34
- billy
- Posts: 255
- Joined: Mon 30 Nov 2015 10:54 am
- Weather Station: WLL / Davis VP2+
- Operating System: RPi bullseye
- Location: Gooseberry Hill, Western Australia
Database and CumulusMX
Thought I might give this style a go again - I have always liked it but abandoned it a few years ago. I see in the settings there is room to enter database information but no table information. I already upload realtime data to a MySQL database. Should I be able to use this rather than upload realtime.txt? If so, some clues to how to go about this would be appreciated. Many thanks
- rogerthn
- Posts: 521
- Joined: Thu 11 Apr 2013 6:31 pm
- Weather Station: Ecowitt GW1000/GW1003
- Operating System: Raspberry Pi OS bullseye aarch64
- Location: Trollhättan Sweden
- Contact:
Re: Database and CumulusMX
Enter Server details
Scroll down to Save Settings, Save and create tables as specified in Table name for Realtime. Dayfile and/or Monthly
Scroll down to Save Settings, Save and create tables as specified in Table name for Realtime. Dayfile and/or Monthly
- billy
- Posts: 255
- Joined: Mon 30 Nov 2015 10:54 am
- Weather Station: WLL / Davis VP2+
- Operating System: RPi bullseye
- Location: Gooseberry Hill, Western Australia
Re: Database and CumulusMX
Thanks but I probably didn't make it clear that the settings are for HWS, not CumulusMX. I'm already uploading CMX monthly etc to a MySQL database and wondered if HWS now has a facility to utilize these ... given the option to enter the database details I thought/hoped it might!
-
- Posts: 3277
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Database and CumulusMX
The best way is to use phpMyAdmin to look at your database and it gives all the table names and their contents.
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: Database and CumulusMX
Since nobody else has answered your actual questions....
The database name, and table name are both hard-coded into the software as `weatherstation`. As far as I know, the table columns schema (data dictionary) has not been designed to match any default Cumulus table columns schema.
Ken True updated the script that gets the data so it works with PHP 8 about 6 months ago, he may be able to advise whether a special version of the script could be produced for you.
In theory, a query could read latest row out of your existing table into the same array, the question is what extra work is needed to get the array element keys named/numbered correctly!
The settings you can enter are just to define the way to connect to your database server.
The database name, and table name are both hard-coded into the software as `weatherstation`. As far as I know, the table columns schema (data dictionary) has not been designed to match any default Cumulus table columns schema.
The Weather34 Home Weather Station special version for Cumulus realtime.txt was specifically written to use that, but in February 2019 was amended so it can also use meteobridge, weewx, and weathercat realtime.txt. It basically reads the entire file in one command and turns that into a single array with one element for each field.
Ken True updated the script that gets the data so it works with PHP 8 about 6 months ago, he may be able to advise whether a special version of the script could be produced for you.
In theory, a query could read latest row out of your existing table into the same array, the question is what extra work is needed to get the array element keys named/numbered correctly!
Last edited by sfws on Fri 03 Jun 2022 7:14 pm, edited 1 time in total.
-
- Posts: 2493
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Database and CumulusMX
You could do worse than reading up on MySQL views. You could define a view that presents the data from your existing tables in a format that is acceptable to Weather34.sfws wrote: ↑Fri 03 Jun 2022 6:58 pmThe database name, and table name are both hard-coded into the software as `weatherstation`. As far as I know, the table columns schema (data dictionary) has not been designed to match any default Cumulus table columns schema.I don't use Weather34 Home Weather Station, but my understanding is that the special version of that for Cumulus realtime.txt is only able to use that as its input.
Ken True updated the script that gets the data so it works with PHP 8 about 6 months ago, he may be able to advise whether it could be changed to use a query to read your database table, but I suspect it would be a lot of work!
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: Database and CumulusMX
I perhaps should have made it clearer, I don't use this software, but just had a quick scan of its code. That made me believe weather34 has no ability to read any database table format, indeed I can't find any code that updates/reads the table it creates! So actually my original drafting of my post was assuming a massive rewrite was needed for any database table usage.
Freddie had posted, quoting my original drafting, before I amended my earlier post when I realised that a query of Cumulus realtime table could produce an array equivalent to that produced from the file, so the only change needed was in that one php script in the second link of my earlier post! My suggestion that the "array element keys" might need remapping, is essentially the same as Freddie is proposing could be achieved via the technical approach of views.
- billy
- Posts: 255
- Joined: Mon 30 Nov 2015 10:54 am
- Weather Station: WLL / Davis VP2+
- Operating System: RPi bullseye
- Location: Gooseberry Hill, Western Australia
Re: Database and CumulusMX
Your contributions are much appreciated - giving additional clarity of what the current version can and can't do. I'll have a think about whether I will do some bespoke modifications. So, many thanks.