Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

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 drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Realtime Mysql

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Realtime Mysql

Post by nitrx »

I've stup apache and mysql on my pi made a database

As I've not had a dayfile the dayfile table is empty so far so good (I did not try to current dayfile)

The Monfile table works fine every 10 minutes the values are added ( 10 minutes is my webupfate and console memory Fine Offset)

Now the question
The realtime.txt upload has an optional 'retention' setting, which will cause entries older than the value specified to be deleted from the database after each upload. It should be specified as a MySQL 'interval', e.g. 24 HOUR or 1 DAY or 1 WEEK etc.
I don't know what to fill out here I want 48 hours every 60 seconds... in my old config under Win7 I've a batchfile with retainVal=48 retainUnit=hour can I use this or ??

EDIT furthermore ExportMySQL dayfile at commandline doesn't create a dayfile table..
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Realtime Mysql

Post by steve »

nitrx wrote:I don't know what to fill out here I want 48 hours every 60 seconds... in my old config under Win7 I've a batchfile with retainVal=48 retainUnit=hour can I use this or ??
The script just combines those two fields, with MX you combine them yourself - so 48 HOUR is what you want.
EDIT furthermore ExportMySQL dayfile at commandline doesn't create a dayfile table..
That's right. As indicated in the the instructions.
Steve
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Realtime Mysql

Post by nitrx »

steve wrote:
nitrx wrote:I don't know what to fill out here I want 48 hours every 60 seconds... in my old config under Win7 I've a batchfile with retainVal=48 retainUnit=hour can I use this or ??
[quotte}The script just combines those two fields, with MX you combine them yourself - so 48 HOUR is what you want.
Great clear to me it works
EDIT furthermore ExportMySQL dayfile at commandline doesn't create a dayfile table..
steve wrote:That's right. As indicated in the the instructions.
Sorry but I can't find this or I misunderstand something
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Realtime Mysql

Post by steve »

Maybe I am misunderstanding. ExportMySQL doesn't create any tables. You have to create them before you run it, using the MySQL settings GUI in MX (or by some other method, if you wish).
Steve
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Realtime Mysql

Post by nitrx »

steve wrote:Maybe I am misunderstanding. ExportMySQL doesn't create any tables. You have to create them before you run it, using the MySQL settings GUI in MX (or by some other method, if you wish).
Aha miscommunicating I see , database is made and the tables are availble (made in the GUI) after that I did try the line command without and with sudo but nothing is uploaded also done this while CumulusMX was not running. No errors are diplayed.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Realtime Mysql

Post by steve »

I did check that ExportMySQL worked OK under Linux, but I've just had a thought. It assumes that the dayfile.txt fields are separated by the list separator for the current culture. Are you overriding this in MX - i.e, is your dayfile.txt list separator not the same as your regional setting in Linux?
Steve
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Realtime Mysql

Post by nitrx »

My dayfile is in English ergo note some fields are 0 because not al sensors are connected.

13/04/15,0.0,00:00,8.4,23:33 andso-on the Monthly file and Realtimetxt are imported fine by cumumulusMX , I also did a command

Code: Select all

sudo mono ExportMSQL dayfile
but nothing in the tables (the are only 40 records in the dayfile.txt)
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Realtime Mysql

Post by steve »

But is your system set up with English settings, or do you run MX with a '-lang' parameter? Does ExportMySQL not output anything at all while it's running? It should print the dates that its processing, even if the upload isn't working.
Steve
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Realtime Mysql

Post by nitrx »

Cumulus is complete setup in English I don't use an other culture at the command line everything is in English also the dekstopgui, I dont get output in the console after the ExportMSQL command after some time I get the 'normal'output connected from 192.xxx disconnected from 192.xxx as usual
edit I mean my OS also setup in English
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Realtime Mysql

Post by steve »

I'm baffled then. You shouldn't need to use sudo, assuming you have your file permissions correct. I've just tried again on my Pi with the ExportMySQL from the distribution, and it still works. You should just need to do

mono ExportMySQL.exe dayfile

and after a couple of seconds it should start displaying the dates from dayfile.txt. You are running it from the CumulusMX installation directory, yes?
Steve
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Realtime Mysql

Post by nitrx »

steve wrote: You shouldn't need to use sudo, assuming you have your file permissions correct. I've just tried again on my Pi with the ExportMySQL from the distribution, and it still works. You should just need to do

mono ExportMySQL.exe dayfile

and after a couple of seconds it should start displaying the dates from dayfile.txt. You are running it from the CumulusMX installation directory, yes?
I have restarded my pi . I'm running from the Cumulus directory (I've named it Cumulus instead CumulusMX I think this should be not an issue) unfortunally the console doesnt give any clues and the data are not uploaded to the database. Hopefully somebody tries his out too otherwise I do a new install or try to import in another way.

Thanks for your efforts
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Realtime Mysql

Post by steve »

Could you replace your ExportMySQL.exe with the one in the attached zipfile, please, and see if it says anything when you run it?
You do not have the required permissions to view the files attached to this post.
Steve
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Realtime Mysql

Post by nitrx »

steve wrote:Could you replace your ExportMySQL.exe with the one in the attached zipfile, please, and see if it says anything when you run it?
Nothing happens too I tried also to import a Monthfile with mono ExportMySQL /data/April15log.txt this give an error 'Cannot open Assembly 'ExportMySQL' no such file or directory.

The Apr15log.txt is in the data directory I tried the same commands with the .exe extenions behind it. Unfortunally I cant make screenshots with remote connection (anyway dont know how to do this) even copy and post doesn't work.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Realtime Mysql

Post by nitrx »

I suppose that accessing myphp displayed in Dutch has nothing to do with it, the languageinterface is adapted from the browserlanguage..?
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Realtime Mysql

Post by steve »

nitrx wrote:mono ExportMySQL /data/April15log.txt this give an error 'Cannot open Assembly 'ExportMySQL' no such file or directory.
Try:

mono ExportMySQL.exe data/Apr15log.txt

So when you do 'mono ExportMySQL.exe dayfile' with the new version, what exactly happens? Does it just exit back to the command prompt straight away without printing anything?
Steve
Locked