We have moved at community.getvera.com

Author Topic: New dataMine graphing and logging plugin  (Read 287704 times)

Offline Jackpost

  • Sr. Newbie
  • *
  • Posts: 46
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #45 on: November 01, 2011, 02:00:37 pm »
The Running Lua Startup message neever went away and getting multiple graphs plotted did not work eighter, I did not find anything wrong when follwoing the installation instructions...

This weekend my Vera froze, after a reboot it was available for a short time but kept getting frozen again...so I reverted to a backup. I didnt reinstall DataMine.

Thanks for your help getting a solution, for me a reporting tool like datamine is a big gap in the current Vera UI...

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: New dataMine graphing and logging plugin
« Reply #46 on: November 01, 2011, 05:18:57 pm »
Quote
Take a look in the /dataMine directory to see if there's a backup, or take a look in the json file to see if it's correctly formatted (or indeed, if it has anything in it).

The JSON file is empty, there is no backup file.

Offline jpitts

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #47 on: November 03, 2011, 07:55:06 pm »
I'm having difficultly getting the datamine plugin to work, It shows up, but I can't highlight anything on the config tab.
It also didn't seem to create a config file in /datamine

Offline willstar

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #48 on: November 06, 2011, 06:32:58 pm »
Have installed dataMine over weekend, all went reasonably well (big learning curve!) but just found there is a "stack overflow at line: 0" which I suspect mught be caused when I am accessing remotely. This didn't show up when I was at home.

The greater challenge is the "dataMine Startup LUA Failed" message which I think is leading to non viewability of any graphs - ie I don't think it's pulling any data. I've scoured the forum, reinstalled files, checked and double checked, rebooted Vera unit, and have come to a dead end. I did see a topic on Startup LuA failed but not dataMine-related. I also have used this link http://code.mios.com/trac/mios_datamine to install, as it appears to be the main source of info/instruction.

All else works - lights turn on and off when they should, remotes trigger after dusk, scenes work, so none of that has been affected.

What would the best next step be - is this a "log with MCV" item, or are they only likely to deal with their product, rather than a separate function? Or have I just missed something obvious (just not to me!)

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #49 on: November 07, 2011, 01:18:00 pm »
Quote
I'm having difficultly getting the datamine plugin to work, It shows up, but I can't highlight anything on the config tab.
It also didn't seem to create a config file in /datamine
I would say  the LUA file isn't running for some reason. Can you take a look in the logfile and see if there are and "dataMine" entries in there. You should at least see dataMine initialisation messages. If not, make sure the L_dataMine1.LUA file is loaded using the developpers tab (sorry - you've probably done this right, but it's the only thing I can think of right now).

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #50 on: November 07, 2011, 01:27:43 pm »
Quote
just found there is a "stack overflow at line: 0" which I suspect mught be caused when I am accessing remotely. This didn't show up when I was at home.
By this, do you mean you get a pop-up in Internet Explorer saying stack overflow? I've also see this - I hadn't attributed it to dataMine though (yet!). This happens on my work computer when I try and access remotely (it runs IE) but does it even if I don't click on dataMine. I assume this error is a JavaScript error, and given that dataMine java doesn't load until you click on the dataMine properties button, I assumed it wasn't dataMine... This doesn't happen on other computers though (running IE or Firefox).
I should also add that dataMine won't work remotely due to the way javascript files are loaded.

Quote
The greater challenge is the "dataMine Startup LUA Failed" message which I think is leading to non viewability of any graphs
This was reported by another user, but they uninstalled dataMine so I never looked into the issue.
Normally when LUA crashes, it should put an error into the log file - can you take a look and see if there'a anything there? The very first thing dataMine does when it starts is write an entry into the log saying Initialising Data Mining System so if you search for that and see if there's an error showing in the next few lines. It should give a line number for the error which will hopefully help me find the problem. I'm by no means a LUA expert programmer and I'm not 100% sure how LUA handles different errors other than it generally results in crashing the application as you've seen (other apps will stay running ok). If I can find the error, I can add a check to stop this and report the issue properly.

My guess is that MCV won't be too interested unless I can find a problem that's in their code. I'll try and find the issue if you can stick with me while we work on it.

