This is a thin wrapper around motion that connects it to a Telegram Bot
It works by configuring motion to call web endpoints when certain events are triggered,
and also allows the bot to control motion by calling its web control endpoints
- run
mvn packageto generate ajar - Create a dir
MotionTelegramBotunder/home/pi(or elsewhere but make sure to update the path in thedocker runcommand) - Run the following after replacing placeholders
docker run -d \
-v /home/pi/MotionTelegramBot/:/jar \
-w /jar \
--network="host" \
-e BOT_CHAT_ID=<chat id> \
-e BOT_USERNAME=<username> \
-e BOT_TOKEN=<token> \
-e MOTION_PORT=<port> \
-e MOTION_CAM_ID=<cam id> \
--rm arm32v7/eclipse-temurin:17 java \
-jar MotionTelegramBot.jar
- Optionally inspect logs to confirm no errors
- The bot sends a "Hello there!" message when it boots up
- Explain how to get values for the placeholders
- Explain changes needed to
motion.conf - Explain why
--network="host"is needed - Explain how to run directly with
javawithout docker