Solved: Watch window not displaying events
Solved: Watch window not displaying events
I have just upgraded to v1.24.3 and everything is working ok apart from the watch window which is not displaying events below the live image. Also the FPS never updates and remains blank. In montage view the FPS does update and shows when an alarm has occurred. Hardware is AMD 64 running on Ubuntu server 11.04. Have checked all log files and can see no errors. I would be grateful of any suggestions as to how to track down what the problem is.
thanks, John
thanks, John
Last edited by chippy on Thu May 19, 2011 5:32 am, edited 1 time in total.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: Watch window not displaying events
If you are running FireFox can you check with FireBug and see if you are getting any javascript errors. It would also help to show if the ajax messages are being sent and received correctly.
Phil
Re: Watch window not displaying events
Thanks for the reply, I enabled the console in Firefox and I get 2 errors when I open the watch window.
First one is a syntax error in index.php?view=watch&mid=1 on line130 "var appletRefreshTime = ;".
Second one which I think is the problem is in zm/skins/classic/views/js/watch.js error reads "STATE_IDLE is not defined" on line 46 which reads "var alarmState = STATE_IDLE;"
Anyone got any ideas where STATE_IDLE should be getting defined ?
First one is a syntax error in index.php?view=watch&mid=1 on line130 "var appletRefreshTime = ;".
Second one which I think is the problem is in zm/skins/classic/views/js/watch.js error reads "STATE_IDLE is not defined" on line 46 which reads "var alarmState = STATE_IDLE;"
Anyone got any ideas where STATE_IDLE should be getting defined ?
Re: Watch window not displaying events
I am also having the same problem and getting the syntax error and STATE_IDLE is not defined. Seems to be watch.js that is at fault as well. Montage view works as it should showing the state and the video fps.
Re: Watch window not displaying events
I have had this same problem since using the svn. It seems that the initial database creation script is setting an empty string for several values.
Any boolean value with a default of "yes" is being assigned 1, any default of "no" is being left empty. This results in syntax errors in some of the java scripts. The Cambozola reload value is also left empty. Setting it to any value, even 0, results in the proper execution of the java scripts. I have been going directly into the database using MYSQL Browser and assigning values to every option. The Watch window then comes up with the events listed, Force Alarm available, etc.
Any boolean value with a default of "yes" is being assigned 1, any default of "no" is being left empty. This results in syntax errors in some of the java scripts. The Cambozola reload value is also left empty. Setting it to any value, even 0, results in the proper execution of the java scripts. I have been going directly into the database using MYSQL Browser and assigning values to every option. The Watch window then comes up with the events listed, Force Alarm available, etc.
Re: Watch window not displaying events
I have looked in the Config table in the zm database and could not find any boolean fields that did not have a value set. Is this the table you are referring to ?
Re: Watch window not displaying events
Solved:
You need to put a value into RELOAD_CAMBOZOLA (I put 300) which is in Options under the images tag. Then all should work ok
You need to put a value into RELOAD_CAMBOZOLA (I put 300) which is in Options under the images tag. Then all should work ok
Re: Solved: Watch window not displaying events
Here is an excerpt from the zm_create.sql script after running ./configure.
insert into Config set Id = 115, Name = 'ZM_OPT_CONTROL', Value = '', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', .........
insert into Config set Id = 116, Name = 'ZM_OPT_TRIGGERS', Value = '', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', .................
insert into Config set Id = 117, Name = 'ZM_CHECK_FOR_UPDATES', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))',............
insert into Config set Id = 118, Name = 'ZM_UPDATE_CHECK_PROXY', Value = '', Type = 'string', DefaultValue = '', Hint = 'string', Pattern = '(?-xism:^(.+)$)',..............
insert into Config set Id = 127, Name = 'ZM_WEB_USE_OBJECT_TAGS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))',...................
Anything with a default value of yes has an actual value of 1. Anything with a default value of no has an actual value unset. This results in syntax errors in the java scripts.
If you have checked in Options that Cambozola is installed, the script loads the refresh value from the config table. If it is empty, a syntax error results. This happens whether or not your browser is actually using Cambozola. Are you really using Cambozola with FireFox?
The defaults may be corrected if you have made any changes to the Config through the Zoneminder Options panels. The scripts for updating the Config might be different than the create database scripts.
insert into Config set Id = 115, Name = 'ZM_OPT_CONTROL', Value = '', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', .........
insert into Config set Id = 116, Name = 'ZM_OPT_TRIGGERS', Value = '', Type = 'boolean', DefaultValue = 'no', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))', .................
insert into Config set Id = 117, Name = 'ZM_CHECK_FOR_UPDATES', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))',............
insert into Config set Id = 118, Name = 'ZM_UPDATE_CHECK_PROXY', Value = '', Type = 'string', DefaultValue = '', Hint = 'string', Pattern = '(?-xism:^(.+)$)',..............
insert into Config set Id = 127, Name = 'ZM_WEB_USE_OBJECT_TAGS', Value = '1', Type = 'boolean', DefaultValue = 'yes', Hint = 'yes|no', Pattern = '(?i-xsm:^([yn]))',...................
Anything with a default value of yes has an actual value of 1. Anything with a default value of no has an actual value unset. This results in syntax errors in the java scripts.
If you have checked in Options that Cambozola is installed, the script loads the refresh value from the config table. If it is empty, a syntax error results. This happens whether or not your browser is actually using Cambozola. Are you really using Cambozola with FireFox?
The defaults may be corrected if you have made any changes to the Config through the Zoneminder Options panels. The scripts for updating the Config might be different than the create database scripts.
Re: Solved: Watch window not displaying events
I needed to change the RELOAD_CAMBOZOLA to a number to fix the problem in my case just as chippy noted. The 0 and 1 Boolean entries were all in place on the database, however, I used the SVN after the official release of 1.24.3 and it is likely that the Boolean entry issue was fixed on the release. Over all not a major bug and will be and easy fix in the svn by placing a 0 in the RELOAD_CAMBOZOLA field.
Re: Solved: Watch window not displaying events
Awesome! Was looking to fix this error too, thanks a lot.
Is the svn the same as the current release ??
Is the svn the same as the current release ??
Just... enjoy life!
Re: Solved: Watch window not displaying events
Hi, credit must go to Tommy for resolving this. Many thanks Tommy
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: Solved: Watch window not displaying events
I have tracked this down to a problem in zmconfgen.pl. If you can't wait for an official fix then you can apply this patch yourself
and then you will have to rerun configure and make. However while this will fix the db creation script and so any new databases created will be fine, it will not fix existing ones. To do that I think it's just a case of running the following SQL in the mysql cli tool
and then you should be set.
Code: Select all
Index: zmconfgen.pl.in
===================================================================
--- zmconfgen.pl.in (revision 3343)
+++ zmconfgen.pl.in (working copy)
@@ -184,7 +184,7 @@
sub addSlashes
{
my $string = shift;
- return( "" ) unless $string;
+ return( "" ) if ( !defined($string) );
$string =~ s|(['"])|\\$1|g;
return( $string );
}
Code: Select all
update Config set Value = 0 where Type = 'boolean' and Value = '';
Phil