dataMine 0.964

Happy New Year…

dataMine 0.964 is pending approval by MCV. This issue fixes a number of small issues and adds some small/simple features that people have requested.

[ul][li]Fixed axis names when graphing text values[/li]
[li]Added default wind direction lookup table[/li]
[li]Added whole house graph to energy dashboard (10 minute update)[/li]
[li]Updated version of graphing library (2.3.5)[/li]
[li]Added mechanism to save GUI configuration data on Vera[/li]
[li]Added configuration for min/max values on whole house energy meter[/li]
[li]Limit energy graph value to within min/max limits[/li]
[li]Added support for energy generation[/li]
[li]Allow multiple whole-house energy devices[/li]
[li]Added error message if dataMine fails to load[/li]
[li]Added offset property to varible configuration[/li]
[li]Added configuration for drowsy warning and error times[/li]
[li]Forced full status update if Lua restarts[/li]
[li]Forced full status update if long period between updates (eg if PC was sleeping)[/li]
[li]Modified tooltip on energy usage graph[/li][/ul]

Please refer to the manual for information on setting the defaults - there is no GUI for this as yet!

Cheers
Chris

Hi Chris, will this version “work directly after installing from app store”? Or is additional handling needed?

It should work “straight out of the box” without any additional configuration. Where I’ve added configurable items, there are defaults. These should be perfectly suitable for most people - it’s just people with large power consumption, or PV etc that may want to change things.

Cheers
Chris

Happy new year to you!!

I guess this is not really related to dataMine. But for me, when I select Apps->My apps, dataMine shows up as .962, in the list, and I cannot press the checkbox auto update. So do I have to delete the plugin in order to see the newer versions?

Or perhaps I have forgotten about how to install - should I download the files manually? I don’t remember how I did this the last time.

[quote=“vespaman, post:4, topic:173790”]I guess this is not really related to dataMine. But for me, when I select Apps->My apps, dataMine shows up as .962, in the list, and I cannot press the checkbox auto update. So do I have to delete the plugin in order to see the newer versions?

Or perhaps I have forgotten about how to install - should I download the files manually? I don’t remember how I did this the last time.[/quote]
Hi @vespaman,

@Brientim posted a “how-to” on this [url=http://forum.micasaverde.com/index.php/topic,12877.msg95089.html#msg95089]http://forum.micasaverde.com/index.php/topic,12877.msg95089.html#msg95089[/url]. I assume this works, although I can’t verify it here…

Currently this still isn’t approved by MCV - they may still be on holiday for another few days, but you should be able to upgrade to 0.963 at least.

Cheers
Chris

Excellent now I have 0.964 - the energy stuff is very nice!

However my happiness where shortlived; a few hours after running 0.964, I decided to power off my vera.
Shouldn’t have done that… :frowning:
All files on the USB partition of which dataMine stored its logs into where erased. I can see remains from them, but a recover with photorec made lots of small useless files, so I’m starting fresh from start again. Had less than 2 months, so it could be worse. However, it brings up the question about backups…

Are there any thoughts on this? I guess it would be nice if there where some way of moving them onto a linux server, but I guess vera does not support nfs mounts(?). Or maybe backup to another USB stick and then sync would be ok.

Edit: Now I have reformatted (into ext4 this time), and dataMine mounts the USB partition fine (verified by logging in with ssh), but when I press the link “dataMine graphing page”, it never shows up. Instead I get “Unable to download channel configuration data from dataMine”. I have cleared the browser cache.
Related might be, that mountType and mountLocation are both empty, but they where empty also before when I had it working.
/mnt/datamine_logs/ are writable and sda2 is newly formatted (clean).

Great stuff…

[quote=“vespaman, post:6, topic:173790”]However my happiness where shortlived; a few hours after running 0.964, I decided to power off my vera.
Shouldn’t have done that… :frowning:
All files on the USB partition of which dataMine stored its logs into where erased. I can see remains from them, but a recover with photorec made lots of small useless files, so I’m starting fresh from start again. Had less than 2 months, so it could be worse. However, it brings up the question about backups…[/quote]
… and, bummer!

I had an issue with my USB stick yesterday when I moved the Vera to include another device - when it started up it shows no files. It seemed the USB stick was mounted OK, but when I SCP’d into the Vera, there were no files. A reboot fixed it, and that’s the only issue I’ve ever seen with the USB.

However, it’s worth pointing out that USB sticks aren’t the most reliable, and they do have lifetime issues, so you raise a good question. I’ve actually been looking at this recently as I want to store more history data, and given that Vera has a nasty habbit of resetting every now and then, I need to periodically store the status…

I personally keep a copy of the files on my PC every week or two. It’s probably not impossible to set something up to do this automagically, but I just plug the USB stick into my PC and copy the files over - just takes a minute.

I just had a quick look on t’interweb, and WinSCP has a scripting mode. I might take a look at how this works, but this would potentially allow this to be (semi) automated (if you get there before me, let me know ;)) http://winscp.net/eng/docs/commandline#scripting.

