Factory Reset not working on Vera2

Hi,

I needed to set Vera2 to factory defaults, so I performed factory reset, by pressing twice quickly the reset button on the back of Vera2. The procedure didnt work correctly, the system seemed to reboot and make some operations, with some lights switching off and back on after a while.

However, when I load the web interface, the configurations are not erased, and nothing is set back to default values.

I read in the forum that this seems to be a known issue.

Someone suggested executing in console the following script:

/usr/bin/cmh_Reset.sh all

By doing this, my SSH connection is cut and the script does not follow execution from that point on, so I tried instead:

/usr/bin/cmh_Reset.sh all &

so that the script completely followed execution after closing network interface. In this case, what I get is the same procedure and result than by using the reset button.

Summarizing, something seems to be wrong with the Reset script that is launched by using the reset button. I’m newbie to Vera so I doubt a lot I have enough Vera knowledge to troubleshoot that script.

Is there any known solution to this?

Particularly, I need to set my Vera2 as primary controller since at the moment is set as SLAVE, and no options from the web UI (like resetting Z-Wave network and so on) are helping on this issue. If there’s no solution to this, that means that once you set Vera2 as slave it will be stuck to that role forever and it will never be possible to use it as primary controller!

Help would really be appreaciated!

Thanks a lot
and best regards.

By the way, I upgraded Vera2 from UI4 to UI5 a few hours ago, and there’s no different result when trying to restore to factory defaults. All the previous configuration is still there, and my Vera2 is working as slave, instead of primary controller.

Any suggestions?

Thanks in advance.

By the way, wouldn’t be convenient that you had a button in the UI to switch from secondary to primary, just as there is one to change from primary to secondary?

Just a suggestion for Vera developers!

Best regards.

With UI5, factory reset from the web UI, I finally succeeded to restore defaults. I couldn’t achieve it by quickly pressing twice the reset button or with UI4. Not sure why.

Best regards.

The reset for my Vera2/UI5 didn’t work either. I posted about it here.
http://forum.micasaverde.com/index.php/topic,9749.msg65421.html#msg65421

If you are interested, I can try to dig up the script bug that I fixed.

It kills the SSH session even though you used the “&”, but once the SSH session is gone, the script gets killed.

Normally, the primary role can be passed around, initiated by the primary controller. So, for a secondary controller to become primary (again), the primary controller would initiate that action. This to keep only a single primary controller in the Z-Wave network. That’s why there is not necessarily a button to just make Vera a primary or secondary controller.

Of course, if Vera becomes secondary out-of-the-blue, then there would be no primary controller to shift the role back from. For that (failure) case, a button like you propose would be handy. MCV added it as part of the [tt]Hack to convert 2.78 to 3.20[/tt] option, we have learnt.

oTi@: What you say does completely make sense. I can tell now the idea is always to transfer control from primary to secondary, so it’s the primary controller who makes the job, so it’s not that common in the opposite direction, unless you have an issue like the one I had.

PurdueGuy: If you find time to post which very line contains the bug and the fix you made, that would be really appreciated! With UI5 I succeeded to reset to factory default from the web option (not with the physical reset button). With UI4 I couldn’t achieve it with any of the ways. I don’t know if UI5 also install a new version of the script.

Thanks again and best regards.

I can’t find the file, which means I probably deleted it, thinking I would never need it again! 8)

However, the fix is easy, if memory serves. From the command line, when you run “/usr/bin/cmh_Reset.sh” it won’t work, since the SSH session is killed mid-run, which also kills the script.

As a workaround, I copied /usr/bin/cmh_Reset.sh to /tmp and modified one line, line 74.

OLD line:ps ax | grep -vE 'Command|init|\[[a-z]|kill|ps|ash|cmh_Reset|upgrade|mtd|\[loop.+\]|klogd|syslogd' | awk '{ print $1 }' | grep -v PID | xargs kill -KILL

NEW line:ps ax | grep -vE 'Command|init|\[[a-z]|dropbear|kill|ps|ash|cmh_Reset|upgrade|mtd|\[loop.+\]|klogd|syslogd' | awk '{ print $1 }' | grep -v PID | xargs kill -KILL

I added one additional check to the list of processes that are not killed, the “dropbear” process, which is the SSH server.

Thank you very much!

Really appreciated.