Corrupt database, 500 error, rcd trip

I just got home from major surgery (mastectomy) and I was getting a 500 error. Now I'm getting a corrupt database message and it wants me to do a soft reset.
Am I going to lose everything on this? I rely on this for almost everything in my flat. I'm not well enough to build everything back up from nothing. I've done backups but I've no guarantee they're good.
I've tried shutting it down for 5 minutes and reconnecting but that doesn't seem to work. Is there anything else I can try before the reset because I think I'm right in saying this kills everything I've set up on the hub and that will probably be the end of me as well..

The Soft Reset is one of the safest "scary things" you can do. :smiley:

I've done Soft Resets 5-6 times in one day if I'm going all out on helping someone overcome a problem in the Community.

A Soft Reset DOES wipe out everything BUT it is almost always followed by a restore of a backup. It's the restored backup that does the trick. When you export a backup to your local PC, that process removes most DB Corruptions. Restoring a DB, would also remove corruptions.

My advice is to follow the Documentation. Soft Reset | Hubitat Documentation

The introduction of the C-8 (and the C-7 before) makes the Cloud Backup a point of confusion. The Cloud backup includes a copy of the Z-Radios while a local backup does not. However, a soft reset does not touch the Z-Radios, so that Local backup is a perfect match to the soft reset step.

5 Likes

Also on top of that the hub should be scheduled to do automatic backups, so you could have a backup saved on the hub from just a few days ago. I forget what the default schedule is but I think it comes configured for automatic local backups without having to set it up.

That isn't the problem. The problem is that if this doesn't work, everything electrical in my flat is completely uncontrollable. I live in constant pain (burning when anything touches my skin and my joints feel like someone is butchering me) as it is and currently half my chest is an open wound. I'm practically crawling around the flat and everything I rely on to be able to live has been trashed by an rcd trip...
I've made backups but I can't be sure they're good and I can't see how to get them onto a hub because there doesn't seem to be an option to do it.

How do I get a backup onto the hub and what do I need to do afterwards because those instructions are not very helpful.

First you may want to use "Download Backups" in the diagnostic tool so you have the most recent backup saved locally as well.

Since you cannot access the normal UI, you must do the soft reset in order to restore the backup.
Even if you could just load the backup without the soft reset first, part of the restore process is to do the same thing as a soft reset anyway.

Once you do the soft reset the hub will reboot and prompt you to restore a backup.

1 Like

Begin by saving a local backup...

Settings: Backup and Restore. You'll see this pair of options:

Click the one on the left and it will save a copy to where your browser sends Downloads.

Then, do the Soft Reset and go back to Backup and Restore and click the Choose File in the right option... find the backup you made 2-3 mins before. Click Restore and that's it. The Hub will install it and reboot to it. Everything should be back to normal.

If you go to Settings: Backup and Restore, there's a click that will expose all the automatic backups.
Screenshot 2023-05-13 at 10.40.22 AM

Those backups are fundamentally the same as the Local backup, but they get created on every reboot. Thus people's frustration level may cause them to reboot and reboot and discard a backup that might be old enough to be prior to the corruption. In your case, you could look for a date just before going to hospital, for example.

So that's the two main choices.. download a backup "Now" and restore that, relying on the de-corruption process built into the export, OR use an automatic backup from a date before the troubles began.

I was assuming since they were getting an error about a corrupted database that they cannot access the normal UI? Everything would need to be done with the diagnostic tool. Could be wrong though, I have never had that happen to me so not sure what it looks like exactly.

1 Like

I'd say that your "recipe" is ideal if the UI is inaccessible.

"it wants me to do a soft reset" was the launch point for my "recipe" because of the implied working UI. But again, if the UI isn't working, go with your "recipe" :slight_smile:

It worked. The hub is taking automatic backups at 3am every day apparently. Be aware if you try to run this off a phone, various apps might try to hijack the backup files because of the *.lzf extension. They think the file is theirs.
Everything appears to be working fine other than the sockets I was trying to set up that caused this issue and an electric shock. Will need to reconnect those later. The voice controls (Alexa/Google) are working.

It turns out I could get to the settings page on the hub while it had the bad database issue, but the other app on 8180 probably an easier way.

Im now going to take a lot of oxycodone and try to calm down. Pain is through the roof.

Incidentally. The C8 zigbee issues. I had a thought. If the C8 transmitter is much more powerful and you have the same repeaters in your network as before? What's to stop two signal paths? What's stopping the C8 transmitting direct & the signal being routed through the repeaters at the same time? I'm old enough to just about remember Token Ring and if things weren't perfectly connected you got reflection transients that gave the network brain weebles. I wonder what happens with a zigbee device when it's getting the same requests, packets etc from at least two directions at once? I doubt it'd be very happy about that. So I might think about pulling repeaters and setting the zigbee radio to high, and then reducing it until you start to see issues then put the signal back up one.. Or keeping the repeaters and running the radio up from the minimum - to see if that stops the issues.

