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):
- Install headless Rasbian image (2019-09-26-raspbian-buster-lite.img)
- 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
- installed the 11 dependencies listed on the page with:
- sudo npm i <dependency name>
- ran the bot by typing duetbot
- answered yes to create the default config
- 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
- 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)
- 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.