Offline willstar

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #51 on: November 07, 2011, 09:19:35 pm »
Hi Chris, thanks for your replies. I'm looking forward to seeing what dataMine can provide for me - my main motivation in getting a Vera system is to cut down our $3,000 per year electricity bill!

I'll check out the logfile when I get home later tonight - I do have the L_dataMine1.LUA loaded (just checked) but will see what the logfile provides.

The Stack Overflow popup only appears when I log in via work computer, and it only started appearing after I loaded dataMine. Using IE at work, Chrome at home. It's not an issue, since I can still see/access/use the dashboard after "Ok"ing the message to clear it. I figured dataMine wouldn't work remotely - I saw that the graphics/images didn't load when trying to access from work.

I'd seen the other user comments you mentioned - pity nothing came of that though.

Will come back to you with the log file contents - hopefully it will shed some light on the issue. Thanks again, both for your reply now, and the work you have put in to build what appears to be a useful addition to the system.

Offline wichiepr

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Chris I need you advice
« Reply #52 on: November 08, 2011, 06:06:57 pm »
I am having problem to run datamine,

Offline willstar

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #53 on: November 09, 2011, 05:31:17 am »

Quote
The greater challenge is the .....

OK - first thing is to ask you to remember my status over there on the left <Chris glances at "Newbie", nods knowingly>  ;)

So - with that in mind I am struggling to get hold of the suggested log file - have checked in /tmp/log, /tmp/log/cmh and even run a search thru all directories for file named logfile or dataMine with no luck. There is a dataMine directory sitting in /root although I am now wondering if I mounted the USB stick properly. FWIW L_dataMine1.LUA is in place.

'scuse my ignorance in all things coding...

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #54 on: November 09, 2011, 01:26:08 pm »
Hey, no probs - I shouldn't have blindly expected you to find the log actually - it's a bit obscure...

Look in /tmp/log/cmh - the file you want is LuaUPnP.log. This is the file where all the debug and other information ends up, and there are a few dataMine messages that go in here as well.

Offline willstar

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #55 on: November 10, 2011, 06:25:26 am »
Hey, no probs - I shouldn't have blindly expected you to find the log actually - it's a bit obscure...

Look in /tmp/log/cmh - the file you want is LuaUPnP.log. This is the file where all the debug and other information ends up, and there are a few dataMine messages that go in here as well.

Hmm - the below few lines seem to tell a story - there's a few other dataMine entries too. What's the opinion? (Still wondering about whether I mounted teh USB stick properly...)


01   11/10/11 21:02:20.046   LuaInterface::CallFunction_Startup-1 device 11 function initialise failed [string "..."]:7: module 'L_DataMine1' not found:
   no field package.preload['L_DataMine1']
   no file './L_DataMine1.lua'
   no file '/usr/share/lua/L_DataMine1.lua'
   no file '/usr/share/lua/L_DataMine1/init.lua'
   no file '/usr/lib/lua/L_DataMine1.lua'
   no file '/usr/lib/lua/L_DataMine1/init.lua'
   no file '/etc/cmh-ludl/L_DataMine1.lua'
   no file '/etc/cmh-lu/L_DataMine1.lua'
   no file './L_DataMine1.so'
   no file '/usr/lib/lua/L_DataMine1.so'
   no file '/usr/lib/lua/loadall.so' <0x402>
01   11/10/11 21:02:20.047   LuImplementation::StartLua running startup code for 11 I_DataMine1.xml failed <0x402>

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #56 on: November 10, 2011, 01:32:19 pm »
I don't think it's USB related.

I haven't seen this error before, but it looks like the MIOS system that loads LUA files can't find the L_DataMine1.lua file. So, my guess is that the L_DataMine1.lua file isn't loaded correctly. This file should be loaded using the "developers" tab, and not put somewhere else (e.g. on the USB stick or in the plugins directory) with the likes of the JS files and image files.

