Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Duet Telegram bot

    Scheduled Pinned Locked Moved
    General Discussion
    12
    14
    3.2k
    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.
    • UnderDoneSushiundefined
      UnderDoneSushi
      last edited by

      How easy was this to set up? I haven't dabbled with Raspberry Pis before. I am also looking into using my google home to send Gcode commands.

      Mikeundefined 1 Reply Last reply Reply Quote 0
      • Mikeundefined
        Mike @UnderDoneSushi
        last edited by

        @underdonesushi Pretty easy. Just had to follow the guide on the bot's page with an extra step for installing missing packets. Otherwise it mostly just... works. Not so sure about Google Home integration.

        1 Reply Last reply Reply Quote 0
        • IdefixRCundefined
          IdefixRC
          last edited by

          Hi guys,

          Resurrecting this as I found very little other info on this (coming from Octoprint, Telegram was super useful)

          I just tried to install and run the bot on a Pi Zero but it failed.
          Here is the process I used (might help others to spot my error or serve as instructions - once fixed):

          1. Install headless Rasbian image (2019-09-26-raspbian-buster-lite.img)
          2. Installed NodeJS as follows (the instructions did not work with the Pi Zero armv6 CPU)
            • sudo apt-get install curl
            • curl -o node-v9.7.1-linux-armv6l.tar.gz https://nodejs.org/dist/v9.7.1/node-v9.7.1-linux-armv6l.tar.gz
            • tar -xzf node-v9.7.1-linux-armv6l.tar.gz
            • sudo cp -r node-v9.7.1-linux-armv6l/* /usr/local/
            • checked if it works with:
              • node -v
              • npm -v
            • added git just in case:
              • sudo apt-get install git
          3. installed the 11 dependencies listed on the page with:
            • sudo npm i <dependency name>
          4. ran the bot by typing duetbot
          5. answered yes to create the default config
          6. used telegram to create the bot account:
            • Open a chat with @botfather in Telegram Messenger.
            • Send /newbot to @botfather and follow the instructions.
            • received a long token (example only) HTTP API: 432423:DSFDD_KeassESFD23221Hdksa213I
          7. edited the default config with:
            • sudo nano /home/pi/.duetbot.json
            • set the IP of the DuetBoard
            • set the token to the one received without HTTP API: (432423:DSFDD_KeassESFD23221Hdksa213I)
          8. ran the bot by typing duetbot

          Duetbot then started:

          Connecting to duet...
          Checking for upload dir...
          Uploads enabled
          Bot started...

          followed by this error:
          Failed to process updates. { Error: 401: Unauthorized
          at buildConfig.then.then.then.then (/usr/local/lib/node_modules/duet-telegram/node_modules/telegraf/core/network/client.js:281:17)
          at <anonymous>
          at process._tickCallback (internal/process/next_tick.js:118:7)
          code: 401,
          response: { ok: false, error_code: 401, description: 'Unauthorized' },
          description: 'Unauthorized',
          parameters: {},
          on:
          { method: 'getUpdates?offset=0&limit=100&timeout=30',
          payload: {} } }

          I further checked that the duetwifi has no password set as I see from the notes that this is not yet supported. Unfortunately still no luck. Any help is apprechiated.

          sbcrumbundefined 1 Reply Last reply Reply Quote 3
          • sbcrumbundefined
            sbcrumb @IdefixRC
            last edited by

            @IdefixRC
            Not sure if you every got this fixed, but I noticed I would only get this message when nothing was printing. IE Idle state has no status but printing messages came through.

            1 Reply Last reply Reply Quote 0
            • phcellaundefined
              phcella
              last edited by

              I installed and it worked but not all commands.
              /status - not working
              /macros - not working

              1 Reply Last reply Reply Quote 0
              • ErwinH78undefined
                ErwinH78
                last edited by

                its not working with my duet 3. are there updates available or something like that?

                1 Reply Last reply Reply Quote 0
                • A Former User?
                  A Former User
                  last edited by

                  Hi, I'm installing the whole....just a question: do the bot starts automatically with the Pi or should I do something to make it autosart?

                  Thanks

                  toufou54undefined 1 Reply Last reply Reply Quote 0
                  • toufou54undefined
                    toufou54
                    last edited by

                    Excellent job ! Thanks

                    1 Reply Last reply Reply Quote 0
                    • tristanryerparkeundefined
                      tristanryerparke
                      last edited by tristanryerparke

                      Duet 3 and sbc running duetbot on the sbc.
                      Getting error:

                      Connecting to duet...
                      Duet is offline!
                      Checking for upload dir...
                      Uploads disabled: Request to http://tristan-painting-machine.local/rr_filelist?dir=0%3A%2Fgcodes%2Ftelegram failed. code: 404
                      Bot started...
                      
                      

                      Also tried with the same numerical ip address that works to connect to dwc.
                      Any advice?

                      1 Reply Last reply Reply Quote 0
                      • toufou54undefined
                        toufou54 @A Former User
                        last edited by toufou54

                        @the_dragonlord I don't remember if I did the file or get on the web but you have to make duetbot as a service with a file "duetbot.service" or whatever into /etc/systemd/system as root

                        File content (edited):

                        [Unit]
                        Description=node js duetbot for telegram
                        #after network is up
                        After=network.target 
                        
                        [Service]
                        WorkingDirectory=/usr/bin
                        ExecStart=duetbot
                        Restart=on-failure
                        RestartSec=1500ms
                        Type=forking
                        #user pi or root, will determine where the script will search the configuration file **.duetbot.json** 
                        User=pi
                        # Note Debian/Ubuntu uses 'nogroup', RHEL/Fedora uses 'nobody'
                        Group=nogroup
                        Environment=PATH=/usr/bin:/usr/local/bin
                        Environment=NODE_ENV=production
                        # log send to syslog
                        StandardOutput=syslog
                        StandardError=syslog
                        
                        # syslog name id
                        SyslogIdentifier=duetbot
                        
                        [Install]
                        WantedBy=multi-user.target
                        

                        And don't forget to execute after that :

                        #to load the file for the systemctl manager
                        systemctl daemon-reload
                        
                        # to start and test
                        service duetbot start 
                        
                        # to check if loaded an active
                        service duetbot status 
                        
                        # if all is good you can tell the system to execute it as a service on boot :
                        systemctl enable duetbot
                        
                        #if it's ok the system will respond :
                        Created symlink /etc/systemd/system/multi-user.target.wants/duetbot.service → /etc/systemd/system/duetbot.service.
                        
                        1 Reply Last reply Reply Quote 0
                        • bothamichaelundefined
                          bothamichael
                          last edited by

                          e3f5f6cf-e37b-4672-a57c-89f27c2ec926-image.png

                          I am getting this error trying to install duet- telegram on my duet 3 with sbc (RPi 3b+).
                          Please can anyone assist

                          1 Reply Last reply Reply Quote 0
                          • Nicxorundefined
                            Nicxor
                            last edited by Nicxor

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • bastienundefined
                              bastien
                              last edited by

                              the last update of the bot on github is more than 3 years old,
                              the project was abandoned

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Unless otherwise noted, all forum content is licensed under CC-BY-SA