{"id":42577842,"url":"https://github.com/armand1m/ipcamera_bot","last_synced_at":"2026-01-28T22:01:35.201Z","repository":{"id":215018061,"uuid":"736621697","full_name":"armand1m/ipcamera_bot","owner":"armand1m","description":"A bot that interfaces your IP Camera with Telegram. Supports multiple IP cameras. Written in Rust, made to be hosted in an old Android phone using Termux.","archived":false,"fork":false,"pushed_at":"2024-01-19T12:59:36.000Z","size":58,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T09:39:12.383Z","etag":null,"topics":["bot","ipcamera","rust","telegram","termux"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/armand1m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-28T12:02:52.000Z","updated_at":"2025-10-13T09:42:44.000Z","dependencies_parsed_at":"2024-01-04T16:47:58.503Z","dependency_job_id":null,"html_url":"https://github.com/armand1m/ipcamera_bot","commit_stats":null,"previous_names":["armand1m/ipcamera_bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/armand1m/ipcamera_bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armand1m%2Fipcamera_bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armand1m%2Fipcamera_bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armand1m%2Fipcamera_bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armand1m%2Fipcamera_bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armand1m","download_url":"https://codeload.github.com/armand1m/ipcamera_bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armand1m%2Fipcamera_bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28853194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","ipcamera","rust","telegram","termux"],"created_at":"2026-01-28T22:01:34.455Z","updated_at":"2026-01-28T22:01:35.192Z","avatar_url":"https://github.com/armand1m.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipcamera_bot\n\nThis is a telegram bot that fetches a live record from an IP Camera using RTSP protocol, motivated by me going on trips and wanting to keep an eye on my cats.\n\nWritten in Rust, made to be deployed locally in your network using an old Android phone through Termux.\n\n## Commands available\n\n- [x] `/get_live`: retrieves 5 seconds of live record from one or multiple IP Cameras using the RTSP protocol.\n    - [x] Cameras and recording settings can be setup in a JSON file that can be found with the absolute path specified in the `CAMERA_CONFIG_PATH` environment variable.\n    - [x] This command can be renamed with the `GET_RECORD_COMMAND` environment variable (default: `/get_live`)\n\nYou may also send these commands directly to the bot instead of adding it to a chat.\n\n## Running it locally\n\nEnvironment:\n\n - Make sure you have Rust installed and updated in your laptop.\n - Make sure you have your IP Camera on the same network as your laptop. _(tip: you can use VLC to test it out)_\n\nSetup:\n\n - Clone this repository: `git clone https://github.com/armand1m/ipcamera_bot`\n - Make your `camera_config.json` file: `cp example_camera_config.json camera_config.json` \n - Edit the `camera_config.json` to correspond to your camera desired setup.\n - Make your `.env.`: `cp .env-example .env`\n - Edit the `.env` accordingly. Setup your bot father token, ip camera url, username, password, and path to the camera config json file.\n\n Now you should be good to get started with.\n\n - For development: `cargo run`\n - For production:\n\n    ```sh\n    cargo build --release\n    ./target/release/ipcamera_bot\n    ```\n\n## Running with Docker\n\n**Only works on Linux, because host networking in Docker for Mac cannot make this work.**\n\nSetup:\n\n - Clone this repository: `git clone https://github.com/armand1m/ipcamera_bot`\n - Make your `.env.`: `cp .env-example .env`\n - Edit the `.env` accordingly. Setup your bot father token, ip camera url, username, password, and properties.\n - Start app using docker-compose:\n    ```sh\n    docker-compose up\n    ```\n\n## Running it on termux\n\nI made this bot to be run on an old Android phone through Termux. This is how you can get it setup.\n\n### Setup Termux\n\nInstall Termux as recommended in their official API. I would recommend using F-Droid, as it is pretty easy.\nMake sure to have these packages installed through F-Droid:\n\n    - Termux\n    - Termux API\n\n### Setup runit (through `termux-services`) and SSH\n\nAccess termux and install `termux-services`, `git` and `openssh`\n\n```sh\npkg install termux-services \n```\n\n### Setup openssh \n\nYou probably want to `ssh` into your phone from your laptop instead of typing all of this in your phone. _(you could be using a bluetooth keyboard, but you know what I mean, don't do this)_\n\nInstall `openssh`:\n\n```sh\npkg install openssh\n```\n\nTo start the `openssh` service:\n\n```sh\n# enable sshd\nsv-enable sshd\n\n# start sshd\nsv up sshd\n\n# check sshd status\nsv status sshd\n```\n\nYou can check for service logs like this:\n\n```sh\ntail -f $LOGDIR/sv/sshd/current\n```\n\n`sshd` in termux comes with password authentication enabled by default _(you can check with `cat $PREFIX/etc/ssh/sshd_config`)_,\nso if everything is ok, you can run `passwd` to setup a password.\n\n`sshd` will be running on port `8022`. You can connect in your computer using the following:\n\n```sh\nssh root@\u003cphone-ip\u003e -p 8022\n```\n\nUse the password you've setup with `passwd`. You can get the ip with `ifconfig`.\n\n### Acquire wake lock\n\nTo avoid the Android OS from sleeping your Termux process, use the `termux-wake-lock` command to prompt a wake lock for it.\n\nYou can also do it from Android GUI in your notification panel.\n\n## Setup ipcamera_bot environment\n\nMake sure you have `git` and `rust` installed on your termux:\n\n```sh\npkg install git\npkg install rust\n```\n\nYou might also want `vi`:\n\n```sh\npkg install vi\n```\n\nNow we should be good to clone and build the project:\n\n - Create a folder `~/Projects` and `cd` into it: `mkdir ~/Projects \u0026\u0026 cd ~/Projects`\n - Clone this repository: `git clone https://github.com/armand1m/ipcamera_bot`\n - `cd` into it: `cd ~/Projects/ipcamera_bot`\n - Make your `.env.`: `cp ~/Projects/ipcamera_bot/.env-example ~/Projects/ipcamera_bot/.env`\n - Edit the `.env` accordingly. Setup your bot father token, ip camera url, username, password, and properties.\n    - `vi ~/Projects/ipcamera_bot/.env`\n\nOnce done, build the project:\n\n```sh\ncd ~/Projects/ipcamera_bot\ncargo build --release\n```\n\nAnd now you should have a release build in `~/Projects/ipcamera_bot/target/release/ipcamera_bot`\n\n## Setup ipcamera_bot on runit\n\nRun the `setup-ipcamera-svc-logger.sh` script to setup the `runit` logger:\n\n```sh\n~/Projects/ipcamera_bot/scripts/termux-setup/setup-ipcamera-svc-logger.sh\n```\n\nRun the `setup-ipcamera-svc-runner.sh` script to setup the `runit` runner:\n\n```sh\n~/Projects/ipcamera_bot/scripts/termux-setup/setup-ipcamera-svc-runner.sh\n```\n\nYou can check if it is up with:\n\n```sh\nsv status ipcamera_bot\n# run: ipcamera_bot: (pid 29368) 1428s, normally down; run: log: (pid 5798) 11062s\n``` \n\nYou should be all set to start the service now:\n\n```sh\nsv up ipcamera_bot\n```\n\nYou should be able to read the logs with:\n\n```sh\ntail -f $LOGDIR/sv/ipcamera_bot/current\n```\n\nTerminate the server with:\n\n```sh\nsv down ipcamera_bot\n```\n\n`runit` by default sets up log rotation with up to 10 files with max 1mb each.\nOnce `current` reached the max size, it gets renamed and a new `current` is created.\n\n### Starting up on boot\n\nCheck https://wiki.termux.com/wiki/Termux:Boot\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmand1m%2Fipcamera_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmand1m%2Fipcamera_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmand1m%2Fipcamera_bot/lists"}