Chris

I’m a linux guy, so winscp isn’t a good route for me. But I’ll think of a similar solution! :slight_smile: Once I get it going again.
Did you see my “edit”?

OK - when you get it working on Linux, I’m still interested :wink: I have a linux server…

Hadn’t seen your edit, but it looks like the drive isn’t mounted. mountType and mountLocation shouldn’t be empty. When DM starts, it does a mount check, and if the mountLocation doesn’t equal mountPoint, then the plugin won’t actually start. Without the Lua part of the plugin, the GUI won’t start as it can’t download the configuration (and you get the error you’re getting).

It would be worth looking in the log “cat /var/log/cmh/LuaUPnP.log | grep dataMine” to see what’s logged there.

Chris

OK. I’ll certainly think something out regarding backup.

Here’s the log:

09 01/04/13 19:11:07.098 JobHandler_LuaUPnP::Run device 96 dataMine graphing and logging plugin room 0 type urn:schemas-cd-jackson-com:device:DataMine:1 id parent 0/0x8d2dd8 upnp: 0 <0x2b0a3000> 50 01/04/13 19:11:09.561 luup_log:96: dataMine: Initialising dataMine System (0.964) <0x2b9d7680> 50 01/04/13 19:11:09.644 luup_log:96: dataMine: Mounting dataMine storage (/dev/sda2) to (/mnt/datamine_logs/) <0x2b9d7680> 50 01/04/13 19:11:09.761 luup_log:96: dataMine: Mount point error: ::/dev/sda2 <0x2b9d7680> 09 01/04/13 19:16:31.739 JobHandler_LuaUPnP::Run device 96 dataMine graphing and logging plugin room 0 type urn:schemas-cd-jackson-com:device:DataMine:1 id parent 0/0x9badf0 upnp: 0 <0x2ab05000> 50 01/04/13 19:16:34.568 luup_log:96: dataMine: Initialising dataMine System (0.964) <0x2b439680> 50 01/04/13 19:16:34.891 luup_log:96: dataMine: Mounting dataMine storage (/dev/sda2) to (/mnt/datamine_logs/) <0x2b439680> 50 01/04/13 19:16:35.121 luup_log:96: dataMine: Mount point error: ::/dev/sda2 <0x2b439680>

If I type “mount” I get

/dev/sda2 on /mnt/datamine_logs type ext4 (rw,relatime,barrier=1,data=ordered)

… so it is successful in mounting!

Could there be a built in limitation of the length of the directory? (you being (partly at least) a windows guy :slight_smile: )

This is similar to what I saw yesterday - if I types mount, I also saw that it was “correctly” mounted, but there were no files showing. The files were still there though when the stick was plugged into the PC, and when I rebooted Vera it was ok…

I was writing a long explanation of what dataMine does, and I’ve worked out your (my!) problem. It’s the way dataMine looks for the mount after running mount - I’ve foolishly hardcoded dataMine - you’ve got datamine and I think grep is case sensitive (by default at least).

The problem is I run the following -:
mount | grep dataMine > tmpfile, and it won’t find dataMine in your config. I should rethink this! Send me an email and I’ll send you a version that should fix the problem…

Cheers
Chris

OK, no problem, then I will simply rename the mount point! No need for a special version for me!

Cheers,
Micael

OK, so I have now whipped something up, which seams to do about what I need for now. :slight_smile:
I think, that if the logs get very big over time, maybe this isn’t the correct method. But at least it can run at times where house is at sleep.

Basically three steps:

  1. Create public ssh keys for unattended login to your Vera from your linux server
  2. Using scp script, copy the whole dataMine log direcory to your linux server.
  3. Put a line in you crontab so it is done once every night.

It would have been nice to use rsync instead of scp, but it seams that it is not included in the vera dist, so scp will have to do. Not sure how much data we will see in the end, but time will tell.

So in detail for anyone that wants to use this type of backup:

  1. Create your public keys according to e.g. this guide: Dropbear Public Key Authentication [Old OpenWrt Wiki]

  2. Modify the script for your path’s and vera ip (if you don’t have ‘vera’ in your dns/hosts file). Along with your veras IP, you will want to change both destdir and the source path on your vera.

[code]#!/bin/bash
date=“date +%Y-%m-%d
olddate=“date --date '2 months ago' +%Y-%m
destdir=~/backup/datamine

