This code is designed to create a control interface for DoorBot via Slack.
- TTS via
espeakhttps://packages.ubuntu.com/impish/espeak-ng-espeak - MP3 playback via
mpg123https://github.com/gypified/libmpg123
Windows lacks some basic command line tools used by the script. As the intended final device is a Raspberry Pi running Linux replacements have been provided in the repo.
- TTS via
wsay.exehttps://github.com/p-groarke/wsay - MP3 playback via
cmdmp3.exehttps://github.com/jimlawless/cmdmp3
Use config.json.template as a template.
SLACK_APP_TOKEN: App level token with at leastconnections:write. This is required to open sockets with the Slack event API. Generated on Basic InformationSLACK_BOT_TOKEN: Bot level token with at leastchat:write``groups:history. This is required to listen for and respond to messages in channels the bot has been added to.doorAccess:true|falseDoes the current script have access to the Arduino controlling the door? Required to make the unlock button work.arduino:{"pointer":"","baudrate":}How do we communicate with the Arduino? A likely config is{"pointer":"/dev/ttyACM0","baudrate":9600}channel: Channel ID of the channel that the bot should respond to. #security
./slackControl.py
There is no runtime configuration.
- Invite your bot to a channel. private is strongly recommended
- Type
control - Interact with the tools provided
The following sounds have been hardcoded.
| Dropdown option | Actual message | id | source |
|---|---|---|---|
| Your key has been disabled | Your key has been disabled. A Perth Artifactory volunteer will contact you soon. | key_disabled | Amazon Polly |
| A volunteer will contact you shortly | There is a technical issue. A Perth Artifactory volunteer will contact you shortly. | volunteer_contact | Amazon Polly |
| COVID shutdown notice | Access to the Perth Artifactory workshop has been restricted under the current WA Health COVID-19 guidelines. If you have any questions or need to retrieve an item please reach out on Slack. | covid | Amazon Polly |
| I know you're there | I know you're there, I can feel you here | notice_you | Portal |
More can be added by:
- Adding them to
sounds/ - Adding them as a response option within the
controlPanelfunction ofslackControl.py. This uses the Slack Block Kit - Adding an option:response mapping within the
sendMessagefunction of `slackControl.py
Feed a string to a platform specific TTS engine
Unlock the door for 30 seconds using the same code as https://github.com/Perth-Artifactory/doorBotCode/blob/main/unlock.py