If it is loaded correctly, then one other possibility is that there a case sensitivity issue. I suspect (being Linux) that the filename has to have exactly the same case as in the error message. This should be correct, but sometimes Windows changes case (since it doesn't care) and this screws up Linux.

Offline willstar

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #57 on: November 10, 2011, 07:53:08 pm »
I don't think it's USB related.

I haven't seen this error before, but it looks like the MIOS system that loads LUA files can't find the L_DataMine1.lua file. So, my guess is that the L_DataMine1.lua file isn't loaded correctly. This file should be loaded using the "developers" tab, and not put somewhere else (e.g. on the USB stick or in the plugins directory) with the likes of the JS files and image files.

If it is loaded correctly, then one other possibility is that there a case sensitivity issue. I suspect (being Linux) that the filename has to have exactly the same case as in the error message. This should be correct, but sometimes Windows changes case (since it doesn't care) and this screws up Linux.

Yeah - I WinSCP'd and looked at those directories above and files as stated are not there. I had definitely loaded the L_DataMine1.lua file via the Dev tab - and have since reloaded it, but with the same results. I wasn't sure if it is possible to delete the file first then reload, but it is still showing the same result.

I also ran a search for the file and it only sits in .etc/cmh-ludl/ and .overlay/etc/cmh-ludl/ with content appearing to be exactly the same in both cases.

Would it help to see the complete LuaUPnP.log file in case it has some other message (that I missed) - if so, I can send it thru.

PS I have also F5'd the screen to refresh and reload, tried different browsers (usually use Chrome but IE and FF have same result), turned off and back on the Vera unit.
« Last Edit: November 10, 2011, 08:14:45 pm by willstar »

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #58 on: November 12, 2011, 06:28:20 am »
Quote
I also ran a search for the file and it only sits in .etc/cmh-ludl/ and .overlay/etc/cmh-ludl/
That's where it should be when loaded with the developers app. I assume it has exactly the same case, and doesn't have lzo appended to the end? If so, that would be consistant with my configuration.

Something doesn't add up. If I look at the error message, I see the following -:
Quote
no file '/etc/cmh-ludl/L_DataMine1.lua'
And yet this file does exist in this directory? I'm not sure that the problem is (directly) a dataMine problem - I don't know if MCV are monitoring this thread, but I'd certainly welcome input from them. I don't know how Vera loads Lua files, but to me it looks like you've got enough to start the program. I don't think looking at the rest of the log will help (at least, I don't think it will help me - MCV may know more, but it seems to indicate the Vera isn't loading the dataMine plugin files at all, so until we get over that hurdle, the log isn't going to help me.

Offline willstar

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #59 on: November 12, 2011, 08:09:18 am »
Quote
I also ran a search for the file and it only sits in .etc/cmh-ludl/ and .overlay/etc/cmh-ludl/
That's where it should be when loaded with the developers app. I assume it has exactly the same case, and doesn't have lzo appended to the end? If so, that would be consistant with my configuration.

Something doesn't add up. If I look at the error message, I see the following -:
Quote
no file '/etc/cmh-ludl/L_DataMine1.lua'
And yet this file does exist in this directory? I'm not sure that the problem is (directly) a dataMine problem - I don't know if MCV are monitoring this thread, but I'd certainly welcome input from them. I don't know how Vera loads Lua files, but to me it looks like you've got enough to start the program. I don't think looking at the rest of the log will help (at least, I don't think it will help me - MCV may know more, but it seems to indicate the Vera isn't loading the dataMine plugin files at all, so until we get over that hurdle, the log isn't going to help me.

OK - this might be progress - there is lzo appended on the file in both locations - as is the case with the other files in each directory. Are you saying it should be without the lzo? See screenshot attached for info - both directories hold exactly the same files.

In relation to your second point, the program starts, ie I can open using the spanner, and have four tabs - datamine, graph, config and advanced. If I click on graph it sits there with the "thinking" icon and nothing happens. Clicking on config it shows the various devices, although lacks the specific info that you have showing in green on your http://code.mios.com/trac/mios_datamine page. Then I can click back into graph and it shows all the menu items, but clicking "select channels" brings up the yellow box has no data in it.

So what seems to be happening is the program runs, but it is not pulling down any data to display.
« Last Edit: November 12, 2011, 08:39:46 am by willstar »