Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/chollinger93/telegram-camera-bridge

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/chollinger93/telegram-camera-bridge

  • v1.0.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Telegram MotionEye Integration

A stupid little project that takes pictures using a Raspberry Pi Zero every x minutes (or upon a motion REST request) from a MotionEye OS camera and sends it to a Telegram Group.

...why?

docs/noodle_bot.png

So we can watch guinea pigs without having to completely expose a service or set up wireguard. Important stuff, written one bored afternoon.

How

Run

Easy:

  1. Acquire guinea pigs, kids, or other things that need watching and make sure they are happy
  2. Install MotionEye OS on a Raspberry PI and connect a camera; configure it so it sends motion detection is on and "Call a Web Hook" points to the server and port you're running this on (can be the same Raspberry, really)
  3. Customize the config/sample.yaml (see below)
  4. Build and run: go run *.go serve --config ./config/sample.yaml

Config

You will need a bot, which you can get by chatting up @BotFather on Telegram.

Next, add that to a chanel.

Use your bot's bot_name and api_key from that chat.

Next, fire a request as such:

curl --location --request GET 'https://api.telegram.org/YOUR_BOT_KEY/getUpdates'

And grab the ID of the chanel you've added the bot to.

"my_chat_member": {
                "chat": {
                    "id": INT64_ID,
                    "title": "ID",
                    "type": "group",
                    ...

Build & Test

go test ./... -coverprofile coverage.out
go tool cover --html coverage.out 
go build *.go

Docker

CONFIG_FILE=$(pwd)/config/sample.yaml
docker build . -t telegram-motioneye
docker run -d  \
    -p "$(cat $CONFIG_FILE | grep port | cut -d'"' -f2 | xargs)":6060 \
    -v $(pwd)/config:/config \
    telegram-motioneye \
    /app/server serve --config /config/$(basename $CONFIG_FILE)

FAQs

Package last updated on 15 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc