Jump to content

[support] dlandon - Zoneminder 1.36


Recommended Posts

  • 3 weeks later...

@dlandoncan you add notifications also for telegram?

Something like this

 

pip install python-telegram-bot

#############################

from telegram import Bot, InputFile

# Add the following function to send notifications to Telegram
def send_telegram_notification(token, chat_id, message, image_path=None):
    bot = Bot(token)
    
    # Check if an image is provided
    if image_path:
        # Send photo along with the message
        with open(image_path, 'rb') as photo:
            bot.send_photo(chat_id, photo, caption=message)
    else:
        # Send only the message
        bot.send_message(chat_id, message)

# Modify the section where you read parameters from secrets or set them manually
if not param_dict['token'] or not param_dict['user']:
    # read from secrets
    secrets = read_secrets()
    if not param_dict['token']:
        param_dict['token'] = secrets.get('TELEGRAM_BOT_TOKEN')  # Replace with your secret key
        zmlog.Debug(1, "eid:{} Reading token from secrets".format(eid))
    if not param_dict['user']:
        param_dict['user'] = secrets.get('TELEGRAM_CHAT_ID')  # Replace with your secret key
        zmlog.Debug(1, "eid:{} Reading user from secrets".format(eid))

# Replace the Pushover-specific code with the Telegram notification code
param_dict['title'] = '{} Alarm ({})'.format(mname, eid)
param_dict['message'] = cause + datetime.now().strftime(' at %I:%M %p, %b-%d')
if event_type == 'event_end':
    param_dict['title'] = 'Ended:' + param_dict['title']

disp_param_dict = param_dict.copy()
disp_param_dict['token'] = '<removed>'
disp_param_dict['user'] = '<removed>'
zmlog.Debug(1, "eid:{} Telegram payload: data={} files={}".format(eid, disp_param_dict, files))
send_telegram_notification(param_dict['token'], param_dict['user'], param_dict['message'], image_path)
zmlog.close()

 

Link to comment
  • 3 weeks later...

Got a question, not sure where to ask, but since it pertains to Zoneminder I'll ask here...  I have the Appdata Backup Plugin installed, and the plugin turns off the docker, backs it up, then turns it back on.  Is the Zoneminder shutdown script/process safe even while it's recording an alarm?  I have a lot of issues and db corruption at random points, and I have had to dump, drop, recreate and restore the zm database quite a few times, not sure what the cause is, but it started when I upgraded from 6.9.2 to 6.12.6...  I know this got really bad when I left the NO_START_ZM set to 1 and since I have figured out it doesn't do a normal startup or shutdown, I have set it to 0 and this has "stopped for now" but want to make sure it is safe, otherwise I would skip it on the backup and manually back it up myself.

 

Thanks in advance.

Link to comment
  • 1 month later...
42 minutes ago, Sforget said:

The latest Version, v1.36.33, has performance issues. Is there currently a way to roll back to an earlier version?

 

There is no way to roll back because the Zoneminder Docker Container always installs the latest version of Zoneminder.  Try getting support for your issue at Zoneminder support.

Link to comment
  • 1 month later...
  • 2 weeks later...

Hello,

I am trying to install this docker and get it to work with my TP-LINK c430 camera. This is my 1st time setting up CCTV so I am just experimenting with every setting. Now some weird thing happened. Here is the story.

 

I was able to install the container and run it as network type: bridge. I was able to access its webUI and tweak camera(monitor) settings. Yet I was not abble to get it to connect to my camera. My bright idea was that maybe docker bridge is isolating the container from my external network thus I switched to Custom: br0 - This should expose the container to the network. Container worked fine. But no camera access same as before. Lots of tweaking and curisng TP-link for not using default ONVIF or webui ports later I found the correct URI for ONVIF and RTSP. Yay everything works - I see my camera and can record. Hello World!

 

But then I had this bright idea: Wait... Maybe the problem was actually the URI and ports instead of the network type? Lets Test! Switched back to bridge... RIP... No more web UI... Now it redirects to my login screen. BUT WHY?! Found that in the advanced settings for container the WEB UI url was set to https://[IP]:[PORT:443]/zm instead of https://[IP]:[PORT:8443] for bridging the ports? Fine fixed that now. Still nothing... And this is where my ideas ended. I see this error in logs as well:
image.thumb.png.18a6e5a83f28486e68eefb44337a1526.png

These are my container settings:
image.thumb.png.d4852a2e14aa3d3b7a328c59d2c0c36c.png

 

I realize I might be doing something stupid and completely unrelated to this container but maybe some one can spot what it is?

Edited by Laov
Link to comment
  • 3 weeks later...

Hey Dlandon, 

 

Is there a GPU enabled version of this anywhere? I've seen people talking about using passthrough to encode/decode etc, figured it might knock my CPU usage down a bit. There is mention in this topic but I don't seem to be able to find it anywhere

Link to comment
5 hours ago, Addy said:

Hey Dlandon, 

 

Is there a GPU enabled version of this anywhere? I've seen people talking about using passthrough to encode/decode etc, figured it might knock my CPU usage down a bit. There is mention in this topic but I don't seem to be able to find it anywhere

I was working on a docker years ago, but gave it up as it ended up taking way too much time.  Someone may have forked it, but I don't know.

  • Like 1
Link to comment

Sorry, i couldn't find the answer to my problem in this thread. Problably iam just overseeing something since iam relativlely new to unraid:

i installed Zoneminder. i chose an unassigned device as my data path (for testing its just a USB drive, which will later be replaced by something stable).

grafik.thumb.png.8a6526f317a3f4a962173f5eb5bf2d03.png

The "data folders" are created in the USB drive.

here is my problem: When i open the WEB GUI some symbols are not shown:

 

grafik.thumb.png.7ef5df4e90ea90c221f724d9783b246c.png

 

the logs in zoneminder look like this:

 

grafik.thumb.png.d52c7d9ea703b15dafd7eef8e45255f7.png

 

If i install Zoneminder in default settings, the symbols show normal.

 

 

What am i missing?

Thank you in advance!

Link to comment

regarding my question above:

i found this in the Zoneminder forum. i think this might be the solution, but since my linux knowledge is limited unfortunately, iam not not sure how to translate this to my setup

 

grafik.png.1ad0536254cafd935072fbf065babc70.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...