We have moved at community.getvera.com

Author Topic: VeraPlus Flash drive usage  (Read 3274 times)

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: VeraPlus Flash drive usage
« Reply #45 on: January 25, 2019, 10:01:45 pm »
Out of curiosity, I downloaded a couple of firmware upgrade files from mios and mounted them to see what is in there. Turns out they only contain an image of the rootfs-data partition which is ~10MB so I don't believe mios/vera repartitions the drive or upgrade the kernel or boot loader on our units. It doesn't seem to be capable of doing it. It limits what vera can do in the upgrades to just changing the zwave/zigbee firmware and the LuaUPnP program and the cmh proprietary code.
Also been trying to switch from one firmware image to the other or maybe to the backup and have not been successful, having tried various combinations of buttons during the boot up. I suspect the second firmware partition and the backup partition are just empty. Sorin? Cristina? any input? This seems to be, I am sorry to say, a very poorly thought through flash memory arrangement. I am really puzzled... Why give us a 128MB flash chip to use only about 30MB of it?
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline Buxton

  • Full Member
  • ***
  • Posts: 209
  • Karma: +12/-0
Re: VeraPlus Flash drive usage
« Reply #46 on: January 25, 2019, 10:09:50 pm »
Quote
Why give us a 128MB flash chip to use only about 30MB of it

Indeed.  I'd love to be able to safely re-size my partitions on my veralite, as hitting the limit of the rootfs-data partition seems to be the most common way people brick their machines.  I won't even get near an upgrade anymore for fear of bringing down the whole box.  Failing a repartition, offloading to an SSD is a possibility if anyone can get that to work with veralites.....  That would future proof the radio to some degree.

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: VeraPlus Flash drive usage
« Reply #47 on: January 25, 2019, 10:22:43 pm »
Quote
Why give us a 128MB flash chip to use only about 30MB of it

Indeed.  I'd love to be able to safely re-size my partitions on my veralite, as hitting the limit of the rootfs-data partition seems to be the most common way people brick their machines.  I won't even get near an upgrade anymore for fear of bringing down the whole box.  Failing a repartition, offloading to an SSD is a possibility if anyone can get that to work with veralites.....  That would future proof the radio to some degree.


I have an old veralite, maybe when I have time, I may try to extroot it... DId you try the script I posted on the extrooted thread? I updated it recently to force the mounting of the USB drive earlier.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline Buxton

  • Full Member
  • ***
  • Posts: 209
  • Karma: +12/-0
Re: VeraPlus Flash drive usage
« Reply #48 on: January 26, 2019, 05:44:42 pm »
No I didn't try it per this message http://forum.micasaverde.com/index.php/topic,103140.msg414660.html#msg414660 .  "because Vera has removed all of the sources other than their own from /etc/opkg.conf."

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: VeraPlus Flash drive usage
« Reply #49 on: January 26, 2019, 05:56:57 pm »
My script overcomes this.... the comment is unrelated to the script provided. My script does not use Vera's sources.

I never actually paid attention to this comment from Rigpapa, not sure how I missed this and should have responded with a clarification. Thank you.
His comment is incorrect in the sense that vera never removed any source repository. What they did was to remove the standard packages from their own repository and only left the vera specific ones. My script changes the source altogether.
« Last Edit: January 26, 2019, 06:15:19 pm by rafale77 »
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline Buxton

  • Full Member
  • ***
  • Posts: 209
  • Karma: +12/-0
Re: VeraPlus Flash drive usage
« Reply #50 on: January 26, 2019, 06:52:52 pm »
OK.  I have a backup vera that I can test on.  I need to get an SSD and cable and then should be good to go.  If you do a similar test, I'd be interested in your results as you have some fundamental insights into the vera platform.  Thx

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: VeraPlus Flash drive usage
« Reply #51 on: January 26, 2019, 07:05:59 pm »
My production vera has been running on an external SSD for several months now. I have "fine-tuned" the script over time on a backup unit... There has been a lot of SSDs on sale lately. Prices are dropping. Extrooting has even been my safety net for a lot of my tests when I developed the mods to upgrade the vera packages and make mios server independent. I bricked the vera several times and the recovery was  just to unplug the SSD, boot the vera on the original partition, plug the SSD back and run the extroot script again. I still highly recommend extrooting whenever possible rather than this patch I posted on this thread.

I may need to create a vera light version of it though since the version of the repo may not work.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline svaleb

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +11/-7
Re: VeraPlus Flash drive usage
« Reply #52 on: January 28, 2019, 04:53:49 am »
Code: [Select]
cd /lib
cd is for "change directory" should get you to the lib folder.
Then run ./savespace.sh
You can verify the content of the folder by entering
Code: [Select]
ls
Make sure to not run the savespace.sh script twice.

