<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.staging.zoneminder.com/index.php?action=history&amp;feed=atom&amp;title=Automatically_Adding_Monitors</id>
	<title>Automatically Adding Monitors - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.staging.zoneminder.com/index.php?action=history&amp;feed=atom&amp;title=Automatically_Adding_Monitors"/>
	<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Automatically_Adding_Monitors&amp;action=history"/>
	<updated>2026-04-19T22:41:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Automatically_Adding_Monitors&amp;diff=5762&amp;oldid=prev</id>
		<title>Flasheart at 15:03, 27 June 2013</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Automatically_Adding_Monitors&amp;diff=5762&amp;oldid=prev"/>
		<updated>2013-06-27T15:03:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:03, 27 June 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The above is enough (with ZM 1.25) to add a new monitor to Zoneminder. In this case, for a Foscam-compatible camera at 10.10.10.5, using mjpeg with a camera user/pass of username/password in VGA colour - using Mocord at 5fps.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The above is enough (with ZM 1.25) to add a new monitor to Zoneminder. In this case, for a Foscam-compatible camera at 10.10.10.5, using mjpeg with a camera user/pass of username/password in VGA colour - using Mocord at 5fps.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If you also want to use motion detection (modect/mocord) then you&#039;ll need to add a zone too. First you&#039;ll need to find the monitorId of the event you&#039;ve just added, then use something like this, which is for a 640x480 image&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;INSERT INTO Zones SET  MonitorId = &#039;$monitorID&#039;, Name = &#039;All&#039;, Type = &#039;Active&#039;, Units=&#039;Percent&#039;, NumCoords=4, Coords=&#039;0,0 639,0 639,479 0,479&#039;, Area = 307200, AlarmRGB=16711680, CheckMethod=&#039;Blobs&#039;, MinPixelThreshold=25, MinAlarmPixels=9216, MaxAlarmPixels=230400, FilterX=3, FilterY=3, MinFilterPixels=9216, MaxFilterPixels=230400, MinBlobPixels=6144, MinBlobs=1 &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you happen to have Zoneminder&amp;#039;s console open, nothing will happen until it refreshes, or you force a refresh, then the new monitor will show. Zoneminder won&amp;#039;t immediately activate it, but after a minute or so will notice this monitor and that it&amp;#039;s not doing anything, and start it.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you happen to have Zoneminder&amp;#039;s console open, nothing will happen until it refreshes, or you force a refresh, then the new monitor will show. Zoneminder won&amp;#039;t immediately activate it, but after a minute or so will notice this monitor and that it&amp;#039;s not doing anything, and start it.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Flasheart</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Automatically_Adding_Monitors&amp;diff=5761&amp;oldid=prev</id>
		<title>Flasheart: Created page with &quot;I recently had cause to want to add monitors to Zoneminder automatically. This is how I did it. It&#039;s probably not the correct way - I got it working through trial and error (n...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Automatically_Adding_Monitors&amp;diff=5761&amp;oldid=prev"/>
		<updated>2013-06-24T20:22:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;I recently had cause to want to add monitors to Zoneminder automatically. This is how I did it. It&amp;#039;s probably not the correct way - I got it working through trial and error (n...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I recently had cause to want to add monitors to Zoneminder automatically. This is how I did it. It&amp;#039;s probably not the correct way - I got it working through trial and error (never the most compatible method) and I&amp;#039;m a somewhat cavalier coder, and others are welcome to edit this page and improve the procedure, but it does work.&lt;br /&gt;
&lt;br /&gt;
DISCLAIMER!  This could hose your database. If Zoneminder&amp;#039;s schema changes in the future, it almost certainly will. Use at your own risk!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reason: I manage over a 100 CCTV cameras across five sites via bespoke perl cgi software. This display and arrange direct mjepg feeds (described in [[IpCamMontage]] ), and I wanted to be able to control my various remote zoneminder servers using that. Managing this directly is time consuming, and should a server go down it&amp;#039;s a right faff to set up again. This way would allow me to re-configure a server instantly. I could also use it to set various configurations.&lt;br /&gt;
&lt;br /&gt;
Firstly, add a user to mysql with write permissions to the ZM database and if your software isn&amp;#039;t local, allow them to connect from anywhere/your control server using a decent password.&lt;br /&gt;
&lt;br /&gt;
Then simply issue a mysql INSERT such as;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO Monitors SET name = &amp;#039;Camera_Name&amp;#039;, type=&amp;#039;Remote&amp;#039;, Port=&amp;#039;80&amp;#039;, host=&amp;#039;10.10.10.5&amp;#039;, path = &amp;#039;/videostream.cgi?user=username&amp;amp;pwd=password&amp;#039;, width=&amp;#039;640&amp;#039;, height=&amp;#039;480&amp;#039;, Function = &amp;#039;Mocord&amp;#039;, MaxFPS = &amp;#039;5.00&amp;#039;, AlarmMaxFPS = &amp;#039;5.00&amp;#039;, Protocol = &amp;#039;http&amp;#039;, Method = &amp;#039;simple&amp;#039;, Palette = &amp;#039;3&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The above is enough (with ZM 1.25) to add a new monitor to Zoneminder. In this case, for a Foscam-compatible camera at 10.10.10.5, using mjpeg with a camera user/pass of username/password in VGA colour - using Mocord at 5fps.&lt;br /&gt;
&lt;br /&gt;
If you happen to have Zoneminder&amp;#039;s console open, nothing will happen until it refreshes, or you force a refresh, then the new monitor will show. Zoneminder won&amp;#039;t immediately activate it, but after a minute or so will notice this monitor and that it&amp;#039;s not doing anything, and start it.&lt;br /&gt;
&lt;br /&gt;
And of course, by directly manipulating the database, you can set statuses and delete monitors too. (I find the Zoneminder way of automatically setting statuses for day/night rather clunky and tiresome to keep up to date with changing monitors). By issuing db commands directly, you can of course control it as much as you like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re a strict coder and the above fills you with horror, well, I do understand. :)&lt;/div&gt;</summary>
		<author><name>Flasheart</name></author>
	</entry>
</feed>