Page 1 of 1

[Resolved] freevo -> ZoneMinder probs

Posted: Wed Sep 23, 2009 10:03 am
by suzz
Hi all,
I freevo on one machine and another on ZoneMinder all with debian-linux. I want to see the video output on freevo.
Freevo machine = 192.168.0.44
ZoneMinder machine = 192.168.0.45
my params :

Code: Select all

### === Begin ZM
plugin.activate('zoneminder', level=70)
ZONEMINDER_CONFIG = '/mnt/dns/usr/local/etc/zm.conf' # ( with sshf....)
ZONEMINDER_EVENTS_DIR = '/mnt/dns/var/www/zm/events/'
ZONEMINDER_CLIENT_IPV4_ADDRESS = None
ZONEMINDER_SERVER_AUTH_TYPE = 'builtin'
ZONEMINDER_SERVER_USERNAME = 'toto'
ZONEMINDER_SERVER_PASSWORD = 'toto'
ZONEMINDER_SERVER_AUTH_RELAY = 'hashed'
ZONEMINDER_SERVER_AUTH_HASH_SECRET = ''
ZONEMINDER_SERVER_HOST = '192.168.0.45' # (ZM machine)
ZONEMINDER_SERVER_PORT = '80'
ZONEMINDER_SERVER_USE_SSL = False
ZONEMINDER_SERVER_SSL_KEY = None
ZONEMINDER_SERVER_SSL_CERT = None
### === End ZM
error output :

Code: Select all

plugin zoneminder deactivated, reason: mysql error 2002:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I've befor : apt-get install python-mysqldb

why this problem?
Someone an idea?
Thank you all..... :)

Posted: Tue Sep 29, 2009 9:12 am
by suzz
Hi all,
For this error, there is a conf file (python) to say not localhost, but IP = xxxx?
...

Posted: Sat Oct 03, 2009 2:15 pm
by suzz
This post is translated from the French :oops:
If you are freevo machine in room and zoneminder server under the cellar :
The ZM server config is :

Code: Select all

(in the server machine (where ZM is hosted))
/usr/local/etc/zm.conf
#[...]
#ZM_DB_HOST=localhost
ZM_DB_HOST=192.168.X.X # (your server machine)
(ATTENTION your users and password)
#[...]
You must configure your MySQL server system in MySQL User Permissions with 2 users with the same user_name on 2 different IP machines!
easy with webmin :)

Code: Select all

(If zmadmin is your login admin.)
Username = zmadmin
Hosts = (your IP Server)
AND
Username = zmadmin
Hosts = (your IP Client)
with same parameter!
After
/etc/init.d/mysql restart (example debian)

Your freevo system must see the zm.conf config from the ZM server!
You must mounting the directories on the freevo system from the ZM server.
For my example I I use this param with fuse on my /etc/fstab freevo machine:

Code: Select all

sshfs#my_user@ip_address_server:/usr/local/etc/                /mnt/my_directory          fuse            user,noauto,noatime     0 0
I let you make a script to auto mount the remote directory (in Franch) 8)
http://nicotux.wordpress.com/category/debian/

Now the Christophe N. zoneMinder freevo plugin 8)
pushd /usr/lib/python2.5/site-packages/freevo/plugins/
nano zoneminder.py

Code: Select all

#[...]
        if not config.ZONEMINDER_CONFIG:
###            filename = '/etc/zm.conf' #(you must # this line and put the next example)
                filename = '/mnt/dns/usr/local/etc/zm.conf'
#[...]
class ZoneMinderMainMenu(Item):
    def __init__(self, parent, Zm):
        Item.__init__(self, parent)
###        self.name   = _('CCTV') # (this for french talking : )
        self.name   = _('Video-surveillance')
        self.menus = [
                ZoneMinderLiveStreamMenu(parent, Zm),
                ZoneMinderEventsMenu(parent, Zm)
        ]
#[...]
popd
Now in your local_conf.py freevo machine:

Code: Select all

### === Begin ZM
plugin.activate('zoneminder', level=70)
ZONEMINDER_CONFIG = '/mnt/dns/usr/local/etc/zm.conf' #(the fstab directory)
ZONEMINDER_EVENTS_DIR = '/mnt/dns/var/www/zm/events/' #(the fstab directory)
ZONEMINDER_CLIENT_IPV4_ADDRESS = '192.168.X.X' #(IP freevo machine (optional))
ZONEMINDER_SERVER_AUTH_TYPE = 'hashed'
ZONEMINDER_SERVER_USERNAME = 'your_user'
ZONEMINDER_SERVER_PASSWORD = 'your_password'
ZONEMINDER_SERVER_AUTH_RELAY = 'hashed'
ZONEMINDER_SERVER_AUTH_HASH_SECRET = ''
ZONEMINDER_SERVER_HOST = '192.168.X.X' #(IP server machine)
ZONEMINDER_SERVER_PORT = '80'
ZONEMINDER_SERVER_DB_NAME = 'zm'
ZONEMINDER_SERVER_USE_SSL = False
ZONEMINDER_SERVER_SSL_KEY = None
ZONEMINDER_SERVER_SSL_CERT = None
### === End ZM
After, run freevo and enjoy :D

I tried to be easy :?

ZoneMinder on freevo lounge is vaiment well! :shock: 8)

Suzz