• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    Send Telegram bot message

    scheduled pinned locked moved Operations
    10 posts 3 posters 2.7k views 1 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • jkandasaJ offline
      jkandasa
      global: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

      one-reply-to-this-post last-reply-time reply quote 0
      • B offline
        betows
        global:last-edited-by,

        Which version of MyController is this feature available?

        jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
        • jkandasaJ offline
          jkandasa @betows
          global: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 one-reply-to-this-post last-reply-time reply quote 0
          • B offline
            betows @jkandasa
            global:last-edited-by,

            @jkandasa Thank you!

            one-reply-to-this-post last-reply-time reply quote 0
            • F offline
              fsgrazzutti
              global: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 one-reply-to-this-post last-reply-time reply quote 0
              • jkandasaJ offline
                jkandasa @fsgrazzutti
                global: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 one-reply-to-this-post last-reply-time reply quote 0
                • F offline
                  fsgrazzutti @jkandasa
                  global: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 topic:replies-to-this-post, 2 last-reply-time reply quote 0
                  • jkandasaJ offline
                    jkandasa @fsgrazzutti
                    global:last-edited-by,

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

                    one-reply-to-this-post last-reply-time reply quote 0
                    • jkandasaJ offline
                      jkandasa @fsgrazzutti
                      global: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 one-reply-to-this-post last-reply-time reply quote 0
                      • F offline
                        fsgrazzutti @jkandasa
                        global: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 !

                        one-reply-to-this-post last-reply-time reply quote 1
                        • first-post
                          last-post

                        0

                        online

                        644

                        users

                        532

                        topics

                        3.4k

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