Argh: Another Unifi Factory Reset, beware Unifi Protect Playback hang and UA-Hub

Argh, one of the bad things about me is that I’m always pushing software. In this case, we’ve had such a good experience with Ubiquiti Unifi, that it’s now in four locations (going to six in my informal support network). Except for the Unifi OS v1.0.9 hang, the Network application (as they now call their controller) has been rock solid, although having a beta UI and a “classic” Ui is pretty frustrating.

But, for the last month after the rebuild to 1.0.10, I’ve had this problem that the Unifi Protect (their camera system) does record events and send events streams to Apple Homekit through Homebridge, but playback does not work. It hangs in the Web UI with a “something is wrong” message and despite posting on their community forum and Reddit, there has been no answer.

The last time I had this, I just powered down the UniFi and put in a new hard disk and it just worked for a while. This time when I did the same, the UniFi Protect application just failed when I tried to do an upgrade to version 1.19 (silly me!), I ended up with no UniFi Protect installation at all. When I SSh’ed into the device, there was nothing in the unifi-os/protect directory! And there is apparently no way to do a reinstall that I can find. It is so awful that Unifi doesn’t have any notion of reinstall, so apparently, they only want to start again is a Factory Reset of the whole controller.

The UniFi Protect Playback Hang and don’t just swap a hard disk

I still don’t have any idea what is going on here, but when you first load the UniFi Protect it works fine, and then after about 24 hours if you go to Protect > Events and try to playback an event, it just hangs and doesn’t do the playback. No resolution on this one that I can find. The strange thing is that you can download the video, but playback does not work on the WebUI or the iOS application.

In fact, the iOS application does show motion events in thumbnails for instance, but it will say things like “unable to stream”. Or it sometimes hangs just waiting for events, like nothing is coming from the backup.

So, trying to fix this, I naturally tried to swap hard drives since I thought it might be that, so I did the shutdown the Unifi Dream Machine Pro (UDMP) and replaced it. This was a horrible idea as I ended up with an UniFi Protect that was stuck, it basically said it was trying to set up and this would fail

Complete guide to Console Control Backups and Network Backups

Ok, the really confusing thing, first of all, is that with UniFi, there are actually two kinds of backups and neither really do what you want. The first is a backup for Console Controls. You get these by going to your controller WebUI and then so-called main Settings > Advanced > Backup Configuration, this gives you a set of 20 backup files that are uploaded to the Unifi cloud if you enable Back up Console and you run Back up Now or the Backup scheduler. You can then download them into a .unifi file by clicking on Download Backup and waiting a long time. This is about a 500KB file and it is only the configuration of the Web UI it appears. So, it doesn’t do what you would expect which is a full backup of the firmware. And, when you try a restore, it is only restoring the various database files. So, if you have a bad UniFi OS or one of the four applications (Network, Protect, Access and Talk), that does not help you.

Then, there is another set of backups that are in the Network application, so go to your Controller and click on Network > Settings > Backup and enabler Auto Backup and then you go to Backup/Restore and then Download Backup and select how many backups you want, you can No Limit for instance and then you wait minutes and eventually, a .uni file appears with the various settings. What is also super confusing in the user interface is that is no way to do an immediate backup, the only way in the new UI that you can create a .unf file is with a scheduled backup.

What is not backed up are the device passwords

What is not backed up, because this is not actually a tar of the system is the all-important security password for individual devices. Also, it does not back up the actual software itself. So if you are having problems with versions, then you either have to do a firmware update manually via SSH or do a factory reset.

The really confusing here is that Unifi Network (the formal name of the old network bits that that is an application above Unifi OS console, confusing names I know), is that with these things, you need to make sure to manually copy and backup three different pieces of information if your controller completely dies which are per application and console:

  1. Network Device User name and Password. These are the ssh name and password for each access point and network device. Note that when I did a factory reset (see below), of the 10 network elements, two did not use this default password and had to be reset with a paper clip. Sigh. You get this by going to Network > System Settings > Device Password
  2. UniFi OS Console SSH Password. Then in the UniFi OS, you go to Settings > Advanced > SSH Password and there you create a password for the UniFi OS itself. These are not the same, but it is the password for root
  3. Unifi Protect Device Password. Finally and most confusingly, the UniFi cameras have their own password, it is not clear how to ssh into them, but you need this otherwise you have to hard reset each camera.
  4. UniFi Access. OK, these do have a factory reset, but you can not readopt them unless, you first unhook them from the controller with working software.
  5. UniFi Talk. There is no way to get their password, they require a hard reset of every phone if you have to move to a new controller which is a bit of pain.

Try WebUI reset and firmware down level update

Ok, there are three different levels of reset that you should try before you have to do the factory

  1. Unifi OS Console. OK, if the web UI is not working what do you do, well, you get the controller ssh root password and then run unifi-os reset
  2. Unifi OS Console. If you SSH into the controller, you can upload a firmware bundle (so in concert with the settings and device passwords above, you can use the two to get back) with ubnt-upgrade <download link> and this will give you a known collection of the UniFi OS and all the applications.
  3. UniFi Network. You can update the UniFi Network itself which is just going to be a debian package (but not the other applications) specifically with you can do a unifi-os shell to get into the UniFi environment and then do a cd /tmp && rm -f /tmp/* && curl -o "unifi_sysvinit_all.deb" <the network download link>. And, then you can do a dpkg -i unifi_sysvinit_all.deb

Factory Reset Guide: Get your passwords, unmanage your devices

OK, I did this already once and did a factory reset and learned a lot, but if you do this, then here is the guide to how to do it:

  1. Preparation: Password. Make sure you have the SSH keys above and remove the UA Hub from the management. (see above, but you can’t factory reset them and have them adopt AFAIK).
  2. Unmanage your all UniFi devices. To make it easy, I would also unmanage all your APs, switches, cameras and access hubs, you only really need this with UA-Hub which has no other way to reset.
  3. Now Factory reset your UDMP. There are three ways, if the Web UI is working you can reset, or you can do it from the small screen on the device itself in settings. Finally, you can SSH in and run set-default

If you didn’t unmanage then readopt

If you are an idiot and you didn’t unmanaged all your devices, then you have to adopt all of them:

  1. UniFi Access Points and Network switches. Theoreticaly you can run adopt from your new controller instance and type in the SSH user name and password. I actually found this worked on 8 out of 10 devices, so in reality, you are going to have to factory reset some of these. The basic procedure is to unmount the access point, then gently press the reset button and it should become flashing white. One thing to make sure to do is that if you are restoring the image, if you have that APs MAC id loaded then you need to forget the device and then it will appear.
  2. UniFi Protect cameras. You basically unscrew each camera and there is a reset button on each of them for 10 seconds and it should blink white. I actually found this unreliable. So the best is to remove the POE power, wait a bit and then do this. It can definitely fail and then blink green, so wait for it to blink white. Also, it takes minutes for the device to magically appear in the UniFi Protect applications, but eventually, you will get a notification. For the doorbell, you carefully push the tab at the bottom up and lift it up, then hold down the burrong at the very top for 10 secnods to res
  3. UniFi Talk. This works a little strangely, you basically unplug it and have the handset off hook, then press the mute button and hold it when you apply the power. You will get into an ugly character user interface menu and then you quick click the mute button to get to factory reset. Long click on that. Then quick click to Reboot and you are good to go.
  4. UniFi Access Hub. There is a reset btutton that you push and hold for 10 seconds, but this does *not* actually do a full factory reset. AFAIK there is no way to do a factory reset, the Hub is always bound to a controller unless you manually unmanage it first. Sigh!

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect

Recent posts

Loading Mastodon feed…