1 Like

Because it's not an analog signal just beaming to what ever is around. Each device essentially has a mac address. It connects through what ever math it does through the quickest route while at the same time doing aes128 encryption. If it's route checking comes across a better repeating node or if it's better directly to the controller, it will go that way. The power of the radio signal is for seeing the node. If the node it sees has a better route it will use that instead... (this is by far a simple explanation and not complete in any sense but you get the gist)

1 Like

Definitely a bad situation to be in.

Hopefully now that you’ve followed the suggestions made by the hub and a few community members, you’ll understand the role of soft resets and restoring a hub backup when you’re running into problems. As @csteele put it, it’s usually not as scary as it sounds.

To avoid even a temporary but complete loss of control of something as basic (and essential) as electricity, it helps to setup a smart home in such a way that the built-in, manual controls (i.e. light switches) still function, whenever possible.

Best of luck with your recovery from surgery.

:point_up: Yes I took this approach as well. It also helps with getting people accustomed to it so they can still use the normal wall switches. Also helps with guests that may not be used to automations, dashboards or button controller devices. I only have a few non-essential devices that can only be controlled via the hub (from button events).

1 Like

I know how the systems work and the MAC address is kind of irrelevant, the MAC acts as a identifier and security, and any signal coming from or to the hub from/to that device will contain it. The hub will send a signal out using the MAC (in zigbee). After that there's three options - the signal doesn't reach anything - the signal reaches its intended device directly with that MAC - the signal reaches an extender which looks at the MAC and if its in its routing table sends it on. Whatever route the signal takes, it always has the MAC so the MAC doesn't lock out a given signal, it does the opposite.
If there are signal duplicates the device will get two or more completely valid signals (the extenders just receive an encapsulated signal with a routing entry for that device) through whatever source and then you get collision and signal interference. This would explain why devices are dropping off the mesh because they don't have the brains to interpret what's going on (Wi-Fi cards have various protocols and systems to deal with collisions or duplicates (zigbee devices, especially battery ones, don't have the same level of pre processing). As to pairing problems, I'm not so sure. The only way to work this out is to physically record what signals a device receives while active on the network which is more than I'm capable of doing here.

As to the manual control of my setup, you can control 90% of it manually (with clear access), and what you can't was supposed to recover "on", which of course it didn't... But note I use "you". We need to push for a specification in smart home gear that manual switches are a requirement, because some of the devices are completely incapable of manual control, including multiple power sockets . My mobility is almost zero because 24/7 I feel like people are sticking knives in every joint and I have a constant under skin sunburn (the best way of describing it) or 2nd degree burn. Add to that a 600g tumour was just removed and half my chest is an open wound.. Oddly enough, the rare areas of no pain = sleeve neuropathy (ie numbness, pins/needles). The smallest movements or actions are agonising.. Eating, drinking, walking..

Apologies for any spelling mistakes or uncaught autocorrect, but you could float a small treaty cruiser on the amount of opiates I'm on and it's 1:40am.

Something I've been experimenting with has been bridging. Using G.Homes ability to talk to almost anything to set up one system to control another - ie a smartlife sensor triggers a G.Home (smartlife) socket which then controls a Hubitat socket. Works quite well.

My general point was because of design the power of the zigbee signal would not push it through 2 or more different nodes, it would only push to the best node routing.

It would be simpler to just avoid purchasing devices like that.

2 Likes

Or make sure they can't be manufactured. I don't know but I suspect that in the UK and US if there's no physical switch on a mains power device or power extension capable of switching them off they'd be illegal, but they're still sold here. I've seen the multi plug extensions without switches available on Amazon (not so much we can do with aliexpress and sites like that).
My applications are low voltage where I use extensions except one extension feeding two microwaves and they're monitored so they don't get close to 3150w ever and that one is switched.
Thinking about it I can switch them out using a zigbee socket monitoring power draw, but it's not a fantastic idea especially when far too many people don't understand the basics of electrical power.

But are we absolutely sure that's what it's doing? I used to write software. If you want to see a bad day with unexpected software actions look up Therac 25 error message 54. It made a simple radiotherapy treatment into the equivalent of being hit by Cherenkov radiation.. One person was supposed to get a radiation treatment of 83 units, he got 17,000 units. It didn't end well.

Happily, Therac 25 are long retired and the problem was eventually fixed.

But only one person got the overload. Regardless of the signal strength the hub will use best routes and even if the same instruction is sent to multiple units, only the one with the proper identifier in the header is going to respond, other will ignore it.