Hi everybody!!
I recently implemented ZM on a kinder school where the parents has access to cameras in the class room to see the kids...
I use IpCam Viewer to access to zoneminder and everything goes very well.
There is a username and a password for each one of the parents that wants to access cameras...
Now the people in charge of the shool ask me if there is a way to limit the access only between 8:00 am and 13:00 pm so parents cant access in others hours of the day.
Im not sure how to do this, is there a known wat to do this?? Something like group access and a way to limit a group by hour...
Thanks...
Limit access to ZM by hour
Re: Limit access to ZM by hour
http://www.zoneminder.com/wiki/index.ph ... or_week.3F
You could create a state with monitors set to None, in this way no one could see anything. Save another state with the normal view in class hours.
Hope it helps,
PacoLM
You could create a state with monitors set to None, in this way no one could see anything. Save another state with the normal view in class hours.
Hope it helps,
PacoLM
After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
-
- Posts: 15
- Joined: Wed Feb 17, 2010 1:57 am
Re: Limit access to ZM by hour
Ok I did it using MySql event scheduler, its better because you can program differents hours access to differents groups...
In this case there are childrens in the morning and other group in the afternoon, so what I did is to program the event scheduler to this:
1.- Update to "0" the field "enabled" to all users by id except user admin at 18:00 every day.
2.- Update to "1" field "enabled" to the users by username that are allowed to view cameras in the morning.
3.- Again Update to "0" the field "enabled" to all users by id except user admin, this time at 13:00 so nobody can access at lunch time...
4.- Update to "1" field "enabled" to users by username allowed to view cameras at the afternoon.
And at last in the weekend I programed a cron job using /usr/bin/zmpkg.pl to run a state in where cameras are set to none and other cron to run state with working cameras at 06:00 am on Monday.
Of course I added the same cameras again with only access to admin so we can still record de weekend for security...
In this case there are childrens in the morning and other group in the afternoon, so what I did is to program the event scheduler to this:
1.- Update to "0" the field "enabled" to all users by id except user admin at 18:00 every day.
2.- Update to "1" field "enabled" to the users by username that are allowed to view cameras in the morning.
3.- Again Update to "0" the field "enabled" to all users by id except user admin, this time at 13:00 so nobody can access at lunch time...
4.- Update to "1" field "enabled" to users by username allowed to view cameras at the afternoon.
And at last in the weekend I programed a cron job using /usr/bin/zmpkg.pl to run a state in where cameras are set to none and other cron to run state with working cameras at 06:00 am on Monday.
Of course I added the same cameras again with only access to admin so we can still record de weekend for security...
Re: Limit access to ZM by hour
Interesting that you went to mysql instead of handling it at the ZM level.
Did you check what happens if say you enable streaming for a group, keep a browser window open so it keeps streaming and then you directly change the enabled to 0 at mysql level? Will that stream get disconnected from the browser ? (for example, lets say a parent logs in to monitor and never closes the window). If you handle this at the ZM level, since the monitors get restarted the connection will break.
Did you check what happens if say you enable streaming for a group, keep a browser window open so it keeps streaming and then you directly change the enabled to 0 at mysql level? Will that stream get disconnected from the browser ? (for example, lets say a parent logs in to monitor and never closes the window). If you handle this at the ZM level, since the monitors get restarted the connection will break.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
-
- Posts: 15
- Joined: Wed Feb 17, 2010 1:57 am
Re: Limit access to ZM by hour
You are right, when someone logs in and never close the widows it still streaming when change to 0 "enabled" in DB..
To fix it I added a restart for apache server in cron at same time groups change access at zm...
Thanks for the tip
To fix it I added a restart for apache server in cron at same time groups change access at zm...
Thanks for the tip