Skip to content

Gonzalo5978/CamLink

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

CamLink

Automated tool for configuration and revision of CCTV devices
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

Product Name Screen Shot

Project made by Altatec Seguridad.

The project is a Rest API designed to be mounted on a business environment server. The API waits to receive an ID of an element registered in the internal DB of the ERP.

The received element should contain data of a CCTV model such as security cameras. Actually the API is able to comunicate with Hikvisio ISAPI based devices in order to check it's configurations and change parameters remotely.

(back to top)

Built With

  • Python
  • FastAPI
  • Docker

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

Follow the steps to install project dependencies.

Docker

  • Debian
  1. Set up Docker apt repository:

    # Add Docker's official GPG key:
    sudo apt-get update
    sudo apt-get install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    
    # Add the repository to Apt sources:
    echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
      $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
      sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update
  2. Install Docker package:

    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  3. Verify Installation:

    sudo docker run hello-world
  • Fedora
  1. Install dnf-plugins-core package:

    sudo dnf -y install dnf-plugins-core
    sudo dnf-3 config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
  2. Install Docker Engine:

    sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  3. Start Docker:

    sudo systemctl start docker
  4. Verify Installation:

    sudo docker run hello-world

(back to top)

Installation

Enviroment

This project uses dotenv library to use envoriment vatiables nedeet to ensure the correct comunication wit Odoo ERP. To run the program correctly you must create .env file on root directory and write the following variables:

URL='erp_url'

DB='db_url'

USERNAME='username'

PASSWORD='password'


Docker

  1. Clone the repo

    git clone https://github.com/GonzaloAltatec/CamLink.git
  2. Acess repo directory

    cd CamLink
  3. Build Docker image

    docker build -t camlink .
  4. Run Docker container

    docker run -p8000:<your_port> camlink
  5. Stop Docker Container

    To stop the container you have to list the running images.

    docker ps -a

    Once you list the running containers copy the container ID and execute:

    docker rm <container_id>
  6. (Optional) Detached mode & Logs

    If you want to run Docker container on "Detached mode" run the following command:

    docker run -d -p8000:<your_port> camlink

    Once if you run the container on detached mode the container will run on the background, but if you want to see the logs and console information run this command:

    docker logs <container_id>

(back to top)

Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.

For more examples, please refer to the Documentation

(back to top)

Roadmap

  • Revise devices
  • MongoDB migration
  • Configure devices
  • Kubernetes implementation

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Project it's written in Python 3.12 version, if you want to execute source code to test without building the docker image, please read the following Python 3.12 installation guide.

Python-3.12 Installation

  • Debian
  1. Update system:

    sudo apt update -y
    sudo apt upgrade -y
  2. Install dependencies:

    sudo apt install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
    libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
    xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git
  3. Download source code:

    wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz
  4. Extract files:

    tar -xf Python-3.12.0.tgz
  5. Configure and build:

    cd Python-3.12.0
    ./configure --enable-optimizations
  6. Build Python:

    make -j 4
  7. Install:

    sudo make altinstall

    Using altinstall instead of install prevents it from replacing the system's default Python interpreter (which could cause system tools to malfunction).

  8. Verify Installation:

    python3.12 --version
  • Fedora
  1. Update system:

    sudo dnf update
  2. Install dependencies:

    sudo dnf groupinstall 'Development Tools'
    sudo dnf install openssl-devel bzip2-devel libffi-devel sqlite-devel 
  3. Download source code:

    wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz
  4. Extract files:

    tar -xf Python-3.12.0.tgz
  5. Configure and build:

    cd Python-3.12.0
    ./configure --enable-optimizations
  6. Build Python:

    make -j 4
  7. Install:

    sudo make altinstall

    Using altinstall instead of install prevents it from replacing the system's default Python interpreter (which could cause system tools to malfunction).

  8. Verify Installation:

    python3.12 --version

(back to top)

Top contributors

contrib.rocks image

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Gonzalo Rodríguez - [email protected]

Project Link: https://github.com/GonzaloAltatec/CamLink

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Dockerfile 0.5%