Yes, I just dont know how to "run" it...the command string to run.
Something "chmod?." ??

Should I change to the new files before I try again?

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: VeraPlus Flash drive usage
« Reply #53 on: January 28, 2019, 12:10:12 pm »
Code: [Select]
cd /lib
cd is for "change directory" should get you to the lib folder.
Then run ./savespace.sh
You can verify the content of the folder by entering
Code: [Select]
ls
Make sure to not run the savespace.sh script twice.

Yes, I just dont know how to "run" it...the command string to run.
Something "chmod?." ??

Should I change to the new files before I try again?

1. Yes, please use the new file. It is a much safer and will prevent you from making mistakes.
2. You need to SSH into the box. If you use windows, try using a program called putty (https://www.putty.org), login to the vera using the same credentials as before and navigate to the file you just uploaded using winscp. Actually winscp normally allows you to login with putty as well.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline svaleb

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +11/-7
Re: VeraPlus Flash drive usage
« Reply #54 on: January 30, 2019, 07:02:44 am »
Succes (I hope)
This is what I got now :
Filesystem                Size      Used Available Use% Mounted on
rootfs                    8.6M      2.6M      6.1M  30% /
/dev/root                10.0M     10.0M         0 100% /rom
tmpfs                   124.8M      3.6M    121.2M   3% /tmp
/dev/mtdblock7            8.6M      2.6M      6.1M  30% /overlay
overlayfs:/overlay        8.6M      2.6M      6.1M  30% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock10          50.0M      6.7M     43.3M  13% /storage
/dev/mtdblock10          50.0M      6.7M     43.3M  13% /etc/cmh-firmware
/dev/mtdblock10          50.0M      6.7M     43.3M  13% /etc/cmh-backup
/dev/mtdblock9           10.0M     10.0M         0 100% /mios

I said something like : "could not remow storidge/etc no such directory".

What does that mean ?


Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: VeraPlus Flash drive usage
« Reply #55 on: January 30, 2019, 08:17:23 am »
It is normal. It was an extra step to remove a folder in case it already existed.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline svaleb

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +11/-7
Re: VeraPlus Flash drive usage
« Reply #56 on: January 30, 2019, 08:37:16 am »
Thanks !
I can see it made a lot of difference.

Offline svaleb

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +11/-7
Re: VeraPlus Flash drive usage
« Reply #57 on: January 31, 2019, 05:18:30 am »
Rafale I think this is great work !
A lot of others would need this to avoid problems.
I had no knowledge of how to do it.
You and Catman brought me through. Thanks !
In this tread it is, almost, there "how to".
I will try to collect it here so people as "stupid" as me can find most of it in one place.
Please correct me if I make errors in this.

"How to"

Useful links.

see this for ssh
http://wiki.micasaverde.com/index.php/Logon_Vera_SSH
likewise for scp you can use wincp for windows
https://winscp.net/eng/index.php
or Rbrowser for mac
http://www.rbrowser.com

https://ubuntudanmark.dk/filer/fwunixref.pdf

Download WINSCP
Hostname is your Vera IP
Port 22
Username: root
Password : the one on the bottom of your Vera
File protocol : SCP
Then login
Find your file and drag it into a directory ( in my case I chose "lib")
You find the Vera files on the right side by double clicking on the broken arrow at the top of the files.
Close

Next

Go to WINSCP
This time you chose PUTTY (in the bottom by the arrow at "login").
You start with your password and "enter"
You write : cd /XXX (instead of XXX you write the library where you have your file. In my case "cd /lib". Enter
Write :?ls? to open the directory and find the file "savespace" so you can see it is there. Enter
To make the file executable you write "chmod +x savespace.sh". Enter.
To run the file write : "./savespace.sh". Enter
You wil be asked if you are sure you want to run this file. Press "Enter" and you will get further instructions such as  Write : "yes", "no" or how to leave the session.
Write :"yes"
It will be confirmed that the file is running and LUA will restart.
In my case it said  something like "cannot remowe storidge/etc no such directory", Rafale has told me it is normal.
You are now finished.

If you have ALTUI you can check it there (os command) Free space.

READ reply #44 and get the most recent files (25 of Jan. 2019)
 
« Last Edit: January 31, 2019, 03:55:22 pm by svaleb »

Offline Catman

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +10/-0
Re: VeraPlus Flash drive usage
« Reply #58 on: January 31, 2019, 07:09:31 am »
That's a really useful piece of text, Svaleb. Well done!
I definitely feel that Rafale led you further, but most importantly, you're up and running

C

Offline svaleb

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +11/-7
Re: VeraPlus Flash drive usage
« Reply #59 on: January 31, 2019, 08:33:19 am »
I hope it is ok.
And that you did not find something wrong.