eecue / klipper-slackbot

Slack bot for Klipper
BSD 2-Clause "Simplified" License
7 stars 0 forks source link

Installation instructions #1

Open moebis opened 3 years ago

moebis commented 3 years ago

It's not clear how to install this on the pi. How do you invite the bot to a slack workspace and channel? Do you install the app.py in the Moonraker components directory?

mrmccain9 commented 2 years ago

I don’t have much experience running python code on pi, so I’ve been limping through this. So far for me the following commands appear to have worked through SSH into the pi but I seem to be missing the key step of how to actually run the app.py correctly.

python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install slack_bolt
python3 -m pip install requests
pip install python-dotenv
git clone https://github.com/eecue/klipper-slackbot/
source .venv/bin/activate
cd klipper-slackbot
ls
python3 app.py

And I get the following output

Traceback (most recent call last):
  File "app.py", line 17, in <module>
    app = App(token=os.environ["SLACK_BOT_TOKEN"])
  File "/usr/lib/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None
KeyError: 'SLACK_BOT_TOKEN'

Which I need help deciphering.

Any help would be great, as I’m loving Fluidd but missing my octopod print status notifications.

eecue commented 2 years ago

You need to copy the .env.example file to .env and fill in the values with your secrets