get the files. Vera does not have rsync, so we use regular scp

scp -qpr root@vera:/mnt/datamine_logs $destdir/

create the backup tar ball

tar -cpzf $destdir/datamine_$date.tar.gz $destdir/datamine_logs

fix rights…

chmod 600 $destdir/datamine_$date.tar.gz

remove tempfiles

rm -rf $destdir/datamine_logs

Remove all backups created 2 months ago

rm -f $destdir/datamine_$olddate-*.tar.gz
[/code]
Create the destdir ( in this case ~/backup/datamine )

  1. Once you have tested the above configuration, and you are sure it works just add line to your own crontab (crontab -e in my case) and add a line like this (running 5 o’clock in the morning).
0 5 * * *    ~/bin/backup_vera_datamine

Thanks @vespaman,
I’ll put this onto my Linux box. For info, I’ve been running dataMine for about 16 months, and have nearly 3000 files totalling nearly 50MB. This may ramp up a little in future though as I’ve recently added more power monitoring and some of that is quite fast (potentially every 6 seconds)…

Anyway, this should work fine for a while to come - thanks :slight_smile:

Cheers
Chris

Has the version 0.964 or 0.965 been approved yet? I just installed 0.964 by going to apps.mios.com=>plugin details=>versions.

I guess this means you can actually install versions of a plugins which are basically not public, which in my eyes would be quiet bad!

[quote=“chixxi, post:15, topic:173790”]Has the version 0.964 or 0.965 been approved yet? I just installed 0.964 by going to apps.mios.com=>plugin details=>versions.

I guess this means you can actually install versions of a plugins which are basically not public, which in my eyes would be quiet bad![/quote]
Looking at apps.mios.com, V0.965 was approved today. V0.964 now doesn’t exist so you shouldn’t have been able to upgrade to that as it’s not listed as a version ???

Cheers
Chris

I got my .964 this way as well. And my auto update doesn’t find 0.965 as usual… :slight_smile:
Hopefully, whenever the next vera fw arrives, improvements will be found in this area…

Auto update is not working:
http://bugs.mios.com/view.php?id=2720

I filed a bug for this:
http://bugs.mios.com/view.php?id=2753

Please feel free to add any additional information.

But honestly, looking at the activity from mcv on bugs.mios.com, I think the problem would be solved faster if I told it to my grandma!

Nice idea - I’m sure she would be very helpful to MCV ;D

Chris,

I’m having some problems with dataMine, and I wondered if you might be able to help me find out the cause. At first, it worked fine. Then at a certain point it stopped working. The page itself loads but no chart ever will.

I’m using Chrome and if I turn on the JS console, I see this:

server-side failure with status code 0 app-all.js:4 server-side failure with status code 0 app-all.js:4 Error in event handler for 'undefined': INDEX_SIZE_ERR: DOM Exception 1 Error: Index or size was negative, or greater than the allowed value. at J (chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:14:142) at null.<anonymous> (chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:17:184) at chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:1:182 at miscellaneous_bindings:286:9 at chrome.Event.dispatchToListener (event_bindings:387:21) at chrome.Event.dispatch_ (event_bindings:373:27) at chrome.Event.dispatch (event_bindings:393:17) at Object.chromeHidden.Port.dispatchOnMessage (miscellaneous_bindings:253:22) event_bindings:377 server-side failure with status code 0 app-all.js:4 server-side failure with status code 0 app-all.js:4 server-side failure with status code 0 app-all.js:4 server-side failure with status code 0 app-all.js:4 server-side failure with status code 0 app-all.js:4 server-side failure with status code 0 app-all.js:4 server-side failure with status code 0 app-all.js:4 server-side failure with status code 0 app-all.js:4 GET http://192.168.1.77/port_3480/data_request?_dc=1357819917609&id=lr_dmCtrl&control=status&last=1357819853 500 (Internal Server Error) app-all.js:4 server-side failure with status code 500 app-all.js:4 5 Uncaught Ext.JSON.decode(): You're trying to decode an invalid JSON String: ext.js:21 GET http://192.168.1.77/port_3480/data_request?_dc=1357819922612&id=lr_dmCtrl&control=status&last=1357819853 500 (Internal Server Error) app-all.js:4 server-side failure with status code 500 app-all.js:4 GET http://192.168.1.77/port_3480/data_request?_dc=1357819927615&id=lr_dmCtrl&control=status&last=1357819853 500 (Internal Server Error) app-all.js:4 server-side failure with status code 500 app-all.js:4 Uncaught Ext.JSON.decode(): You're trying to decode an invalid JSON String: No handler ext.js:21

Any idea what might be causing it to no longer show or update the chart area at all?

Thanks,

Jon