What you see now (and subsequently) depends on whether you chose to run ZoneMinder in authenticated mode or not. This is an option that lets you specify whether anyone that goes to the ZoneMinder web pages must authenticate themselves in order to be given permissions to perform certain tasks. If you chose this mode then you will need to log in here. By default a fully privileged user ‘admin’ has been created with a password also of ‘admin’. You should change this password as soon as possible.
Once you’ve logged in, or if you are running in un-authenticated mode, you will now see the ZoneMinder Console window. This will resize itself to avoid being too intrusive on your desktop. Along the top there are several informational entries like the time of the last update and the current server load. There will also be an indication of the system state which will probably say ‘stopped’ to start with. This is a link that you can click on to control the ZoneMinder system as a whole. Below that are various other links including one detailing the current user (in authenticated mode only) and one allowing you to configure your bandwidth. This last one enables you to optimise your settings depending on where you are, the actual values relating to this are defined in the options. If you are using a browser on the same machine or network then choose high, over a cable or DSL link maybe choose medium and over a dialup choose low. You can experiment to see which is best. This setting is retained on a per machine basis with a persistent cookie. Also on this line are a number of other links that will be covered below.
Please bear in mind that from here on the descriptions of the web pages are based on what you will see if you are running as a fully authenticated user. If you are running in un-authenticated mode or as a less privileged user then some elements may not be shown or will be disabled.
To use ZoneMinder properly you need to define at least one Monitor. Essentially, a monitor is associated with a camera and can continually check it for motion detection and such like. So, next click 'Add New Monitor' to bring up the dialog. You will see a bunch of things you have to fill in.
To help you get started on the video configuration the best thing is to us a tool like 'xawtv' (http://bytesex.org/xawtv/) to get a picture you're happy with, and to check your camera works. Then run 'zmu -d <device_no> -q -v' to get a dump of the settings (note, you will have to additionally supply a username and password to zmu if you are running in authenticated mode). You can then enter these values into the video related options of the monitor configuration panel. The 'device_no' referred to here is a number corresponding to the digit at the end of your device file, so /dev/video0 has a 'device_no' of 0 etc. If 'zmu' gives you an error related to permissions run 'zmfix -a' to make sure you can access all the video devices.
The options are divided into a set of tabs to make it easier to edit. You do not have to ‘save’ to change to different tab so you can make all the changes you require and then click ‘Save’ at the end. The individual option are explained in a little more detail below,
Name – The name for your monitor. This should be made up of alphanumeric characters (a-z,A-Z,0-9) and hyphen (-) and underscore(_) only. Whitespace is not allowed.
Function – This essentially defines what the monitor is doing. This can be one of the following;
'None' – The monitor is currently disabled and no streams can be viewed or events generated.
'Monitor' – The monitor will only stream feeds but no image analysis is done and so no alarms or events will be generated,
'Modect' – or MOtion DEteCTtion. All captured images will be analysed and events generated where motion is detected.
‘Record’ – In this case continuous events of a fixed length are generated regardless of motion which is analogous to a convention time-lapse video recorder. No motion detection takes place in this mode.
‘Mocord’ – This is a hybrid of Modect and Record and results in both fixed length events being recorded and also any motion being highlighted within those events.
'Nodect' – or No DEteCTtion. This is a special mode designed to be used with external triggers. In Nodect no motion detection takes place but events are recorded if external triggers require it.
Generally speaking it is best to choose ‘Monitor’ as an initial setting here..
Section Length – This specifies the length (in seconds) of any fixed length events produced when the monitor function is ‘Record’ or ‘Mocord’. Otherwise it is ignored. This should not be so long that events are difficult to navigate nor so short that too many events are generated. A length of between 300 and 900 seconds I recommended.
Frame Skip – This setting also applies only to the ‘Record’ or ‘Mocord’ functions and specifies how many frames should be skipped in the recorded events. The default setting of zero results in every captured frame being saved, whereas one would mean that one frame is skipped between each saved one, two means that two frames are skipped between each saved one etc. An alternate way of thinking is that one in every ‘Frame Skip + 1’ frames is saved. The point of this is to ensure that saved events do not take up too much space unnecessarily whilst still allowing the camera to capture at a fairly high frame rate. The alternate approach is to limit the capture frame rate which will obviously affect the rate at which frames are saved.
Run Mode – Two choices are available here. ‘Continuous’ is the usual setting and means that the monitor is expected to be performing the function selected above at all times and should one or more of the daemons fail or not be running it will be automatically restarted. By contrast ‘Triggered’ means that the decision about whether the daemons should actually be active is devolved to an external triggering mechanism.
Triggers – This small section lets you select which triggers will apply if the run mode has been set to ‘triggered’ above. The most common trigger is X10 and this will appear here if you indicated that your system supported it during installation. Only X10 is supported as a shipped trigger with ZoneMinder at present but it is expected that other triggers will become available as necessary. You can also just use ‘cron’ jobs or other mechanisms to actually control the camera and keep them completely outside of the ZoneMinder settings.
Source Type – This determines whether the camera is a local one attached to a physical video or USB port on your machine or a remote network camera or similar. Choosing one or the other affects which set of options are shown in the next tab.
‘Source’ Tab (local device)
Device Number/Channel – For a local camera enter the device number that your camera is attached to. If it is /dev/video0 enter '0' etc. Some video devices, e.g. BTTV cards support multiple cameras on one device so in this case enter the channel number in the Channel box or leave it at zero if you're using a USB camera or one with just one channel.
Device Format – For a local camera enter the video format of the video stream. This is defined in various system files (e.g. /usr/include/linux/videodev.h) but the two most common are 0 for PAL and 1 for NTSC.
Capture Palette – Finally for the video part of the configuration enter the colour depth. ZoneMinder supports a handful of the most common palettes, so choose one here. If in doubt try grey first, and then 24 bit colour. If neither of these work very well then YUV420P or one of the others probably will. There is a slight performance penalty when using palettes other than grey or 24 bit colour as an internal conversion is involved. These other formats are intended to be supported natively in a future version but for now if you have the choice choose one of grey or 24 bit colour.
Capture Width/Height – The dimensions of the video stream your camera will supply. If your camera supports several just enter the one you'll want to use for this application, you can always change it later. However I would recommend starting with no larger than 320x240 or 352x288 and then perhaps increasing and seeing how performance is affected. This size should be adequate in most cases. Some cameras are quite choosy about the sizes you can use here so unusual sizes such as 197x333 should be avoided initially.
Orientation – If your camera is mounted upside down or at right angles you can use this field to specify a rotation that is applied to the image as it is captured. This incurs an additional processing overhead so if possible it is better to mount your camera the right way round if you can. If not set the orientation here. If you choose one of the rotation options remember to switch the height and width fields so that they apply, e.g. if your camera captures at 352x288 and you choose ‘Rotate Right’ here then set the height to be 352 and width to be 288.
‘Source’ Tab (remote device)
Remote Host/Port/Path – For remote cameras use these fields to enter the full URL of the camera. Basically if your camera is at http://camserver.home.net:8192/cameras/camera1.jpg then these fields will be camserver.home.net, 8192 and /cameras/camera1.jopg respectively. Leave the port at 80 if there is no special port required. If you require authentication to access your camera then add this onto the host name in the form <username>:<password>@<hostname>.com.
Remote Image Colours – Specify the amount of colours in the captured image. Unlike with local cameras changing this has no controlling effect on the remote camera itself so ensure that your camera is actually capturing to this palette beforehand.
Capture Width/Height – As per local devices.
Orientation – As per local devices.
Timestamp Label Format – This relates to the timestamp that is applied to each frame. It is a ‘sprintf’ style string. It is actually passed through sprintf and then through printf to add the monitor name so a format of '%%s - %y/%m/%d %H:%M:%S' (note the double % at the beginning) would be recommended though you can modify it if necessary. If you don’t want a timestamp or have a camera that puts one on itself then leave this field blank.
Timestamp Label X/Y – The X and Y values determine where to put the timestamp. A value of 0 for the X value will put it on the left side of the image and a Y value of 0 will place it at the top of the image. To place the timestamp at the bottom of the image use a value eight less than the image height.
Image Buffer Size – This option determines how many frames are held in the ring buffer at any one time. The ring buffer is the storage space where the last ‘n’ images are kept, ready to be resurrected on an alarm or just kept waiting to be analysed. It can be any value you like with a couple of provisos, (see next options). However it is stored in shared memory and making it too large especially for large images with a high colour depth can use a lot of memory. A value of no more than 50 is usually ok. If you find that your system will not let you use the value you want it is probably because your system has an arbitrary limit on the size of shared memory that may be used even though you may have plenty of free memory available. This limit is usually fairly easy to change, see the Troubleshooting section for details.
Warm-up Frames – This specifies how many frames the analysis daemon should process but not examine when it starts. This allows it to generate an accurate reference image from a series of images before looking too carefully for any changes. I use a value of 25 here, too high and it will take a long time to start, too low and you will get false alarms when the analysis daemon starts up.
Pre/Post Event Image Buffer – These options determine how many frames from before and after an event should be preserved with it. This allows you to view what happened immediately prior and subsequent to the event. A value of 10 for both of these will get you started but if you get a lot of short events and would prefer them to run together to form fewer longer ones then increase the Post Event buffer size. The pre-event buffer is a true buffer and should not really exceed half the ring buffer size. However the post-event buffer is just a count that is applied to captured frames and so can be managed more flexibly. You should also bear in mind the frame rate of the camera when choosing these values. For instance a network camera capturing at 1FPS will give you 10 seconds before and after each event if you chose 10 here. This may well be too much and pad out events more than necessary. However a fast video card may capture at 25FPS and you will want to ensure that this setting enables you to view a reasonable time frame pre and post event.
Alarm Frame Count – This option allows you to specify how many consecutive alarm frames must occur before an alarm event is generated. The usual, and default, value is 1 which implies that any alarm frame will cause or participate in an event. You can enter any value up to 16 here to eliminate bogus events caused perhaps by screen flickers or other transients. Values over 3 or 4 are unlikely to be useful however. Please note that if you have statistics recording enabled then currently statistics are not recorded for the first ‘Alarm Frame Count’-1 frames of an event. So if you set this value to 5 then the first 4 frames will be missing statistics whereas the more usual value of 1 will ensure that all alarm frames have statistics recorded.
Event Prefix – By default events are named ‘Event-<event id>’, however you are free to rename them individually as you wish. This option lets you modify the event prefix, the ‘Event-‘ part, to be a value of your choice so that events are named differently as they are generated. This allows you to name events according to which monitor generated them.
Maximum FPS – On some occasions you may have one or more cameras capable of high capture rates but find that you generally do not require this performance at all times and would prefer to lighten the load on your server. This option permits you to limit the maximum capture rate to a specified value. This may allow you to have more cameras supported on your system by reducing the CPU load or to allocate video bandwidth unevenly between cameras sharing the same video device. This value is only a rough guide and the lower the value you set the less close the actual FPS may approach it especially on shared devices where it can be difficult to synchronise two or more different capture rates precisely. There is a global configuration option that allows you to turn this limiting off in the event of an alarm.
FPS Report Interval – How often the current performance in terms of Frames Per Second is output to the system log. Not used in any functional way so set it to maybe 1000 for now. If you watch /var/log/messages (normally) you will see this value being emitted at the frequency you specify both for video capture and processing.
Reference Image Blend %ge – Each analysed image in ZoneMinder is a composite of previous images and is formed by applying the current image as a certain percentage of the previous reference image. Thus, if we entered the value of 10 here, each image’s part in the reference image will diminish by a factor of 0.9 each time round. So a typical reference image will be 10% the previous image, 9% the one before that and then 8.1%, 7.2%, 6.5% and so on of the rest of the way. An image will effectively vanish around 25 images later than when it was added. This blend value is what is specified here and if higher will make slower progressing events less detectable as the reference image would change more quickly. Similarly events will be deemed to be over much sooner as the reference image adapts to the new images more quickly. In signal processing terms the higher this value the steeper the event attack and decay of the signal. It depends on your particular requirements what the appropriate value would be for you but start with 10 here and adjust it (usually down) later if necessary.
Note: This tab and its options will only appear if you have selected the ZM_OPT_CONTROL option to indicated that your system contains cameras which are able to be controlled via Pan/Tilt/Zoom or other mechanisms. See the Camera Control section elsewhere in this document for further details on camera control protocols and methods.
Controllable – Check this box to indicate your camera can be controlled.
Control Type – Select the control type that is appropriate for your camera. ZoneMinder ships with a small number of predefined control protocols which will works with some cameras without modification but which may have to amended to function with others, Choose the edit link to create new control types or to edit the existing ones.
Control Device – This is the device that is used to control your camera. This will normally be a serial or similar port. If your camera is a network camera, you will generally not need to specify a control device.
Control Address – This is the address of your camera. Some control protocols require that each camera is identified by a particular, usually numeric id. If your camera uses addressing then enter the id of your camera here. If your camera is a network camera then you will usually need to enter the hostname or IP address of it here. This is ordinarily the same as that given for the camera itself.
Track Motion – This and the following four options are used with the experimental motion function. This will only work if your camera supports mapped movement modes where a point on an image can be mapped to a control command. This is generally most common on network cameras but can be replicated to some degree on other cameras that support relative movement modes. See the Camera Control section for more details. Check this box to enable motion tracking.
Track Delay – This is the number of seconds to suspend motion detection for following any movement that the camera may make to track motion.
Return Location – If you camera supports a ‘home’ position or presets you can choose which preset the camera should return to after tracking motion.
Return Delay – This is the delay, in seconds, once motion has stopped being detected, before the camera returns to any defined return location.
Note: This tab and its options will only appear if you have indicated that your system supports the X10 home automation protocol during initial system configuration.
X10 Activation String - The contents of this field determine when a monitor starts and/or stops being active when running in ‘Triggered; mode and with X10 triggers. The format of this string is as follows,
n : If you simply enter a number then the monitor will be activated when an X10 ON signal for that unit code is detected and will be deactivated when an OFF signal is detected.
!n : This inverts the previous mode, e.g. !5 means that the monitor is activated when an OFF signal for unit code 5 is detected and deactivated by an ON.
n+ : Entering a unit code followed by + means that the monitor is activated on receipt of a ON signal for that unit code but will ignore the OFF signal and as such will not be deactivated by this instruction. If you prepend a '!' as per the previous definition it similarly inverts the mode, i.e. the ON signal deactivates the monitor.
n+<seconds> : As per the previous mode except that the monitor will deactivate itself after the given number of seconds.
n- : Entering a unit code followed by - means that the monitor is deactivated on receipt of a OFF signal for that unit code but will ignore the ON signal and as such will not be activated by this instruction. If you prepend a '!' as per the previous definition it similarly inverts the mode, i.e. the OFF signal activates the monitor.
n-<seconds> : As per the previous mode except that the monitor will activate itself after the given number of seconds.
You can also combine several of these expressions to by separating them with a comma to create multiple circumstances of activation. However for now leave this blank.
X10 Input Alarm String - This has the same format as the previous field but instead of activating the monitor with will cause a forced alarm to be generated and an event recorded if the monitor is Active. The same definition as above applies except that for activated read alarmed and for deactivated read unalarmed(!). Again leave this blank for now.
X10 Output Alarm String - This X10 string also has the same format as the two above options. However it works in a slightly different way. Instead of ZoneMinder reacting to X10 events this option controls how ZoneMinder emits X10 signals when the current monitor goes into or comes out of the alarm state. Thus just entering a number will cause the ON signal for that unit code to be sent when going into alarm state and the OFF signal when coming out of alarm state. Similarly 7+30 will send the unit code 7 ON signal when going into alarm state and the OFF signal 30 seconds later regardless of state. The combination of the X10 instruction allows ZoneMinder to react intelligently to, and also assume control of, other devices when necessary. However the indiscriminate use of the Input Alarm and Output Alarm signals can cause some horrendous race conditions such as a light going on in response to an alarm which then causes an alarm itself and so on. Thus some circumspection is required here. Leave this blank for now anyway.
Finally, click 'Save' to add your monitor.
On the main console listing you will now see your monitor and some of its vital statistics. Most columns are also links and you get to other functions of ZoneMinder by choosing the appropriate one. Describing them left to right, they are as follows.
The first column is the Id, clicking on this gives you the opportunity to edit any of the settings you have just defined your monitor to have.
The next column is the Name column, clicking on this will give you the watch window where you can view a live feed from your camera along with recent events. This is described more fully below.
Following that are the Function and Source columns, which may be represented in various colours. Initially both will be showing red. This means that that monitor is not configured for any function and as a consequence has no zmc (capture) daemon running on it. If it were orange it would mean that a zmc daemon was running but no zma (analysis) daemon and green means both are running. In our case it is red because we defined the Monitor to have a Function of None so no daemons are required. To get the daemons up and running you can either click on the source listed in the Source column and edit the monitor properties or click on the Function listed and change it to ’Monitor’, which will ensure that one or more appropriate daemons are started automatically.
Having a device status of red or orange does not necessarily constitute an error if you have deliberately disabled a monitor or have just put it into Passive mode.
If you have several cameras (and thus monitors) on a device the device status colour reflects all of them for the capture daemon. So if just one monitor is active then the daemon is active for both even if all the other monitors are switched off.
Once you have changed the function of your monitor, the main console window will be updated to reflect this change. If your device status does not go green then check your system and web server logs to see if it's something obvious.
You can now add further monitors if you have cameras set up to support them. Once you have one or more monitors you may notice the '<n> Monitors' title becomes a link. Clicking on this link will open up a window which allows you to assign your monitors to groups. These let you select certain monitors to view. For instance you may only wish to view outdoor monitors while indoors. You can also choose to view all of them. If you choose a group then your selection will be remembered via a cookie and will be used until you change it. You can call your groups anything you like, though ‘Mobile’ has a special meaning (see Mobile Devices below). There may also be a ‘Cycle’ link which allows you to cycle through a shot from each of your monitors (in the selected group unless they are switched off) and get a streamed or still image from each in turn. Similarly if you see a link titled ‘Montage’ it will allow you view all your active enabled cameras (in the selected group) simultaneously. Be aware however that this can consume large amounts of bandwidth and CPU so should not be used continuously unless you have resource to burn.
The next important thing to do with a new monitor is set up Zones for it to use. By default you'll already have one created for you when you created your monitor but you might want to modify it or add others. Click on the Zones column for your monitor and you should see a small popup window appear which contains an image from your camera overlain with a stippled pattern representing your zone. In the default case this will cover the whole image and will be red. Beneath that will be a table containing a listing of your zones. Clicking on either the relevant bit of the image or on the Id or Name in the table will bring up another window where you can edit the particulars for your Zones. As you can see there are quite a few, so now is a good time to go through them. The options are as follows.
Name – This is just a label to identify the zone by. You can change this to be more representative if you like, though it isn't used much except for logging and debugging.
Type - This is one of the more important concepts in ZoneMinder and there are five to choose from.
Active : This is the zone type you'll use most often, and which will be set for your default zone. This means that this zone will trigger an alarm on any events that occur within it that meet the selection criteria.
Inclusive : This zone type can be used for any zones that you want to trigger an alarm only if at least one other Active zone has already triggered one. This might be for example to cover an area of the image like a plant or tree which moves a lot and which would trigger lots of alarms. Perhaps this is behind an area you'd like to monitor though, in this case you'd create an active zone covering the non-moving parts and an inclusive zone covering the tree perhaps with less sensitive detection settings also. If something triggered an alarm in the Active zone and also in the Inclusive zone they would both be registered and the resulting alarm would be that much bigger than if you had blanked it out altogether.
Exclusive : The next zone Type is Exclusive. This means that alarms will only be triggered in this zone if no alarms have already been triggered in Active zones. This is the most specialised of the zone types and you may never use it but in its place it is very useful. For instance in the camera covering my garden I keep watch for a hedgehog that visits most nights and scoffs the food out of my cats bowls. By creating a sensitive Exclusive zone in that area I can ensure that a hedgehog alarm will only trigger if there is activity in that small area. If something much bigger occurs, like someone walking by it will trigger a regular alarm and not one from the Exclusive zone. Thus I can ensure I get alarms for big events and also special small events but not the noise in between.
Preclusive : This zone type is relatively recent. It is called a Preclusive zone because if it is triggered it actually precludes an alarm being generated for that image frame. So motion or other changes that occur in a Preclusive zone will have the effect of ensuring that no alarm occurs at all. The application for this zone type is primarily as a shortcut for detecting general large-scale lighting or other changes. Generally this may be achieved by limiting the maximum number of alarm pixels or other measure in an Active zone. However in some cases that zone may cover an area where the area of variable illumination occurs in different places as the sun and/or shadows move and it thus may be difficult to come up with general values. Additionally, if the sun comes out rapidly then although the initial change may be ignored in this way as the reference image catches up an alarm may ultimately be triggered as the image becomes less different. Using one or more Preclusive zones offers a different approach. Preclusive zones are designed to be fairly small, even just a few pixels across, with quite low alarm thresholds. They should be situated in areas of the image that are less likely to have motion occur such as high on a wall or in a corner. Should a general illumination change occur they would be triggered at least as early as any Active zones and prevent any other zones from generating an alarm. Obviously careful placement is required to ensure that they do not cancel any genuine alarms or that they are not so close together that any motion just hops from one Preclusive zone to another. As always, the best way is to experiment a little and see what works for you.
Inactive : This final zone type is the opposite of Active. In this zone type no alarms will ever be reported. You can create an Inactive zone to cover any areas in which nothing notable will ever happen or where you get constant false alarms that don't relate to what you are trying to monitor. An Inactive zone can overlay other zone types and will be processed first.
I mentioned above that Inactive zones may be overlaid on other zones to blank out areas however as a general principle you should try and make zones abut each other as much as possible and do not overlap. This helps avoid repeated duplicate processing of the same area. For instance an Inclusive zone overlaying an Active zone when all other settings are the same will always trigger when the Active zone does which somewhat defeats the object of the exercise. One exception to this is Preclusive zones. These may be situated within Active areas are they are processed first and if small may actually save processing time by preventing full analysis of the image.
Units - This setting which details whether certain of the following settings are in Pixels or Percent, where ‘Percent’ refers to a percentage area of the zone itself. In general ‘Pixels’ is more precise whereas percentages are easier to use to start with or if you change image sizes frequently. If you change this setting all appropriate values below are redisplayed in the correct context. A good tip would be to initially enter the settings in Percent and then change to Pixels and refine any gaps. Repeated flipping between the settings will cause rounding errors, as ZoneMinder in general is not at home to Mr Floating Point for reasons of performance. Note, the sense of the percentage values changed in version 1.19.0. Prior to that percentages referred to the area of the image as a whole, whereas it now only refers to the area of the zone. This makes trying to work out necessary sizes rather easier.
Min/Maximum X/Y - Following the units the next four settings define the bounds of the Zone in the monitor frame and are self-explanatory with the exception of the fact that the minima are at the top left of the frame and the maxima are at the bottom right rather than in a Cartesian style.
Alarm Colour - The option after that allows you to specify what colour you'd like any alarms this zone generates to be highlighted on images, pick anything you like that will show up against your normal image background. This option is irrelevant for Preclusive and Inactive zones and will be disabled For Inactive zones all subsequent options are likewise disabled.
Alarm Check Method –This is a new addition to Zone definitions. It allows you to specify the nature of the alarm checking that will take place, and more specifically what tests are applied to determine whether a frame represents an alarm or not. The three options are ‘AlarmPixels’, ‘FilteredPixels’ and ‘Blobs’ and depending on which option is chosen some of the following other settings may become unavailable. The first of these indicates that only a count of individual alarmed pixels should be used to determine the state of a image, the second indicate that the pixels should be filtered to remove isolated pixels (see below) before being counted, and the third uses a more sophisticated analysis which is designed to aggregate alarmed pixels into continuous groups, or ‘blobs’. Blob analysis is the method ZoneMinder has always used previously (before it became optional) and so this is the default. However this method takes slightly longer and so if you find that one of the other methods works just as well for you and you wish to maximise performance you can opt for that instead. Some of the more useful alarm related features such as highlighted analysis images are only available with the ‘Blob’ setting.
Min/Maximum Pixel Threshold – These setting are used to define limits for the difference in value between a pixel and its predecessor in the reference image. For greyscale images this is simple but for colour images the colours are averaged first, originally this used an RMS (root mean squared) algorithm but calculating square roots mugs performance and does not seem to improve detection. Using an average does means that subtle colour changes without any brightness change may go undetected but this is not the normal circumstance. There is also the option to use a more sophisticated integer algorithm to calculate a Y (or brightness) value from the colours themselves.
Min/Maximum Alarmed Area - The following two settings define the minimum and maximum number of pixels that exceed this threshold that would cause an alarm. If the units are Percent this (and following options) refers to the percentage of the frame and not the zone, this is so these values can be related between zones. The minimum value must be matched or exceeded for an alarm to be generated whereas the maximum must not be exceeded or the alarm will be cancelled. This is to allow for sudden changes such as lights coming on etc, which you may wish to disregard. In general a value of zero for any of these settings causes that value to be ignored, so you can safely set a maximum to zero and it will not be used. The use of just a number of pixels is however a very brute force method of detection as many small events dispersed widely are not distinguished from a compact one.
Filter Width/Height – To improve detection of valid event ZoneMinder applies several other functions to the data to improve its ability to distinguish interesting signals from uninteresting noise. The first of these is a filter that removes any pixels that do not participate in a contiguous block of pixels above a certain size. These options are always expressed in pixels and should be fairly small, and an odd number, three or five is a good value to choose initially. Application of this filter removes any tiny or discontinuous pixels that don't form part of a discrete block.
Min/Maximum Filtered Area – These are two additional bounds that specify the limits of pixels that would cause an alarm after this filtering process. As the filtering process can only remove alarmed pixels it makes no sense for the Minimum and Maximum Filtered Area to be larger than the equivalent Alarmed Area and in general they should be smaller or the same.
Min/Maximum Blob Area - The next step in the analysis phase is the collation of any remaining alarmed areas into contiguous blobs. This process parses the image and forms any pixels that adjoin other alarmed pixels into one or more larger blobs. These blobs may be any shape and can be as large as the zone itself or as small as the filtered size. The Minimum and Maximum Blob Size settings allow you to define limits within which an alarm will be generated. Of these only the Minimum is likely to be very useful.
Min/Maximum Blobs - Finally the Minimum and Maximum Blobs settings specify the limits of the actual number of blobs detected. If an image change satisfies all these requirements it starts or continues an alarm event.
As this point you should have one or more Monitors running with one or more Zones each. Returning to the main Console window you will see your monitors listed once more. The columns not explored so far are the Monitor name, and various event totals for certain periods of time. Clicking on any of the event totals will bring up a variation on the same window but click on the Monitor name for now. On doing so up will pop another window which should be scaled to contain a heading, an image from your monitor, a status and a list of recent events if any have been generated. Depending on whether you are able to view a streamed image or not the image frame will either be this stream or a series of stills. You have the option to change from one to the other (if available) at the centre of the top heading. Also along the top are a handful of other links. These let you change the scale of the image stream, modify image settings (for local devices) or close the window. If you have cameras that can be controlled, a ‘Control’ link should also be preset which is described below.
The image should be self-explanatory but if it looks like garbage it is possible that the video configuration is wrong so look in your system error log and check for or report anything unusual. The centre of the window will have a tiny frame that just contains a status; this will be 'Idle', 'Alarm' or 'Alert' depending on the function of the Monitor and what's going on in the field of view. Idle means nothing is happening, Alarm means there is an alarm in progress and Alert means that an alarm has happened and the monitor is ‘cooling down’, if another alarm is generated in this time it will just become part of the same event. These indicators are colour coded in green, red and amber.
By default if you have minimised this window or opened other windows in front it will pop up to the front if it goes to Alarm state. This behaviour can be turned off in ‘options’ if required. You can also specify a sound file in the configuration, which will be played when an alarm occurs to alert you to the fact if you are not in front of your computer. This should be a short sound of only a couple of seconds ideally. Note that as the status is refreshed every few seconds it is possible for this not to alert you to every event that takes place, so you shouldn't rely on it for this purpose if you expect very brief events. Alternatively you can decrease the refresh interval for this window in the configuration though having too frequent refreshing may impact on performance.
Below the status is a list of recent events that have occurred, by default this is a listing of just the last 10 but clicking on 'All' will give you a full list and 'Archive' will take you to the event archive for this monitor, more on this later. Clicking on any of the column headings will sort the events appropriately.
From here you can also delete events if you wish. The events themselves are listed with the event id, and event name (which you can change), the time that the event occurred, the length of the event including any preamble and postamble frames, the number of frames comprising the event with the number that actually contain an alarm in brackets and finally a score. This column lists the average score per alarm frame as well as the maximum score that any alarm frame had.
The score is an arbitrary value that essentially represents the percentage of pixels in the zone that are in blobs divided by the square root of the number of blobs and then divided by the size of the zone. This gives a nominal maximum of 100 for a zone and the totals for each zone are added together, Active zones scores are added unchanged, Inclusive zones are halved first and Exclusive zones are doubled. In reality values are likely to be much less than 100 but it does give a simple indication of how major the event was.
If you have defined your system as having controllable monitors and you are looking at a monitor that is configured for control, then clicking on the ‘Control’ link along the top of the window will change the short event listing area to a control area. The capabilities you have defined earlier determine exactly what is displayed in this window. Generally you will have a Pan/Tilt control area along with one or subsidiary areas such as zoom or focus control to the side. If you have preset support then these will be near the bottom of the window. The normal method of controlling the monitor is by clicking on the appropriate graphics which then send a command via the control script to the camera itself. This may sometimes take a noticeable delay before the camera responds.
It is usually the case that the control arrows are sensitive to where you click on them. If you have a camera that allows different speeds to be used for panning or zooming etc then clicking near the point of the arrow will invoke the faster speed whilst clicking near the base of the arrow will be slower. If you have defined continuous motion then ongoing activities can be stopped by clicking on the area between the arrows, which will either be a graphic in the case of pan/tilt controls or a word in the case of zoom and focus controls etc. Certain control capabilities such as mapped motion allow direct control by clicking on the image itself when used in browsers which support streamed images directly. Used in this way you can just click on the area of the image that interests you and the camera will centre on that spot. You can also use direct image control for relative motion when the area of the image you click on defines the direction and the distance away from the centre of the image determines the speed. As it is not always very easy to estimate direction near the centre of the image, the active area does not start until a short distance away from the centre, resulting in a ‘dead’ zone in the middle of the image.
The other columns on the main console window contain various event totals for your monitors over the last hour, day, week and month as well as a grand total and a total for events that you may have archived for safekeeping. Clicking on one of these totals or on the 'All' or 'Archive' links from the monitor window described above will present you with a new display. This is the full event window and contains a list of events selected according to a filter which will also pop up in its own window. Thus if you clicked on a 'day' total the filter will indicate that this is the period for which events are being filtered. The event listing window contains a similar listing to the recent events in the monitor window. The primary differences are that the frames and alarm frames and the score and maximum score are now broken out into their own columns, all of which can be sorted by clicking on the heading. Also this window will not refresh automatically, rather only on request. Other than that, you can choose to view events here or delete them as before.
The other window that appeared is a filter window. You can use this window to create your own filters or to modify existing ones. You can even save your favourite filters to re-use at a future date. Filtering itself is fairly simple; you first choose how many expressions you'd like your filter to contain. Changing this value will cause the window to redraw with a corresponding row for each expression. You then select what you want to filter on and how the expressions relate by choosing whether they are 'and' or 'or' relationships. For filters comprised of many expressions you will also get the option to bracket parts of the filter to ensure you can express it as desired. Then if you like choose how you want your results sorted and whether you want to limit the amount of events displayed.
There are several different elements to an event that you can filter on, some of which require further explanation. These are as follows, 'Date/Time' which must evaluate to a date and a time together, 'Date' and 'Time' which are variants which may only contain the relevant subsets of this, 'Weekday' which as expected is a day of the week. All of the preceding elements take a very flexible free format of dates and time based on the PHP strtotime function (http://www.zend.com/manual/function.strtotime.php). This allows values such as 'last Wednesday' etc to be entered. I recommend acquainting yourself with this function to see what the allowed formats are. However automated filters are run in perl and so are parsed by the Date::Manip package. Not all date formats are available in both so if you are saved your filter to do automatic deletions or other tasks you should make sure that the date and time format you use is compatible with both methods. The safest type of format to use is ‘-3 day’ or similar with easily parseable numbers and units are in English.
The other elements you can filter on are all fairly self explanatory except perhaps for 'Archived' which you can use to include or exclude Archived events. In general you'll probably do most filtering on un-archived events. There are also two elements, Disk Blocks and Disk Percent which don’t directly relate to the events themselves but to the disk partition on which the events are stored. These allow you to specify an amount of disk usage either in blocks or in percentage as returned by the ‘df’ command. They relate to the amount of disk space used and not the amount left free. Once your filter is specified, clicking 'submit' will filter the events according to your specification. As the disk based elements are not event related directly if you create a filter and include the term ‘DiskPercent > 95’ then if your current disk usage is over that amount when you submit the filter then all events will be listed whereas if it is less then none at all will. As such the disk related terms will tend to be used mostly for automatic filters (see below). If you have created a filter you want to keep, you can name it and save it by clicking 'Save'.
If you do this then the subsequent dialog will also allow you specify whether you want this filter automatically applied in order to delete events or upload events via ftp to another server and mail notifications of events to one or more email accounts. In most cases you can specify your preferences for upload formats and email content during configuration time (make sure you type '?' to get help on options). Emails and messages (essentially small emails intended for mobile phones or pagers) have a variety of tokens that can be substituted for various details of the event that caused them. This includes links to the event view or the filter as well as the option of attaching images or videos to the email itself. See the included templates zmconfig_eml.txt and zmconfig_msg.txt for a fuller explanation of the availability and meaning of these tokens. Finally you can also specify a script which is run on each matched event. This script should be readable and executable by your web server user. It will get run once per event and the relative path to the directory containing the event in question. Normally this will be of the form <MonitorName>/<EventId> so from this path you can derive both the monitor name and event id and perform any action you wish. Note that arbitrary commands are not allowed to be specified in the filter, for security the only thing it may contain is the full path to an executable. What that contains is entirely up to you however.
Filtering is a powerful mechanism you can use to eliminate events that fit a certain pattern however in many cases modifying the zone settings will better address this. Where it really comes into its own is generally in applying time filters, so for instance events that happen during weekdays or at certain times of the day are highlighted, uploaded or deleted. Additionally using disk related terms in your filters means you can automatically create filters that delete the oldest events when your disk gets full. Be warned however that if you use this strategy then you should limit the returned results to the amount of events you want deleted in each pass until the disk usage is at an acceptable level. If you do not do this then the first pass when the disk usage is high will match, and then delete, all events unless you have used other criteria inside of limits.
From the monitor or filtered events listing you can now click on an event to view it in more detail. If you have streaming capability you will see a series of images that make up the event. You will also see a link to allow you to view the still images themselves. If you don't have streaming then you will be taken directly to this page. The images themselves are thumbnail size and depending on the configuration and bandwidth you have chosen will either be the full images scaled in your browser of actual scaled images. If it is the latter, if you have low bandwidth for example, it may take a few seconds to generate the images. If thumbnail images are required to be generated, they will be kept and not re-generated in future. Once the images appear you can mouse over them to get the image sequence number and the image score.
You will notice for the first time that alarm images now contain an overlay outlining the blobs that represent the alarmed area. This outline is in the colour defined for that zone and lets you see what it was that caused the alarm. Clicking on one of the thumbnails will take you to a full size window where you can see the image in all its detail and scroll through the various images that make up the event. If you have the ZM_RECORD_EVENT_STATS option on, you will be able to click the 'Stats' link here and get some analysis of the cause of the event. Should you determine that you don't wish to keep the event, clicking on Delete will erase it from the database and file system. Returning to the event window, other options here are renaming the event to something more meaningful, refreshing the window to replay the event stream, deleting the event, switching between streamed and still versions of the event (if supported) and generating an MPEG video of the event (if supported).
These last two options require further explanation. Archiving an event means that it is kept to one side and not displayed in the normal event listings unless you specifically ask to view the archived events. This is useful for keeping events that you think may be important or just wish to protect. Once an event is archived it can be deleted or unarchived but you cannot accidentally delete it when viewing normal unarchived events.
The final option of generating an MPEG video is still somewhat experimental and its usefulness may vary. It can use either the Berkeley MPEG encoder or the faster and new ffmpeg encoder. Either of these will generate a short video, which will be downloaded to your browsing machine to view. Due to the relatively slow frame rate that ZoneMinder will capture at and the high minimum frame rate that the Berkeley encoder uses videos created by this method will be very quick. However when using the ffmpeg encoder, ZoneMinder will attempt to match the duration of the video with the duration of the event. This has the useful effect of making the video watchable and not too quick while having the unfortunate side effect of increasing file size and generation time. Ffmpeg in particular has a particularly rich set of options and you can specify during configuration which additional options you may wish to include to suit your preferences. In particular you may need to specify additional, or different, options if you are creating videos of events with particularly slow frame rates as some codecs only support certain ranges of frame rates. Details of these options can be found in the documentation for the encoders and is outside the scope of this document.
Building an MPEG video, especially for a large event, can take some time and should not be undertaken lightly as the effect on your host box of many CPU intensive encoders will not be good. However once a video has been created for an event it will be kept so subsequent viewing will not incur the generation overhead. Videos can also be included in notification emails, however care should be taken when using this option as for many frequent events the penalty in CPU and disk space can quickly mount up.
The final area covered by the tutorial is the options and user section. If you are running in authenticated mode and don’t have system privileges then you will not see this section at all and if you are running in un-authenticated mode then no user section will be displayed.
The various options you can specify are displayed in a tabbed dialog with each group of options displayed under a different heading. Each option is displayed with its name, a short description and the current value. You can also click on the ‘?’ link following each description to get a fuller explanation about each option. This is the same as you would get from zmconfig.pl. A number of option groups have a master option near the top which enables or disables the whole group so you should be aware of the state of this before modifying options and expecting them to make any difference.
If you have changed the value of an option you should then ‘save’ it. A number of the option groups will then prompt you to let you know that the option(s) you have changed will require a system restart. This is not done automatically in case you will be changing many values in the same session, however once you have made all of your changes you should restart ZoneMinder as soon as possible. The reason for this is that web and some scripts will pick up the new changes immediately but some of the daemons will still be using the old values and this can lead to data inconsistency or loss.
One of the options you may notice in the ‘System’ tab allows you to specify the default language for your installation of ZoneMinder. Versions 1.17.0 and later support multiple languages but rely on users to assist in creating language files for specific languages. To specify a language you will have to give the applicable code, thus for UK English this is en_gb, and for US English it would be en_us, if no language is given then UK English is assumed. Most languages will be specified in this nn_mm format and to check which languages are available look for files named zm_lang_*.php in the ZoneMinder build directory where the parts represented by the ‘*’ would be what you would enter as a language. This is slightly unwieldy and will probably be improved in future to make it easier to determine language availability. On checking which languages are available it may be that your preferred language is not currently included and if this is the case please consider doing a translation and sending it back to it may be included in future releases. All the language elements are given in the zm_lang_en_gb.php file along with a few notes to help you understand the format.
As mentioned above, you may also see a ‘users’ tab in the Options area. In this section you will see a list of the current users defined on the system. You can also add or delete users from here. It is recommended you do not delete the admin user unless you have created another fully privileged user to take over the same role. Each user is defined with a name and password (which is hidden) as well as an enabled setting which you can use to temporarily enable or disable users, for example a guest user for limited time access. As well as that there is a language setting that allows you to define user specific languages. Setting a language here that is different than the system language will mean that when that user logs in they will have the web interface presented in their own language rather than the system default, if it is available. Specifying a language here is done in the same way as for the system default language described above.
There are also four values that define the user permissions, these are ‘stream’, ‘events’, ‘monitors’ and ‘system’ Each can have values of ‘none’, ‘view’ or ‘edit’ apart from ‘stream’ which has no ‘edit’ setting. These values cover access to the following areas; ‘stream’ defines whether a user is allowed to view the ‘live’ video feeds coming from the cameras. You may wish to allow a user to view historical events only in which case this setting should be ‘none’. The ‘events’ setting determines whether a user can view and modify or delete any retained historical events. The ‘monitors’ setting specifies whether a user can see the current monitor settings and change them. Finally the ‘system’ setting determines whether a user can view or modify the system settings as a whole, such as options and users or controlling the running of the system as a whole. As well as these settings there is also a monitor ids setting that can be used for non-’system’ users to restrict them to only being able to access streams, events or monitors for the given monitors ids as a comma separated list with no spaces. If a user with ‘monitors’ edit privileges is limited to specific monitors here they will not be able to add or delete monitors but only change the details of those they have access to. If a user has ‘system’ privileges then the ‘monitors ids’ setting is ignored and has no effect.’
That’s pretty much is it for the tour. You should experiment with the various setting to get the results you think are right for your. Naturally, letting thousands of events build up is not good for the database or your file system so you should endeavour to either prevent spurious events from being generated in the first place or ensure that you housekeep them strictly.
Version 1.21.0 of ZoneMinder introduces a new feature, allowing you to control cameras from the web interface and to some extent automatically. Pan/Tilt/Zoom (PTZ) cameras have a wide range of capabilities and use a large number of different protocols making any kind of generic control solution potentially very difficult. To address this ZoneMinder uses two key approaches to get around this problem.
1) Definition of Capabilities – For each camera model you use, an entry in the camera capabilities table must be created. These indicate what functions the camera supports and ensure that the interface presents only those capabilities that the camera supports. There are a very large number of capabilities that may be supported and it is very important that the entries in this table reflect the actual abilities of the camera. A small number of example capabilities are included in ZoneMinder, these can be used ‘as is’ or modified.
2) Control Scripts – ZoneMinder itself does not generally provide the ability to send commands to cameras or receive responses. What it does is mediate motion requests from the web interface into a standard set of commands which are passed to a script defined in the control capability. Example scripts are provided in ZoneMinder which support a number of serial or network protocols but it is likely that for many cameras new scripts will have to be created. These can be modelled on the example ones, or if control commands already exist from other applications, then the script can just act as a ‘glue’ layer between ZoneMinder and those commands.
It should be emphasised that the control and capability elements of ZoneMinder are not intended to be able to support every camera out of the box. Some degree of development is likely to be required for many cameras. This should often be a relatively straightforward task however if you have a camera that you want to be supported then please feel free to get in touch and I should be able to provide an estimate for how much effort this is likely to be. It is also the case that I have only been able to access this limited number of cameras to test against; some other cameras may use different motion paradigms that don’t fit into the control capability/script architecture that ZoneMinder uses. If you come across any cameras like this then please forward as much information to me as possible so that I may be able to extend the ZoneMinder model to encompass them.
If you have a camera that supports PTZ controls and wish to use it with ZoneMinder then the first thing you need to do is ensure that it has an accurate entry in the capabilities table. To do this you need to go to the Control tab of the Monitor configuration dialog and select ‘Edit’ where it is listed by the Control Type selection box. This will bring up a new window which lists, with a brief summary, the existing capabilities. To edit an existing capability to modify select the Id or Name of the capability in question, or click on the Add button to add a new control capability. Either of these approaches will create a new window, in familiar style, with tabs along the top and forms fields below. In the case of the capabilities table there are a large number of settings and tabs, the mean and use of these are briefly explained below.
Name – This is the name of the control capability, it will usually make sense to name capabilities after the camera model or protocol being used.
Type – Whether the capability uses a local (usually serial) or network control protocol.
Command – This is the full path to a script or application that will map the standard set of ZoneMinder control commands to equivalent control protocol command. This may be one of the shipped example zmcontrol-*.pl scripts or something else entirely.
Can Wake – This is the first of the actual capability definitions. Checking this box indicates that a protocol command exists to wake up the camera from a sleeping state.
Can Sleep – The camera can be put to sleep.
Can Reset – The camera can be reset to a previously defined state.
Can Move – The camera is able move, i.e. pan or tilt.
Can Move Diagonally – The camera can move diagonally. Some devices can move only vertically or horizontally at a time.
Can Move Mapped – The camera is able internally map a point on an image to a precise degree of motion to centre that point in the image.
Can Move Absolute – The camera can move to an absolute location.
Can Move Relative – The camera can more to a relative location, e.g. 7 point left or up.
Can Move Continuous – The camera can move continuously in a defined direction until told to stop or the movement limits are reached, e.g. left.
Can Pan – The camera can pan, or move horizontally.
Min/Max Pan Range – If the camera supports absolute motion this is the minimum and maximum pan co-ordinates that may be specified, e.g. -100 to 100.
Min/Man Pan Step – If the camera supports relative motion, this is the minimum and maximum amount of movement that can be specified.
Has Pan Speed – The camera supports specification of pan speeds.
Min/Max Pan Speed – The minimum and maximum pan speed supported.
Has Turbo Pan – The camera supports an additional turbo pan speed.
Turbo Pan Speed – The actual turbo pan speed.
Definition of Tilt capabilities, fields as for ‘Pan’ tab.
Can Zoom – The camera can zoom.
Can Zoom Absolute – The camera can zoom to an absolute position.
Can Zoom Relative – The camera can zoom to a relative position.
Can Zoom Continuous – The camera can zoom continuously in or out until told to stop or the zoom limits are reached.
Min/Max Zoom Range – If the camera supports absolute zoom this is the minimum and maximum zoom amounts that may be specified.
Min/Man Zoom Step – If the camera supports relative zoom, this is the minimum and maximum amount of zoom change that can be specified.
Has Zoom Speed – The camera supports specification of zoom speed.
Min/Max Zoom Speed – The minimum and maximum zoom speed supported.
Definition of Focus capabilities, fields as for ‘Zoom’ tab, but with the following additional capability.
Can Auto Focus – The camera can focus automatically.
Definition of White Balance capabilities, fields as for ‘Focus’ tab.
Definition of Iris Control capabilities, fields as for ‘Focus’ tab.
Has Presets – The camera supports preset positions.
Num Presets – How many presets the camera supports. If the camera supports a huge number of presets then it makes sense to specify a more reasonable number here, 20 or less is recommended.
Has Home Preset – The camera has a defined ‘home’ position, usually in the mid point of its range.
Can Set Presets – The camera supports setting preset locations via its control protocol.
The second key element to controlling cameras with ZoneMinder is ensuring that an appropriate control script or application is present. A small number of sample scripts are included with ZoneMinder and can be used directly or as the basis for development. Control scripts are run atomically, that is to say that one requested action from the web interface results in one execution of the script and no state information is maintained. If your protocol requires state information to be preserved then you should ensure that your scripts do this as ZoneMinder has no concept of the state of the camera in control terms.
If you are writing a new control script then you need to ensure that it supports the parameters that ZoneMinder will pass to it. If you already have scripts or applications that control your cameras, the ZoneMinder control script will just act as glue to convert the parameters passed into a form that your existing application understands. If you are writing a script to support a new protocol then you will need to convert the parameters passed into the script to equivalent protocol commands. If you have carefully defined your control capabilities above then you should only expect commands that correspond to those capabilities.
The standard set of parameters passed to control scripts is defined below,
--device=<device> – This is the control device from the monitor definition. Absent if no device is specified.
--address=<address> – This is the control address from the monitor definition. This will usually be a hostname or ip address for network cameras or a simple numeric camera id for other cameras.
--command=<command> – This specifies the command that the script should execute. Valid commands are given below.
--xcoord=<x>, --ycoord=<y> – This specifies the x and/or y coordinates for commands which require them. These will normally be absolute or mapped commands.
--width=<width>, --height=<height> – This specifies the width and height of the current image, for mapped motion commands where the coordinates values passed must have a context.
--speed=<speed> – This specifies the speed that the command should use, if appropriate.
--panspeed=<speed>, --tiltspeed=<speed> – This indicates the specific pan and tilt speeds for diagonal movements which may allow a different motion rate for horizontal and vertical components.
--step=<step> – This specifies the amount of motion that the command should use, if appropriate. Normally used for relative commands only.
--panstep=<step>, --tiltstep=<step> – This indicates the specific pan and tilt steps for diagonal movements which may allow a different amount of motion for horizontal and vertical components.
--preset=<preset> – This specifies the particular preset that relevant commands should operate on.
The ‘command’ option listed above may take one of the following commands as a parameter.
wake – Wake the camera.
sleep – Send the camera to sleep.
reset – Reset the camera.
move_map – Move mapped to a specified location on the image.
move_pseudo_map – As move_map above. Pseudo-mapped motion can be used when mapped motion is not supported but relative motion is in which case mapped motion can be roughly approximated by careful calibration.
move_abs_<direction> – Move to a specified absolute location. The direction element gives a hint to the direction to go but can be omitted. If present it will be one of ‘up’, ‘down’, ‘left’, ‘right’, ‘upleft’, ‘upright’, ‘downleft’ or ‘downright’.
move_rel_<direction> – Move a specified amount in the given direction.
move_con_<direction> – Move continuously in the given direction until told to stop.
move_stop – Stop any motion which may be in progress.
zoom_abs_<direction> – Zoom to a specified absolute zoom position. The direction element gives a hint to the direction to go but can be omitted. If present it will be one of ‘tele’ or ‘wide’.
zoom_rel_<direction> – Zoom a specified amount in the given direction.
zoom_con_<direction> – Zoom continuously in the given direction until told to stop.
zoom_stop – Stop any zooming which may be in progress.
focus_auto – Set focusing to be automatic.
focus_man – Set focusing to be manual.
focus_abs_<direction> – Focus to a specified absolute focus position. The direction element gives a hint to the direction to go but can be omitted. If present it will be one of ‘near’ or ‘far’.
focus_rel_<direction> – Focus a specified amount in the given direction.
focus_con_<direction> – Focus continuously in the given direction until told to stop.
focus_stop – Stop any focusing which may be in progress.
white_<subcommand> - As per the focus commands, except that direction may be ‘in’ or ‘out’.
iris_<subcommand> - As per the focus commands, except that direction may be ‘open’ or ‘close’.
preset_set – Set the given preset to the current location.
preset_goto – Move to the given preset.
preset_home – Move to the ‘home’ preset.
ZoneMinder has always had a minimal WML (Wireless Markup Language) capability to allow it to function on mobile phones and similar devices. However as of 1.20.0 this is now deprecated and has been replaced with a new XHTML – Mobile Profile mode as well as the default HTML4. XHTML-MP is a small, and limited, version of XHTML intended for mobile devices and is based on XHTML Basic. It does not contain scripting or other dynamic elements and essentially is a subset of HTML as most people know it.
The ZoneMinder XHTML-MP interface allows you to log into your installation via your phone or mobile devices and perform a limited number of tasks. These include viewing recent events, and monitoring live streams. However unlike the full interfaces these elements are presented as still images requiring manual refreshing. For now the XHTML-MP interface is presented as a prototype interface; rather than one offering full capabilities. As such, please feel free to make comments or offer suggestions via the forums on http://www.zoneminder.com. One final word on mobile mark-up standards in general and their application to ZoneMinder. Ideally I’d like to offer a WML2.0 interface. WML2.0 is a blending of WML1.3, which is traditional WAP, and XHTML. As such it offers the scripting that WML has traditionally included plus the better control of markup that is the realm of XHTML. Unfortunately so far I’m unaware of any devices that support WML2.0, certainly I’ve never had a phone that does. If you find out that a particular phone does support this then please let me know (or better still send me the phone!).
If you wish to use the XHTML-MP interface to ZoneMinder there is no extra configuration required to enable it per se. However ZoneMinder needs to be able to figure out what kind of content to deliver to particular browsers and so you have two choices. You can either edit zm.php and include a definition that corresponds to your phone describing a small number of basic capabilities, you will see a couple of examples already there, or you can use the comprehensive open source WURFL package available from http://wurfl.sourceforge.net/. You will need to download both the WURFL php files and the wurfl.xml file itself. WURFL is a resource containing information on the capabilities of a huge number of mobile phones, devices and browsers. Thus once it has matched your phone it can determine various capabilities it may possess. This means that ZoneMinder itself only has to deal with these capabilities and not the individual phone types.
To use WURFL you should install the php files in the same directory as ZoneMinder and then create a ‘wurfl’ sub-directory and ensure it is readable and writeable (or preferably owned by) your web server user. You should put the wurfl.xml file in there. One other thing you may need to change, as the xml file is quite large, is the ‘memory_limit’ setting in php.ini as the default setting of 8Mb may be too small. Once you’ve done this you should find that your phone or device is recognised and if it can support XHTML-MP it will receive that interface. If your phone is very new, or you are using an old version of the XML file you might find that it is not present however. The WURFL library uses a caching strategy to avoid reloading the whole XML file each time so check if a sensible looking cache file has been created in the ‘wurfl’ sub-directory also check the wurfl.log in the same place.
The WURFL is a third party application and as such I am unable to offer support directly for it. If you feel your device is missing or incorrectly represented please contact the authors via their own channels. If on the other hand you have any comments on ZoneMinder on your device specifically please let me know and I would be pleased to hear about it.
As support for cookies in mobile devices is patchy at best, the groups feature is not fully implemented in the XHTML-MP views. Instead if there is a group called ‘Mobile’ already defined then that group will always be effective, if not then all monitors available to the logged in user will be visible.
ZoneMinder is released under the GPL, see below.
ZoneMinder README, $Date: 2004/01/13 22:12:43 $, $Revision: 1.9 $
Copyright (C) 2004 Philip Coombes
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.