Reuse Deleted Monitor IDs

Current Development version likely to have breaking changes
Post Reply
marklg
Posts: 22
Joined: Sun Dec 17, 2023 1:43 am

Reuse Deleted Monitor IDs

Post by marklg »

When I create a new monitor and manually select a deleted monitor ID, it appears to save (twice) but it does not show up. What am I doing wrong?

zoneminder-1.37.50-1.104.20240130gitg517652907.fc39.x86_64

Regards,

Mark
dougmccrary
Posts: 1218
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Reuse Deleted Monitor IDs

Post by dougmccrary »

I just cloned one of mine in 1.37.50~20240208144613-jammy, and it showed up at the bottom of my console...
marklg
Posts: 22
Joined: Sun Dec 17, 2023 1:43 am

Re: Reuse Deleted Monitor IDs

Post by marklg »

dougmccrary wrote: Mon Feb 12, 2024 2:06 am I just cloned one of mine in 1.37.50~20240208144613-jammy, and it showed up at the bottom of my console...
It does if you leave the ID as automatic. It picks the next available ID and it goes at the bottom. I chose the ID manually, one that was deleted. It did not show up.

Regards,

Mark
dougmccrary
Posts: 1218
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Reuse Deleted Monitor IDs

Post by dougmccrary »

No, my next was 25. I selected 12 and it came up 12 at the bottom.

Ah -

But yes, there is some messiness there. I can only reuse ones suggested below the ID field, and apparently only once, even after a reboot.

There was a temporary browser problem, but I think that will resolve when this is fixed.
IgorA100
Posts: 78
Joined: Sat Feb 03, 2024 11:55 am

Re: Reuse Deleted Monitor IDs

Post by IgorA100 »

marklg wrote: Mon Feb 12, 2024 4:00 am I chose the ID manually, one that was deleted. It did not show up.
I confirm this problem.
User avatar
iconnor
Posts: 2912
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Reuse Deleted Monitor IDs

Post by iconnor »

We don't actually delete monitors anymore. We just mark them deleted. SO it may have silently failed because there is still a record at that id. This is why we list some available ids in the ui
marklg
Posts: 22
Joined: Sun Dec 17, 2023 1:43 am

Re: Reuse Deleted Monitor IDs

Post by marklg »

In the ID, I can pick any ID. My use case is I replaced my camera #1 that had issues with another that is the same as a later ID camera and I want the new Camera #1 to be listed first. So, I cloned a later ID and want it to replace #1. It does seem that #1 has been edited, as if I do the following, I can get the result I want.

I select the check box for another monitor, and select Clone.
I manually choose ID #1. Note, all IDs can be chosen, not just the deleted or unused ones.
I select Save and it does appear to save that data in ID #1. It stays on the editing screen and I select Save again. It silently fails and there is an error in the log that the ID was used.
I then manually enter this in the location bar: https://<IP Address>/zm/index.php?view=monitor&mid=1
It shows #1, saying it is deleted, and allows me to say undelete. I undelete and the monitor with new data is there.

Regards,

Mark
dougmccrary
Posts: 1218
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Reuse Deleted Monitor IDs

Post by dougmccrary »

OK, marklg!
I see that works. I was mislead because I recently had to rebuild my 1.37, and the monitor IDs I used were actually empty at first, as listed below the ID field.
Good to know.
Post Reply