• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    Send Telegram bot message

    Scheduled Pinned Locked Moved Operations
    10 Posts 3 Posters 1.9k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jkandasaJ Offline
      jkandasa
      last edited by jkandasa

      Now it is possible to send telegram bot message from MyController.

      Add telegram bot token from your bot(BotFather) into MyController notifications settings.
      I followed this link to set up a bot in my telegram account.

      We can get chat_id in two different steps,

      Options #1: Thanks, @jl277013 for the information
      The solution was to go to Telegram and search for the bot called "userinfobot" with the questionmark as an avatar. Click start and it gives you your userid.

      0_1533615275298_2c55a353-e3d4-4f09-8692-6b32db998f5e-image.png

      Option #2:
      From the video

      • to join your bot to a group, from 04:20 to 05:52
      • to get channel username(chat id), from 09:20 to 13:20.

      image

      Valid token will be looking as follows after saved,
      image

      Create Operation to send telegram bot message, Here Channel username is important. The custom message can be empty.
      mc-telegram.jpg

      1 Reply Last reply Reply Quote 0
      • B Offline
        betows
        last edited by

        Which version of MyController is this feature available?

        jkandasaJ 1 Reply Last reply Reply Quote 0
        • jkandasaJ Offline
          jkandasa @betows
          last edited by

          @betows Currently it is available in SNAPSHOT version, soon(in couple of days) will be released along with 1.3.0 version

          B 1 Reply Last reply Reply Quote 0
          • B Offline
            betows @jkandasa
            last edited by

            @jkandasa Thank you!

            1 Reply Last reply Reply Quote 0
            • F Offline
              fsgrazzutti
              last edited by

              Hello @jkandasa ,

              I wanted to update Telegram configuration on my Mycontroller setup, version 1.6.0-SNAPSHOT,
              Git commit:branch
              263b61248fe66e251519c606ecd6f48a73d75b07:development
              Built on
              2021-05-08T18:35:53Z

              The Id I got is 537757xxxx, and I get an error message :
              Numeric value (537757xxxx) out of range of int.

              any chance to get it fixed ?

              jkandasaJ 1 Reply Last reply Reply Quote 0
              • jkandasaJ Offline
                jkandasa @fsgrazzutti
                last edited by jkandasa

                @fsgrazzutti It is possible we have to change the Integer to Long in https://github.com/mycontroller-org/mycontroller-rest-clients/blob/master/src/main/java/org/mycontroller/restclient/telegrambot/model/User.java#L38

                I worked while ago in 1.x version. I have to setup the development environment in my local laptop. might take sometime to get the fix.

                Have you tried MyController 2.x? I believe we have almost all the features from 1.x in MC 2.x

                F 1 Reply Last reply Reply Quote 0
                • F Offline
                  fsgrazzutti @jkandasa
                  last edited by

                  @jkandasa thanks,

                  no, I did not tried it yet, I am a bit scared about the installation. I recently migrated v1.6 to a windows 10 PC

                  jkandasaJ 2 Replies Last reply Reply Quote 0
                  • jkandasaJ Offline
                    jkandasa @fsgrazzutti
                    last edited by

                    @fsgrazzutti ok, I will update you, when I fix it in v1.x. thanks!

                    1 Reply Last reply Reply Quote 0
                    • jkandasaJ Offline
                      jkandasa @fsgrazzutti
                      last edited by

                      @fsgrazzutti with the help of GitHub action I built the bundle and pushed it in to SNAPSHOT location. Have not tested yet. Let me know if you face a difficulty.

                      F 1 Reply Last reply Reply Quote 0
                      • F Offline
                        fsgrazzutti @jkandasa
                        last edited by

                        @jkandasa I finally had the chance to test the SNAPSHOT and it works !

                        Now I have just to remember how to send the sensor states.

                        Thanks a lot !

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post

                        0

                        Online

                        586

                        Users

                        529

                        Topics

                        3.4k

                        Posts
                        Copyright © 2015-2025 MyController.org | Contributors | Localization