Recover an ‘assumed bricked’ Vera Secure
-
The value is also written to NVRAM and may be still be there. Try:
nvram get serial_no
-
destinationwrote on Mar 22, 2021, 8:10 PM last edited by destination Mar 22, 2021, 4:16 PM
@rafale77 and @toggledbits ,thanks both of you for this wonderful informations. What should I get when returning this
nvram get serial_no
code? I already have another (new unit) tried that code but no return any output. Maybe tomorrow I will need to ask support for that file -
You should be getting the serial number of your unit which should also be the content of your missing file.
You can then just create that file and insert that serial number in it using a text editor. I believe the vera only has "vi" installed but I had installed "nano" on mine which I vastly prefer. -
I will ask support tomorrow I hope I get a positive feedback.
-
toggledbitswrote on Mar 22, 2021, 8:43 PM last edited by toggledbits Mar 22, 2021, 4:46 PM
If the serial number is on the label of the unit, all you need to do is create the file with that number in it.
If you scratch it down on a piece of paper, do this to avoid the editor:
cat >/etc/cmh/PK_AccessPoint
That will just sit there doing nothing waiting for you to type. Type in, carefully the serial number from the label, then hit ENTER once, then hit CTRL-D once. You should get the shell prompt again. You can then confirm the file exists and has the right content.
-
Thank you @toggledbits . I will try your advice tomorrow and see the result.
-
destinationwrote on Mar 23, 2021, 10:51 AM last edited by destination Mar 23, 2021, 6:56 AM
-
destinationwrote on Mar 23, 2021, 12:35 PM last edited by destination Mar 23, 2021, 8:40 AM
-
The error from your screenshot is pretty explicit... You are missing the libjson library for some reason. It looks like your firmware image was incomplete and was missing a lot of stuff.
run
opkg update opkg install libjson
You likely will have other errors and will have to complete installation of dependencies.
-
destinationreplied to rafale77 on Mar 24, 2021, 11:16 AM last edited by destination Mar 24, 2021, 7:18 AM
@rafale77 said in Recover an ‘assumed bricked’ Vera Secure:
The error from your screenshot is pretty explicit... You are missing the libjson library for some reason. It looks like your firmware image was incomplete and was missing a lot of stuff.
run
opkg update opkg install libjson
You likely will have other errors and will have to complete installation of dependencies.
Thanks @rafale77. Thats solve
curl :(7) Failed to connect to 127.0.0.1 port 3480: Connection refused
error but aftre I noticed that when trying upgrade the firmware manually I see thatcp -af PK_AccessPoint HW_Key HW_Key2 zwave_locale cmh.conf servers.conf users.conf services.conf user_data.json.lzo /etc/cmh/ cp: can't stat 'HW_Key': No such file or directory cp: can't stat 'HW_Key2': No such file or directory cp: can't stat 'zwave_locale': No such file or directory cp: can't stat 'users.conf': No such file or directory cp: can't stat 'services.conf': No such file or directory
errors at the very long upgrating scripts. It seems installing new bin file is hardware based at vera secure, maybe i need
HW_Key and HW_Key2 files
-
Looking in the newmios-hooks.sh, file there is a line in there that says
PRESERVE_CMH_FILES="PK_AccessPoint HW_Key HW_Key2 zwave_locale cmh.conf servers.conf users.conf services.conf user_data.json.lzo"
Which I assume means it expects them to be present, and to remain ?
I’m not very good at understanding the linux BASH/Shell language, but here looks to be the part where it’s used.
mios_pre_firmware_upgrade() { log "Running: mios_pre_firmware_upgrade" case $1 in backup_cmh_files) log "[MH]BACKUP CMH FILES: $PRESERVE_CMH_FILES in : $BACKUP_CMH_DIR" rm -rf $BACKUP_CMH_DIR mkdir -p $BACKUP_CMH_DIR cd ${CMH_DIR}/ cp -af $PRESERVE_CMH_FILES ${BACKUP_CMH_DIR}/ cd - ;; restore_cmh_files) log "[MH]RESTORE CMH FILES: $PRESERVE_CMH_FILES from : $BACKUP_CMH_DIR" [ -d "$BACKUP_CMH_DIR" ] && { cd ${BACKUP_CMH_DIR}/ cp -af $PRESERVE_CMH_FILES ${CMH_DIR}/ cd - } || log "[MH]BACKUP_CMH_DIR ($BACKUP_CMH_DIR) NOT FOUND. Unable to restore cmh files" ;; *) log "[MH]Deleting version dependent files from /etc/cmh: $DELETE_CMH_FILES" cd /etc/cmh/ rm $DELETE_CMH_FILES 2>/dev/null cd -
The above refers to this location
BACKUP_CMH_DIR="/tmp/backup_cmh_dir"
Can you see what’s in the above /tmp/backup_cmh_dir ?
Do you have a ‘backup’ file - if not in there perhaps one stored outside - you may be able to request it from Vera ?
-
destinationwrote on Mar 24, 2021, 3:24 PM last edited by destination Mar 24, 2021, 5:07 PM
There is nothing at /tmp/backup_cmh_dir. But I already have
ha-gateway-backup_XXXXXXXX_1.7.XXXX_2020-09-25.tgz
backup file. The vera restore page is not work also other interfaces too. What sould I do to restore the tgz backup file from ssh? How can I do that? -
This is all new ground to me, but if you can I’d have a look in the .tgz (compressed/zipped) file and see what’s in there.
-
destinationwrote on Mar 24, 2021, 9:26 PM last edited by destination Mar 24, 2021, 5:33 PM
Matther is not how to decompress .tgz file. How to restore with ssh? I hope @rafale77 or @toggledbits or another experienced user read here and teach us.
-
tgz files are very easy to decompress. I think it stands for tar-gzip. You can just untar it. (it's a standard linux tool)
tar -xzf ***.tgz
These decompress automatically on macOS.
You will likely find a few files including the user-data.json. I wrote a script back in the old times to manually backup and recover these files and I think one such automated script is in the vera firmware. It should help you move the files to the right folders. Unfortunately it's been a long while since I last tinkered with the vera.
-
You can put the file up on your Vera using scp (or a tool like WinSCP if you are starting from Windows). I would put it into
/storage
for the time being. Then run this:tar -C /tmp -x -v -z -f /storage/backup-file-full-name-here.tgz
This will de-tar the backup file into
/tmp
, in a subdirectory calledetc
(so full path is/tmp/etc/
). You'll find several subdirectories within that (cmh
,cmh-lu
, and so on). You can copy the files you think you need one at a time, just make sure you copy them to the right place. -
I finally got around to connecting my PC to the VeraSecure via usb tty, to see what I could do - and I’ve posted some photos on the Vera forum - https://community.ezlo.com/t/can-the-veraplus-be-unbricked/204485/42
Currently I can’t seem to get a network connection, no IP address being provided to allow me to connect to anything, such as a tftp server, but..
Based on what I’ve posted, looking in the root of Vera, I have the following under storage, is this of any potential use ?
root@MiOS_5510000:/storage# ls -l drwxr-xr-x 2 root root 0 Jun 17 2018 cmh-backup drwxr-xr-x 5 root root 0 Jun 17 2018 cmh-firmware
cmh-backup was empty, but in cmh-firmware, i can see the following
drwxr-xr-x 2 root root 0 May 22 2018 1.7.3062 drwxr-xr-x 2 root root 0 Jun 17 2018 1.7.3535 drwxr-xr-x 2 root root 0 Jan 1 00:00 1.7.3832 -rw-r--r-- 1 root root 156 May 22 2018 error.log -rw-r--r-- 1 root root 162 Jun 17 2018 latest_firmware.conf
Within the error.log, it seems to only say...
2018-05-22_15:12:38 - ERROR: Failed to copy MiOS Squashfs MD5SUM into jffs2 partition 2018-05-22_15:12:38 - ERROR: Mismatched md5sum of new Firmware Script
-
Hi all,
Can anyone think of anything I should try to reinstall/restore the firmware?
As I don’t have access to it via an IP address on the network, I potentially could plug in a USB key to transfer or run any files ?
-
Hi @therealdb - yep and they finally got back to me..
It seems according to their records, the controller I picked up 2nd hand was declared defective and replaced a while back. And when this happens, and the hardware is not returned, a call is sent to the unit to deactivate it and it gets permanently banned from their servers. This means the controller will not connect anymore so it won’t pick up an updates and they are not allowed/able to provide support...
As I have command like access to it, I’m wondering what I can still do with it.
Any ideas anyone ?
31/45