We have moved at community.getvera.com

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

Offline ajlennon

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #165 on: December 22, 2011, 02:06:23 pm »

I've just spotted that my reinstalled copy of dataMine, since downgrading from UI5 isn't running. I get this json error too -

Code: [Select]
50      12/22/11 19:04:17.088   luup_log:13: dataMine: Initialising Data Mining System <0x402>
01      12/22/11 19:04:17.122   LuaInterface::CallFunction_Startup-1 device 13 function initialise failed /usr/lib/lua/json.lua:122: Unterminated JSON encoded object found at position in [] <0x402>
01      12/22/11 19:04:17.123   LuImplementation::StartLua running startup code for 13 I_DataMine1.xml failed <0x402>

Offline ajlennon

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #166 on: December 22, 2011, 02:12:43 pm »

I see what it was. Somehow I had an empty dataMineConfig.json file in /www/cmh/plugins/dataMine. I don't know how that came to be but when I deleted it and reconfigured the dataMine device all seems to be working (at least I get no errors logged any more).

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #167 on: January 01, 2012, 08:42:04 am »
I've updated dataMine to add the ability to select graph types. This can be configured for each variable in the configuration page.

Two options are currently available -:
  • Status graph. This is used for status variables, and draws graphs with horizontal lines. This is what dataMine has always previously done.
  • Sensor graph. This is used for sensors, or any data that is updated periodically and results in variable type data rather than stepped data. This results in lines running directly between points rather than horizontally.

I've attached the updated ZIP here, and also updated the version on the wiki.
« Last Edit: January 02, 2012, 06:15:26 pm by Chris »

Offline andygodber

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #168 on: January 01, 2012, 11:14:24 am »
Is it now working with UI5?

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #169 on: January 01, 2012, 11:26:04 am »
Quote
Is it now working with UI5?
No - sorry. I have a Vera 3 arriving (hopefully) any day now. Due to issues I had upgrading my Vera 2, I don't want to loose my online system (again) so I need to wait for the Vera 3. Once it arrives, getting dataMine working on UI5 will be at the top of todo list...

Offline andygodber

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin....and Homeseer?
« Reply #170 on: January 01, 2012, 04:23:20 pm »
Chris - Understood  ;)

Anyone else, do you know if there is an equivalent plugin/functionality for HomeSeer?

Offline kskenyon

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: New dataMine graphing and logging plugin
« Reply #171 on: January 18, 2012, 12:44:36 pm »
L_DataMine1.lua has a typo at line 188.  Lua will not start up.

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #172 on: January 18, 2012, 02:55:34 pm »
Sorry- I thought I'd uploaded the new version a couple of weeks ago. T'is now updated on the repository and on the first post of this thread.

Chris

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: New dataMine graphing and logging plugin
« Reply #173 on: January 20, 2012, 05:47:27 am »
Hello,

I am trying dataMine for the first time and I have not been able to get it running successfully. I followed the instructions but when it load screen both the graph and config screen just display the status bar Opening....'

I did notice the D_DataMine1.xml contained urn:schemas-cd-jackson-com:device:DataMine:1 whereby the instructions state
urn:schemas-cd-jackson-com:device:DataMine1:1.

I would appreciate any help that you can provide me.

Regards
Tim

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #174 on: January 20, 2012, 08:50:00 am »
I am trying dataMine for the first time and I have not been able to get it running successfully. I followed the instructions but when it load screen both the graph and config screen just display the status bar Opening....'
This is indicative of the javascript files not loading, which could be because they aren't in the correct directory (??). Are you running this on UI4 or UI5 (dataMine doesn't currently work on UI5, and I think at least part of the problem is to do with JS file compatability).

