Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

adryx92/ChristmasTreeBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ChristmasTreeBot

About

This is a DIY project to use a Raspberry Pi running a Telegram Bot to turn on and off your Christmas tree.

Yes, this is an old project and a smart plug is simpler... But not that funny!

Installation

Automatic Instructions

  • Make the setup script executable with chmod +x install.sh.
  • Run the script elevated sudo ./install.sh.
  • Add a cron to automaticallu start the bot, as explained in the Manual Instructions.

Manual Instructions

  • First of all make sure you have installed Python3 typing python3 --version in the shell. If not, install it with apt install python3.
  • Then install pip3 with apt install python3-pip.
  • Install the Telegram bot API for Python typing pip3 install pyTelegramBotAPI.
  • The GPIO Zero API should be installed by default on Raspbian. If not, follow these instructions.
  • Install the emoji library typing pip3 install emoji.
  • Make your script executable with chmod +x src.py.
  • Configure a cron to automatilcally start the Bot when the system boots up typing sudo crontab -e and adding @reboot python3 /path/to/mySrcFile.py.
    • If you're on a Wi-Fi network, the Raspberry may try to launch the script when the connection is not ready yet, terminating it with an exception. A workaround for this issue is to delay the script launch. Use this instead:
      @reboot sleep 30 && python3 /path/to/mySrcFile.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published