Camera Function (modect etc) back to "off" after changing state.

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
hs06
Posts: 3
Joined: Sun Jul 04, 2021 12:17 pm

Camera Function (modect etc) back to "off" after changing state.

Post by hs06 »

Hi everyone,

I have installed Zoneminder v1.34.26, pretty much everything I wanted works "out of the box" and with some googling. It is a super good piece and easy to use of software.

There's one point where I struggle:

I have installed the crontab which switches between modes. I have "Daytime" and "Nighttime" configured and call these via zmpkg.pl. Zoneminder correctly switches between the two of them.

I want to record only at nighttime (animals in my case). However, the "Function" always goes back to "None, disabled / Not running". I always have to switch back manually to "Mocord / Enabled" every night. So somehow this state is not saved and I don't find how I would be saving this setting. I have one Cam/Zone defined. From what I read, the previous state should automatically be remembered (when changing states it would be saved/loaded)

Any idea? Am I doing it wrong or is there some consistency problem in saving settings? Thanks a lot for any advice or tips. :-)

Cheers
Hendrik
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: Camera Function (modect etc) back to "off" after changing state.

Post by burger »

When you save a runstate in the console (main webpage) it should save the current states of the monitors as you have set them. ergo, if you set camera 1 to be record, and camera 2 to be mocord, then you click save in the runstates dialog, with the runstate you want, it will configure the zm.States table to have the monitors as you have configured. You can verify this by reviewing the db, see:

Code: Select all

MariaDB [zm]> select * from States\G
*************************** 1. row ***************************
        Id: 56
      Name: MyFirstRunState
Definition: 
1:Record:1,2:Record:1,3:Nodect:1,4:Modect:1,5:Record:1,6:Modect:1,
  IsActive: 0
*************************** 2. row ***************************
        Id: 60
      Name: MySecondRunState
<clipped>
I personally would only use runstates with small installations. Once you get 10-20+ cameras, the run states get confusing.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
hs06
Posts: 3
Joined: Sun Jul 04, 2021 12:17 pm

Re: Camera Function (modect etc) back to "off" after changing state.

Post by hs06 »

Hi Burger,

thanks a lot for the explanation. I tried to validate what's in the db -- but it seems the database doesn't reflect the state I enter. It is right now enabled, but not in "mocord" from what I see in the db.

That's what I get:

Code: Select all

MariaDB [zm]> select * from States
    -> ;
+----+-----------+------------+----------+
| Id | Name      | Definition | IsActive |
+----+-----------+------------+----------+
|  1 | default   |            |        0 |
|  2 | Daytime   | 1:None:0   |        0 |
|  3 | Nighttime | 1:None:0   |        1 |
+----+-----------+------------+----------+
3 rows in set (0.000 sec)

MariaDB [zm]> 
At the same time, what I see in the interface (I switched to mocord and enabled the "Igelcam") is this (see attached screenshot).

Do you have any idea why my zm might not be saving the data correctly? Otherwise the db works fine, events are saved, etc..

Best
Hendrik
Attachments
Screenshot 2021-07-08 at 22.19.05.png
Screenshot 2021-07-08 at 22.19.05.png (44.86 KiB) Viewed 1730 times
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: Camera Function (modect etc) back to "off" after changing state.

Post by burger »

Steps to save a runstate (assuming it is working):

1. Change cameras to reflect the mode you want them to be in
2. Click the 'running' icon in the top right
3. Type a name for the runstate and click save. If you already have a run state with that name, type it anyways. It will overwrite the old entry.

If you already have mode settings, you can apply, make monitor changes, and then type the name and hit save.

You could argue that it should allow you to select the old entry from the drop down and click save, but in my 1.34 it doesn't seem to work that way (not sure about 1.36). It must be typed. It's a minor concern, and probably not worth asking the developer's to fix. Anyways it works more or less.
Attachments
runstate_save_locations.png
runstate_save_locations.png (13.9 KiB) Viewed 1705 times
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
hs06
Posts: 3
Joined: Sun Jul 04, 2021 12:17 pm

Re: Camera Function (modect etc) back to "off" after changing state.

Post by hs06 »

Awesome, this solved my problem! Thank you very much! Indeed I just did not understand the UI.

Best
Hendrik
Post Reply