Quote
I did notice the D_DataMine1.xml contained urn:schemas-cd-jackson-com:device:DataMine:1 whereby the instructions state
urn:schemas-cd-jackson-com:device:DataMine1:1.
You're right - the "device_type" should be set to "urn:schemas-cd-jackson-com:device:DataMine:1". I'll update the instructions (I'm surprised this hasn't been noticed before - thanks for pointing it out). I don't think this will be your problem though, and I guess you've already tried this anyway.

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: New dataMine graphing and logging plugin
« Reply #175 on: January 20, 2012, 05:13:22 pm »
This is indicative of the javascript files not loading, which could be because they aren't in the correct directory (??). Are you running this on UI4 or UI5 (dataMine doesn't currently work on UI5, and I think at least part of the problem is to do with JS file compatability).

I retried from the start to confirm the loaded correctly and where in the correct directory structure. Still the same. You are correct, I ran logging to the USB and it indicates the error below

50   01/21/12 11:30:27.171   luup_log:170: dataMine: Initialising Data Mining System <0x402>
50   01/21/12 11:30:27.173   luup_log:170: dataMine: Unable to open config file for read :: /dataMine/dataMineConfig.json <0x402>
06   01/21/12 11:30:27.174   Device_Variable::m_szValue_set device: 170 service: urn:cd-jackson-com:serviceId:DataMine1 variable: ChannelCnt was: 0 now: 0 #hooks: 0 upnp: 0 v:0x9a9fe0/NONE duplicate:1 <0x402>
06   01/21/12 11:30:27.175   Device_Variable::m_szValue_set device: 170 service: urn:cd-jackson-com:serviceId:DataMine1 variable: ChannelRec was: 0 now: 0 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x402>
50   01/21/12 11:30:27.176   luup_log:170: dataMine: Reinitialising configuration structure <0x402>
50   01/21/12 11:30:27.180   luup_log:170: dataMine: Startup complete <0x402>
02   01/21

I can see the usb is mounted but still no sucess. Any thoughts.

Regards
Tim
« Last Edit: January 20, 2012, 07:42:16 pm by Brientim »

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: New dataMine graphing and logging plugin
« Reply #176 on: January 20, 2012, 08:05:56 pm »
Hello Chris,

I found there were older version, so used the 28 Nov 2011 which worked. I loaded only:

L_DataMine1.lua
D_DataMine1.xml
S_DataMine1.xml
I_DataMine1.xml
D_DataMine1.json
J_DataMine1.js

Tim

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #177 on: January 21, 2012, 06:43:14 am »
Hi Tim,
That's great. If you've got an old version, you might also want to look at changing the other two JS files (the flotr.*.js files). This was also upgraded at some stage to fix a minor, but anoying bug relating to scrolling.

Cheers
Chris

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: New dataMine graphing and logging plugin
« Reply #178 on: January 21, 2012, 07:12:40 am »
Chris,

Thanks and will do. I have it up and running and you're done a great job. I really appreciate the effort you have put into to give a very usable and useful application.


Tim

Offline Chris

  • Moderator
  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: New dataMine graphing and logging plugin
« Reply #179 on: January 24, 2012, 05:18:43 pm »
Just a quick update for those waiting on a UI5 version of dataMine. I now have a version working, but it will have to operate a little differently than it is (or was!) on UI4. The big problem I've hit, and haven't managed to overcome, is that on UI5 the jQuery library is used as well as the Prototype library. There are some compatibility issues between these libraries, and this stops the graph library from working (the issues are well documented on the net).

So, what I've done is to move the graph window onto a separate web page - in some ways, this might actually be better as the window then isn't constrained by limitations to display inside the small properties page (ie I could make the graph larger or add more "stuff"). The configuration window remains the same - i.e. it's accessed exactly the same through the properties page. I've also got a link to the graph page inside the dataMine plugin properties.

The graph page itself will be on [Vera IP address]/dataMine.

The only downside to this is that as it operates outside the UI5, it's not accessible remotely (although this doesn't work on UI4 due to the way Vera works - I don't know if this is fixed on UI5, so it may not be possible anyway!).

Once I get a few issues sorted with apps.mios.com, I'll get this version released. Once I've got a version out there, I might have a look at "better" integrating it to UI5 if that's what people want.

Cheers
Chris