"Scan Network" deletes all existing camera definitions

Current Development version likely to have breaking changes
Post Reply
User avatar
AllenTuttle
Posts: 30
Joined: Tue Sep 25, 2007 4:56 pm
Location: Sequim WA.

"Scan Network" deletes all existing camera definitions

Post by AllenTuttle »

My Ubuntu 22.04.3 LTS updated Zoneminder, it now shows as v1.37.45.
There is a very prominent button titled "Scan Network" which quickly gave me a list of all none camera devices on my network.
That was useless so I just clicked on the 'console' option to go back to checking my cameras.

Unfortunately, all cameras are gone now, nothing filters, cycle, montage, etc.

Camera data remains in /var/cache/zoneminder/events so that is nice.... I hope.

Log console shows ZM tried to reach at least one camera as there is an error "zmc_m5 Unable to read packet from stream 0: error -5 "Input/output error"."

All the usual processes are running except zmcontrol.pl and no "zmc -m <#>"

Of course I am hoping someone has seen something like this and knows how to non destructively recover the cameras configs that "Scan Network" destroyed.
---
Bonuos issue: Scan Network has never worked for me, if I click on the Add button on that screen the response pop-up is always "No url in button"
dougmccrary
Posts: 1322
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: "Scan Network" deletes all existing camera definitions

Post by dougmccrary »

Bummer. I'm guessing you don't have a backup of at least the Monitors table?
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: "Scan Network" deletes all existing camera definitions

Post by iconnor »

It may be that they are only marked deleted in the db. We don't actually delete monitors anymore
User avatar
AllenTuttle
Posts: 30
Joined: Tue Sep 25, 2007 4:56 pm
Location: Sequim WA.

Re: "Scan Network" deletes all existing camera definitions

Post by AllenTuttle »

You've given me hope, thank you!
Will locate the database and see if I can figure out the proper field to edit.
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: "Scan Network" deletes all existing camera definitions

Post by iconnor »

Once you get to a mysql command prompt... this should do it:

UPDATE Monitors SET Deleted=false;
User avatar
AllenTuttle
Posts: 30
Joined: Tue Sep 25, 2007 4:56 pm
Location: Sequim WA.

Re: "Scan Network" deletes all existing camera definitions

Post by AllenTuttle »

Thank you for your perfect help.
As you had suggested each camera was set "Deleted: 1".
After running "UPDATE Monitors SET Deleted=false;" they were set "Deleted: 0" and I can get back to monitoring the activities of the Hummingbirds.
Amazing how easy it is after someone sets me on the correct path....
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: "Scan Network" deletes all existing camera definitions

Post by iconnor »

The question remains why they were deleted. I suspect a simple miss click but you would have to select all an then click Delete... which seems unlikely...

If you have some nice footage of hummingbirds, would be nice to see and or use to train AI. Care to post some?
Post Reply