Zoneminder on Freenas

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
tassiepomme
Posts: 4
Joined: Thu Feb 20, 2020 11:10 pm

Zoneminder on Freenas

Post by tassiepomme »

Hi
Total ZoneMinder noob here...

I have FreeNAS 11-3 running ZoneMinder V1.32.3 in a jail.
I have a single camera currently set to 'Record'.

The system operates exactly as expected and records events in 10 minute segments.
All good, however when I try to view events, any which are recorded after midnight each night will not play back - error message on screen says 'The video could not be loaded, either because the server or network failed or because the format is not supported'.

Strangely, recordings from approximately 11am the next day onwards (until midnight) will view fine.
This behaviour repeats itself daily, with the first playable video starting from around 11am- to 11.30am each day then the rest play ok through to midnight.

I'm assuming this issue might be related to a time setting in the SQL database, or something similar, given it appears to be a time related issue.
I've done some searching and I'm thinking the recordings are there, it's just the link in the events page that doesn't work? I'm not savvy enough to start editing config files, etc. though without some guidance.

Please let me know if you need further technical information regarding my setup and I'll try to provide.

Many thanks!
Andy
tassiepomme
Posts: 4
Joined: Thu Feb 20, 2020 11:10 pm

Re: Zoneminder on Freenas

Post by tassiepomme »

As I haven't had any replies to my post so far, I decided to completely uninstall ZoneMinder and reinstall.
Added a single camera via 'Onvif' detection and set up to 'Record'.
Same issue with the recorded files - can only view recordings that were made between approx. 11.30am and midnight. Unable to play any recordings in-between these times.
The jail time is the same as the ZoneMinder time.

I'd really appreciate some assistance as other than this one issue, my system works perfectly. Very frustrating!

Cheers
tassiepomme
Posts: 4
Joined: Thu Feb 20, 2020 11:10 pm

Re: Zoneminder on Freenas

Post by tassiepomme »

After some kind assistance over on the FreeNAS sub Reddit, I've managed to fix the issue.
Firstly changing the timezone in SQL using the following commands in the FreeNAS jail shell:

mysql -u root -p
(enter SQL database password when prompted - you can locate this in the FreeNAS plugin menu 'Post Install Notes')

"SET GLOBAL time_zone = '+11:00';" (obviously you need to change the offset to match your timezone, i.e. UTC +/- hours)

Then in the FreeNAS jail shell edit the php.ini file:

edit /usr/local/etc/php.ini

Find the timezone entry:

date.timezone = "UTC"

then edit it to match your timezone (for me it was date.timezone = "Australia/Hobart"), but you can get yours here:
https://www.php.net/manual/en/timezones.php

then ESC+Enter to exit, selecting 'a' to save the file.

I then restarted FreeNAS and all was good.

Cheers
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Zoneminder on Freenas

Post by rockedge »

Sorry tassiepomme,

I did not see the post until now!

I'm glad you solved it. I set the time in the php.ini to match the system clock and then in ZM I leave it UNSET
Otherwise if the clocks and time zones are not matched correctly with the system the event file names get an incorrect timestamp and you saw what happens. Also the mysql clock must match as well.
Post Reply