Error: Cannot get property 'cond' on null object

Have a rule that is critical as it contains all my “mode changed” activities. All I did was delete a condition that was not longer being used in the rule. Now I can’t even see the rule and get an error telling me to look at the logs.

Other than restoring from a backup is there anything I can do? This happens fairly frequently with Hubitat and makes me want to look into home assistant which apparently can handle more than basic setups. Would be great if Hubitat created rule backups/revisions. I think webcore might do that(?).

Not a solution for your current issue but I would suggest in the future that you clone the rule before you attempt to modify it. That way you can just delete a corrupt rule and still have a copy that'll get you back to your original starting point without having to restore from backup. I do this with my complex rules that I don't want to recreate from scratch.

Yeah I just thought of that too. Good practice. What I did was download the nightly backup. Create a current backup. Restore nightly backup---and export the rule. Restore the current backup. Delete the borked rule. Import backup rule.

This should not be so involved though for a mature platform. I've been on hubitat for years. Seems like it breaks so easily these days. Automated backups/revisions would help mitigate. I'm worried about doing "too much" in it now.

I'm just glad I was able to get my logic back---even with all the work required to do it. Breaking the rule and just tell me to "check the logs", which opens a blanks screen, is not good error handling. At least show me the code so I can understand what's going on...or something...anything. Maybe there is a way to view the rule as code. No idea.

Well now I have duplicate devices---not everywhere but esp. virtual switches---after the restore. Ugh. Might be time to make the jump.

Did you do a soft reset in between restores?

If you can look in Past Logs to when it threw that error, and post a screenshot of the log entry, I could possibly track down what happened. It shouldn't barf on you like that...

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.