I’ve had a dig around the code used to mount USBs as well as having a look at a couple of people’s log files and I’ve found something quirky! My (limited) understanding is that to mount a USB drive the following commands would be needed:
[tt]
mkdir /dataMine
mount /dev/sda1 /dataMine
[/tt]
however, in the dataMine code it seems to be executing the two commands in the reverse order, meaning it is bound to fail on the first attempt. It is also only creating the directory if the mount was successful (which it won’t have been) or no USB stick is found. No wonder people are struggling!
I’ve coded a quick fix. Can you please try uploading the attached file to your LUA directory - under Apps/Develop Apps/Luup Files in the Vera UI. This should create the mount directory before attempting to mount the USB stick.
I have a problem with DataMine2 (1.895).
When clicking on the link ?dataMine graphing page? or ?DataMine debug page?
I get the message: ERROR:Module not found:port_3480
I running UI7 on a Vera3
(When I was running UI5 some month ago I used DataMine, and it?s a great app so I have been missing the ability to use it)
Great - about time this was looked into. Note that a firmware upgrade may delete the directory. Also sometimes the stick just unmounts mysteriously in the middle of the night. You find data is missing in the morning and a Vera restart is needed. Anyone seen that happen?. Likewise if a data file can’t be found or opened (as per when the stick is unmounted) then perhaps a remount should be tried automatically?
Any how, under all circumstances the existence of the directory/mountpoint should be checked for before mounting.
I’ve spent some time updating the dataMine user guide to include all the new features in dataMine2. I’d love to put it somewhere people can download it but it’s too big to attach here (~800KB). Any suggestions anyone?
[quote=“tyfoon, post:19, topic:190421”]Unfortunately I’m not having a smooth transition.
I had v1 on a UI5 Vera 3. USB logging ON. I have bene succesfully logging 32 variables for over 20 months…
What I did:
[ul][li]Uninstalled v1
Installed v2 from appstore
After some refresh etc. I could open the extra TAB as usual. Got a pop up with the the text to configure the USB drive (to my surprise). As recommend on the pop up restarted vera again. But same thing. p.s. I get the pull down menu with the option to chose a USB drive.
Stopped Vera logging on USB
Restarted etc. still the same pop up
Thought; ok , lets then start fresh…and selected the available USB drive
Restart etc.
Still keep getting the pop up even tough selected USB and restarted and refreshed etc.
Uninstalled v2
Installed v1
Now getting the same issue as above with v1
[/li]
[li][/li][/ul]
Any advice?[/quote]
I got the same as @tyfoon hen I installed V1. Good news for me, it did not show the loading icon for ever. But I can not get past the USB part. I will uninstall V1 and install V2 tonight, see how that goes.
We know that the mount command works on your machine so the question is why the output is not showing up in the debug. Could you log onto your box, type and run lua:
The latest version of dataMine2 (1.896) has now been released in the marketplace - it includes a small fix to ensure the /dataMine/ directory has been created before attempting to mount a USB stick to it - hopefully it should make the mounting process simpler for a number of people
Has anyone tested out the remote access feature of dataMine2 yet? I’m pretty sure it should all work on UI5 as I have tested, that but I have not been able to test it out on UI7 which I understand has a different authentication system. Below is a snippet from the user guide I am putting together…
The dataMine plugin presents a simple device in the UI5 dashboard. This just shows how many channels have been configured in all. The main properties tab presents further information about disk space and links to the web GUI and debug page which are outside of the UI5 interface. Note that the web GUI can be accessed directly from http://vera-ip/dm on your local network or also indirectly via http://vera-ip/port_3480/data_request?id=lr_dmPage ? accessing the GUI this way will be slower than the direct route as all files have to be processed to be compatible with remote access.
The best way to access the web GUI remotely is to log-in to the Micasaverde servers (you will need to register first). Login here: MiOS (which sets a special authentication cookie) and navigate to your UI5 web portal then click the above dataMine graphing page link. Alternatively the GUI can be accessed remotely via a URL of the format:
The request must be https (and not http) which will mean that your username and password will be encrypted during transmission. The required values for active_server and serialNumber can be found via the following request (whilst local to your Vera box):
If I loggin in the network, locally I can start DataMine but when I chose the USB drive, I get the message ?Please restart Luup (press the Reload button in UI5). Wait a moment before the refreshing the GUI.? And this appears over and over again.
@STAIK - well done. That was a strange one. Looks like the clue in the log was:
[tt]CreateDevice_LuaUPnP failed to load 145/D_DataMine2.xml so device 145 is offline while waiting for download the filee[/tt]
I’ve been looking at a number of debug logs (thanks to anyone who has sent me one) and I can see that many of them contain something like: “LoadDeviceDoc can’t load /etc/cmh-lu//D_DataMine2.xml”.
I have a theory as to why this might be and I’ve had a go at modifying the file to see if it helps.
If you are having trouble installing dataMine2 please try uploading the attached file in the Vera web portal under Apps/Develop Apps/Luup Files with Restart Luup after upload checked.
Please let me know how you get on. If it works, I’ll add the fix to the App Store. Thanks!
*update: attachment removed as it has now been approved in the app store. Please try with the latest version (1.897). Thanks *
@A.Ardon - I can see from the logs that there is an error reading alpha data for channel 40 that isn’t configured as an alpha file.
dataMine can record both numerical results and text results (e.g. “On”,“Off”) in the log files. When reading the data back, it assumes that the data is numerical unless it is configured as text (alpha). If it is configured as alpha then it uses a Y-axis lookup table to convert the text into numerical data that can be graphed (you can’t graph text!). Normally this configuration should happen automatically as the data is recorded but for some reason that hasn’t happened here.
To fix it, have a look at the Configuration tab in the dataMine2 web interface, find the variable that is not working and look at the Y-Axis lookup tab on the right. Make sure there is 1 entry per possible text value being recorded. Label should be the text value and value should be the number it is being converted to (normally just a counting sequence).
I also suspect that error message reporting isn’t working properly it it is just saying “handler failed”. When working locally to your Vera, I’d recommend accessing the dataMine2 web interface via http://vera-ip/dm rather than the port_3480 way.
I have my working stats now but it’s strange how as I could not chose my USB in the drop down list on the dataMine graphing url. What solved my issue, I think, was to set
SetMountUUID=vera_usb(my usb label)
SetMountPoint=/dev/sda1 (my USB stick)
And I also have the Settings->Logs->Store logs on USB device checked. Dunno what happens if I disable that one … edit: I disabled it and the dataMine is still logging. Hmm this gets me wondering if, when I pressed Store logs on USB and letted Vera format my USB, what size that new partition got? Last time I checked it was on 500 mb which seems stupid.
edit2: How can I change it from logging every 5 sec to like every 1 or two minutes?
Great news that you got it working @jonator but I’m pretty sure that SetMountPoint is only used if SetManualMount = 1.
As for the logging frequency - dataMine logs every time a variable changes and not at a specific frequency; that way no data is ever lost through sampling issues. What is it that you are logging that’s changing every 5 seconds?
[quote=“ConstantSphere, post:39, topic:190421”]Great news that you got it working @jonator but I’m pretty sure that SetMountPoint is only used if SetManualMount = 1.
As for the logging frequency - dataMine logs every time a variable changes and not at a specific frequency; that way no data is ever lost through sampling issues. What is it that you are logging that’s changing every 5 seconds?[/quote]
Ok then
I am thinking about the disk space it will take up if logging every 5 sec. But maybe there is no worries if you have a 16gb stick anyway? I don’t remember the space of my rrd database from my old 1-wire when it logged every 2.5 minute…