GithubHelp home page GithubHelp logo

jonixis / mmm-telegrambot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slametps/mmm-telegrambot

0.0 1.0 0.0 52 KB

TelegramBot module for remote-controlling MagicMirror

JavaScript 100.00%

mmm-telegrambot's Introduction

MMM-TelegramBot

TelegramBot module for MagicMirror

Feature

  • You can remote-control your MagicMirror and modules within Telegram.
  • The Bot is implemented in this module thus you don't need to manage antoher daemon.
  • Other module developers can add their commands easily. (See the Wiki : https://github.com/eouia/MMM-TelegramBot/wiki )

Update History

[1.0.1] : 2019-09-10

  • Added: useWelcomeMessage and verbose

Installation

1) Create Telegram Bot

Ref : https://core.telegram.org/bots#6-botfather

  1. Open your browser in Desktop PC(or your mirror or your phone, anywhere) and Navigate to https://telegram.me/botfather
  2. Click Send Message button, then your telegram will be opened in your phone or your PC which Telegram is already installed on. Meet BotFather.
  3. Command /newbot, give a name to the bot created, give an username. username should end with bot. (e.g. MyMagicMirrorBot or mystupidslave-bot... )
  4. After created, you can get API Token. It looks like 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw. Remember that.
  5. Read messages from BotFather. You can find your bot and change chat room of your Bot. Type anything, but your bot will not react yet.

2) Install Module

  1. In your mirror, open terminal and execute below;
cd ~/MagicMirror/modules
git clone https://github.com/eouia/MMM-TelegramBot.git
cd MMM-TelegramBot
npm install

3) Configuration (Pre-use)

  1. Open config.js of MagicMirror, add these;
{
  module: 'MMM-TelegramBot',
  config: {
    telegramAPIKey : '<your Telegram API Token>',
    allowedUser : ['<your Telegram username without @>'], // This is NOT the username of bot.
  }
},
  1. restart your MagicMirror.

4) Back to your Bot and test

  1. Back to the chat room with your Bot in Telegram, try /help or /commands. Your bot will react!
  2. Now,try /mychatid. This command will show the id of this chat room. The chat id looks like 12345678. Remember that. We will use this id for admin.

5) Register admin Chat id

  1. Open config.js again.
{
  module: 'MMM-TelegramBot',
  config: {
    telegramAPIKey : '<your Telegram API Token>',
    allowedUser : ['<your Telegram username without @>'],
    adminChatId : <your admin chat id>,
  }
},
  1. Restart your MagicMirror.
  2. You can get welcome message in your admin chat room. Now you can use Bot!

Other configuration option

{
  module: 'MMM-TelegramBot',
  config: {
    telegramAPIKey : '<your Telegram API Token>',
    allowedUser : ['<your Telegram username without @>'],
    adminChatId : <your admin chat id>,

    useWelcomeMessage: false,
    verbose: false,
  }
},
  • useWelcomeMessage : if set as false, Wake-up message will not happen.
  • verbose : if set as false, log will not be logged.

More Information

See the Wiki

mmm-telegrambot's People

Contributors

3djupp avatar bugsounet avatar eouia avatar jonixis avatar slametps avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.