GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sudoping01/onvif-ipcam-controller-python

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
IpCamController.py
IpCamController.py
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

IpCamController

IpCamController is a Python class designed for discovering and controlling ONVIF-compatible IP cameras. It enables you to search for ONVIF devices on your network and perform essential PTZ (Pan-Tilt-Zoom) operations such as moving the camera up, down, left, and right.

Features

  • Discover ONVIF Devices: Automatically find ONVIF-compatible devices on the local network.
  • Connect to ONVIF Cameras: Easily connect to an ONVIF camera using its IP address, port, username, and password.
  • Control Camera Movements: Perform PTZ operations including moving the camera left, right, up, and down.
  • Stop Camera Motion: Stop the camera's motion with a simple command.

Installation

Ensure you have the necessary dependencies installed:

pip install onvif-zeep wsdiscovery

Example :

from IpCamController import IpCamController
import time

if __name__ =="__main__":
    client =  IpCamController()

    ip = '192.168.1.101'
    client.search_onvif_device()  # search available onvif device on the network by sending probe msg

    if ip not in client.available_onvif_device : # make sure the ipcam is on the network 
        print(f" {ip} is not on the network")
        exit()

    client.config(
                    ip       = ip,
                    username = 'admin',
                    password = 'TestPassword',
                    port     = 80
                  )
    

    while True: 
        choice = input(" Choice a Motion : \n l : left \n r : right \n d: down \n u: down \n : ")

        if choice == "l" : 

            client.move_left(client.ptz, client.request)
            time.sleep(0.25)
            client.stop_motion(client.ptz, client.request)
        elif choice == 'r':
            client.move_right(client.ptz, client.request)
            time.sleep(0.25)
            client.stop_motion(client.ptz, client.request)
        elif choice == "u":
            client.move_up(client.ptz, client.request)
            time.sleep(0.25)
            client.stop_motion(client.ptz, client.request)
        elif choice == "d":
            client.move_down(client.ptz, client.request)
            time.sleep(0.25)
            client.stop_motion(client.ptz, client.request)

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

5 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.