Page 1 of 2

Realtime Mysql

Posted: Sat 23 May 2015 11:57 am
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..

Re: Realtime Mysql

Posted: Sat 23 May 2015 12:25 pm
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.

Re: Realtime Mysql

Posted: Sat 23 May 2015 12:45 pm
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

Re: Realtime Mysql

Posted: Sat 23 May 2015 12:48 pm
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).

Re: Realtime Mysql

Posted: Sat 23 May 2015 12:52 pm
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.

Re: Realtime Mysql

Posted: Sat 23 May 2015 1:01 pm
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?

Re: Realtime Mysql

Posted: Sat 23 May 2015 1:08 pm
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)

Re: Realtime Mysql

Posted: Sat 23 May 2015 1:12 pm
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.

Re: Realtime Mysql

Posted: Sat 23 May 2015 1:18 pm
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

Re: Realtime Mysql

Posted: Sat 23 May 2015 1:40 pm
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?

Re: Realtime Mysql

Posted: Sat 23 May 2015 2:06 pm
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

Re: Realtime Mysql

Posted: Sat 23 May 2015 2:28 pm
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?

Re: Realtime Mysql

Posted: Sat 23 May 2015 3:00 pm
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.

Re: Realtime Mysql

Posted: Sat 23 May 2015 3:06 pm
by nitrx
I suppose that accessing myphp displayed in Dutch has nothing to do with it, the languageinterface is adapted from the browserlanguage..?

Re: Realtime Mysql

Posted: Sat 23 May 2015 3:08 pm
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?