Coder Social home page Coder Social logo

jordyv / gocam Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 601 KB

Tool to check your IP camera images for changes and send an alert when moment was detected

Makefile 0.02% Go 1.39% JavaScript 0.15% CSS 98.18% HTML 0.26%
ip-camera golang go ipcam security telegram

gocam's Introduction

Build Status codecov Go Report Card

Gocam - IP camera alert tool written in Go

Simple script to get an image from the IP camera every x seconds, calculate the unique hash with the perception hashing algorithm and compare it with the previous capture. When the configured treshold is reached, it will trigger an action.

Currently supported alerts/actions:

  • Write a line to a log file
  • Use ImageMagick's 'compare' tool to create a difference image from the snapshots
  • Telegram alert

Features

  • Send Telegram alert when movement is detected (after 5 cycles, eg 5 x 5 seconds if the interval is 5s)
  • Create compare image when movement is detected
  • Simple web interface to see the camera snapshots for the alerts

Installation

  • Clone this repository
  • Run make
  • The binary is compiled in the dist folder

Configuration

Create a gocam.yaml file in /etc or at your home folder. Check gocam.example.yaml for an example.

cameraURL: "<< YOUR CAMERA IMAGE URL >>"
imagePath: "/home/user/camera"
verbose: false
interval: 5s
maxKeepedImageFiles: 10
treshold: 4
http: true
httpAddr: :6090

alertHandlers:
  - console
  - diff
  - telegram

gocam's People

Contributors

jordyv avatar sqjor avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.