This project started as a problem solver for ourself and did his job very well. Unfortunately, as things move on, development has stopped a long time ago. This is why it is officially being archived. There is a chance that it will continue to work for some people. If you like it - good. If it doesn't work - Sorry for wasting your time, feeling bad for you.
We noticed that people are really using motioneye-telegram, that is awesome. If you encounter any problems or can't find something you are searching for, feel free to start a discussion, contact us (of course) via Telegram or by adding an issue. Any ideas are welcome!
- send latest n snapshots and video via telegram
- presence-check (you are not at home by pinging one or more eg. smartphones)
- no port forwardings or open ports required (443 outbound must be possible)
- no telegram-bot installation required
- ! currently there are some problems with wifi-devices in energy saving mode, any help appreciated.
For these scripts to run, you have to ensure that your environment meets the follwing prerequisites:
- Minimum, by motioneye supported, Raspberry Pi (SBC)
- Raspberry Pi OS Version Buster (Debian 10) or higher
- latest motioneye installed
- tested with motion Version 4.4.0 and motionEye Version 0.42.1
- somehow fixed IP Adress for your smartphone(s) or other devices
- look for @botfather in telegram and open a chat
- enter the following command and follow the wizard for creation
/newbot
- write down your HTTP API KEY
- start a conversation with @jsondumpbot.
- this will return a json-styled message to you which includes your chat-id:
- for example:
"chat": { "id": <your chat id, eg. 321654987>, (... some more content ...) },
- take note of your chat-id and save it alongside your http api key
- details can be found here
- send the following command to @botfather to use some more privacy
/setprivacy
- you can enter these into telegram if you want to
/setdescription - changes the bot-description /setabouttext - changes the bot-about-description /setuserpic - changes the photo in your bot-profile
- go to your home directory on your raspberry pi
cd ~
- install prerequisites
sudo apt install -y arping tree git
- download all the files from github
git clone https://github.com/DaniW42/motioneye-telegram.git
- start the installation script
cd motioneye-telegram ./install-tg.sh
install the cronjob for presence check
to install the cronjob for presence check we have to run install-cron.sh as root (using sudo).
as we should never run unknown scripts as root, we kindly invite you to take a sneek peak at install-cron.sh before continuing. to install the cronjob (which runs bin/presencecheck.sh every minute):
- start the installation script and carefully read the instructions given
sudo ./install-cron.sh
- toggle Still Images on and select Capture Mode
- toggle Movies on and select Recording Mode
- look for your script path and enter it in motioneye ("run an end command" in "motion notification")
e.g.
/home/pi/motioneye-telegram/bin/motion-send.sh %$ %t
%$
important because it passes the camera name to the script%t
important because it passes the camera id to the script