Trying to install datamine on my vera edge, and trying to follow (as best I can) the UI5 install document but I’m pretty much going off the rails from the start. I’m trying to log to a USB stick.
I plugged in my USB stick, and Vera ever so thoughtfully decided to reformat it. (hurumph) I turned off logging to the USB stick, so /dev/sda1 (the 500M partition) is currently unmounted.
Then I did
busybox mkfs.ext2 /dev/sda2
mkdir /dataMine
mount /dev/sda2 /dataMine.
At this point, here’s what things look like from the command prompt:
root@MiOS_(something else was here):/# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock6 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/mtdblock10 on /storage type jffs2 (rw,relatime)
/dev/mtdblock10 on /etc/cmh-firmware type jffs2 (rw,relatime)
/dev/mtdblock10 on /etc/cmh-backup type jffs2 (rw,relatime)
/dev/mtdblock9 on /mios type squashfs (ro,relatime)
/dev/sda2 on /dataMine type ext2 (rw,relatime)
root@MiOS_(something else was here):/# df -m
Filesystem 1M-blocks Used Available Use% Mounted on
rootfs 10 3 6 32% /
/dev/root 9 9 0 100% /rom
tmpfs 62 5 57 8% /tmp
/dev/mtdblock6 10 3 6 32% /overlay
overlayfs:/overlay 10 3 6 32% /
tmpfs 1 0 1 0% /dev
/dev/mtdblock10 65 6 58 10% /storage
/dev/mtdblock10 65 6 58 10% /etc/cmh-firmware
/dev/mtdblock10 65 6 58 10% /etc/cmh-backup
/dev/mtdblock9 5 5 0 100% /mios
/dev/sda2 7086 0 6726 0% /dataMine
root@MiOS_(something else was here):/# ls -al /dataMine
drwxr-xr-x 3 root root 4096 Aug 25 14:54 .
drwxr-xr-x 1 root root 0 Aug 25 15:43 ..
drwxr-xr-x 2 root root 16384 Aug 25 14:54 lost+found
root@MiOS_(something else was here):/# cat > /dataMine/testfile.txt
this is a test file being written to the ext2 filesystem on /dev/sda2/ via the /dataMine mount point
root@MiOS_(something else was here):/# cat /dataMine/testfile.txt
this is a test file being written to the ext2 filesystem on /dev/sda2/ via the /dataMine mount point
root@MiOS_(something else was here):/# ls -l /dataMine
drwxr-xr-x 2 root root 16384 Aug 25 14:54 lost+found
-rw-r--r-- 1 root root 101 Aug 25 15:53 testfile.txt
So it appears that my USB stick is correctly mounted in /dataMine and can be read and written to.
However, every time I go into datamine and go to the graphing page, it asks for my USB UUID and the drop down box is completely blank – I can’t select anything!
I’ve gone into “develop apps”, then the serial port, then clicked “reload luup”, but that does nothing. Watching the logs, the reload luup button actually isn’t even reloading luup.
So I’m stuck and looking for suggestions on how to get this to work. (Need it for Imperihome, which apparently doesn’t work with DataYours.)
And what way would that be? I’m finding it very tough to believe that Vera is incapable of formatting it correctly, especially since I was able to mount, read, and write to the USB stick.
OK that covers what not to use. What should be used and how should it be formatted?
Uhh, plenty of folks have written that they’ve gotten it to work in UI7 already. I believe you are mistaken.
Don’t waste time with the UI7 web page. Install the AltUI plugin - you won’t regret it. There is little down side and the original UI7 will continue to function.
Once Alt UI is running you can go to the Misc → OS Command menu and execute the command: blkid Or you can just SSH into Vera and execute it directly. It will report the UUID. This can then be entered in the Advanced Tab of the DataMine Plugin under SetMountUUID entry box. You can restart the Luup Engin in AltiUI under the Menu Misc → Reload Luup Engine or just use this URL:
The dataMine plugin does the mount so no need to manually mount it.
Well that’s how it’s supposed to work, unfortunately it doesn’t appear to work anymore. When I would put that UUID into datamine, though datamine would now start there were no additional mounts, and was trying to write to /dataMine as part of the root file system:
At that point I was tired of screwing around and decided to take things into my own hands as dataMine’s automounting is apparently now borked under UI7.
So for those playing along at home, here’s how you make dataMine work under a recent UI7 (mine is 1.7.1248):
[ol][li]plug in a memory stick[/li]
[li]go into settings, logs, click on “store logs on usb device”. Vera will reformat your USB stick and reboot.[/li]
[li]Go back into settings logs, then click off storing logs on usb device. Vera will reboot. (This is necessary so that in case you accidentally click it on again in the future, you don’t lose everything when vera insists on formatting it. You will sacrifice 1/2 gig on your thumb drive for this assurance. I think it’s worth it.)[/li]
[li]ssh into your vera edge[/li]
[li]mke2fs -L dataMine /dev/sda2
(This will create an ext2 filesystem on your second partition on your USB stick. Vera edge can format but not mount ext3 filesystems. It crashes and reboots if you try and manually mount an ext3 filesystem. Go figure!!)[/li]
[li]mkdir /dataMine[/li]
[li]mount /dev/sda2 /dataMine[/li]
[li]exit[/li]
[li]Now open up the web interface, go into the datamine device, click advanced, then click on variables. Don’t forget to click on the “switch to input type text” checkbox before each entry before you type in it!![/li]
[li]Clear SetMountUUID, if set[/li]
[li]Clear SetMountPoint, if set[/li]
[li]Set SetManualMount to 1[/li]
[li]Click on Apps, develop apps, then edit startup lua[/li][/ol]
Put the following code in your lua startup:
local cmd="mount /dev/sda2 /dataMine"
local ok = os.execute(cmd)
Reboot one last time and you should, finally, be able to run dataMine correctly, without trampling your root filesystem! (…that’s good.)
Really interesting to see that they have removed the blkid command from the distribution in the Vera Edge. It will create havoc in the dataMine checkUUID function.
Chris, the plugin developer, was working on the mounting before he moved to OpenHab. Many users were having their stick data destroyed when they inadvertently turned on the logging. So did Vera create the two partitions on the stick when it formatted the stick for the logs or did you do that on another box? It seems this is a good solution to accidental deletion of data by turning on the logging :-X
Also could you please post the dataMine plugin debug text- see “dataMine_debug_page” link on the plugin tab.
Would expect it to contain:
“Error opening tmpfile during UUID check”
or
“Error reading tmpfile during UUID check”
Plus the contents of in the Advanced Tab:
SetMountPoint
mountLocation
SetMountUUID
I would interested to see how they ended up. If they eventually contained the correct values or you manually set them, then you may no longer need your start up code to do the mount.
Glad you got it working and give the AltUI plugin a try out.
And what way would that be? I’m finding it very tough to believe that Vera is incapable of formatting it correctly, especially since I was able to mount, read, and write to the USB stick.
OK that covers what not to use. What should be used and how should it be formatted?
Uhh, plenty of folks have written that they’ve gotten it to work in UI7 already. I believe you are mistaken.
[/quote]
Sorry, my bad. I meant DO use CDFormatter.
I was only aware it would not work in UI7. Great news you can use it! However, I am sticking to UI5, but I will have 2 other houses and I will have no choice at that point but to go to UI7 with them.
Vera created the Mios partition. What I haven’t determined is if vera completely reformatted the stick and created the 1/2 gig partition, or resized the existing partition to make room for the 1/2 gig partition.
I had thought I put in the instructions how to create the second partition, but looks like when I was writing it up I missed that step. Whoops.
Truth be known, midway through the process I realized I was having a USB memory stick incompatibility issue between my original 8GB stick and the Vera. (I believe that’s what was the true cause of me being able to format but not mount an ext3 filesystem.)
The upshot is due to having that memory stick incompatibility I had to switch horses mid-stream to a different memory stick that already had a fat32 filesystem on it. I was getting tired, so I rolled with it. The plan is to let dataMine run a couple of days, copy the data off, nuke the entire memory stick, test/re-write my instructions from scratch and then copy the data back on. I believe the existing instructions are mostly correct, except for the part where I forgot to mention to go into fdisk and create the second partition.
(I’d really prefer to have an ext3 filesystem rather than ext2 or fat32!)
Also could you please post the dataMine plugin debug text- see "dataMine_debug_page" link on the plugin tab.
Sure… not sure what it gets you, but here it is in all its verbosity!
Would expect it to contain:
"Error opening tmpfile during UUID check"
or
"Error reading tmpfile during UUID check"
Don’t see anything of the sort. I am getting lots of “dataMine: Events Ret -1”, but I think those are because of my Aeon HEM. (Vera constantly complains about phantom nodes on that device.)
Plus the contents of in the Advanced Tab:
SetMountPoint
mountLocation
SetMountUUID
No such animal on a Vera Edge. But here are the device variables.
I would interested to see how they ended up. If they eventually contained the correct values or you manually set them, then you may no longer need your start up code to do the mount.
Nope, they’re thoroughly blank at this point.
Glad you got it working and give the AltUI plugin a try out.
It’s on my list of stuff to try, just have bigger fish to fry right now.
The dataMine plugin does the mount so no need to manually mount it.
Well that’s how it’s supposed to work, unfortunately it doesn’t appear to work anymore. When I would put that UUID into datamine, though datamine would now start there were no additional mounts, and was trying to write to /dataMine as part of the root file system:
At that point I was tired of screwing around and decided to take things into my own hands as dataMine’s automounting is apparently now borked under UI7.
So for those playing along at home, here’s how you make dataMine work under a recent UI7 (mine is 1.7.1248):
[ol][li]plug in a memory stick[/li]
[li]go into settings, logs, click on “store logs on usb device”. Vera will reformat your USB stick and reboot.[/li]
[li]Go back into settings logs, then click off storing logs on usb device. Vera will reboot. (This is necessary so that in case you accidentally click it on again in the future, you don’t lose everything when vera insists on formatting it. You will sacrifice 1/2 gig on your thumb drive for this assurance. I think it’s worth it.)[/li]
[li]ssh into your vera edge[/li]
[li]mke2fs -L dataMine /dev/sda2
(This will create an ext2 filesystem on your second partition on your USB stick. Vera edge can format but not mount ext3 filesystems. It crashes and reboots if you try and manually mount an ext3 filesystem. Go figure!!)[/li]
[li]mkdir /dataMine[/li]
[li]mount /dev/sda2 /dataMine[/li]
[li]exit[/li]
[li]Now open up the web interface, go into the datamine device, click advanced, then click on variables. Don’t forget to click on the “switch to input type text” checkbox before each entry before you type in it!![/li]
[li]Clear SetMountUUID, if set[/li]
[li]Clear SetMountPoint, if set[/li]
[li]Set SetManualMount to 1[/li]
[li]Click on Apps, develop apps, then edit startup lua[/li][/ol]
Put the following code in your lua startup:
local cmd="mount /dev/sda2 /dataMine"
local ok = os.execute(cmd)
Reboot one last time and you should, finally, be able to run dataMine correctly, without trampling your root filesystem! (…that’s good.)[/quote]
Thank you sir for this post. It solved my issues.
Best Home Automation shopping experience. Shop at Ezlo!