somakeit / smib

1 stars 0 forks source link

SMIB (So Make It Bot)

Introduction

SMIB is the So Make It Bot. The architecture is a set of docker containers configured to work together, that can run on a pi4 or similar and provide slack bot interactivity with a maker space (or any space).

Features

Docker deployment

Supported Python Version

Python 3.12.3

Installation

SMIB Slack/Webserver Configuration

Network Ports

The host ports mapped for the slack server and webserver should be configured in the docker compose file, however it is also possible to override the ports in the server configs directly if you are not using docker.

External Config Files

Current files:

This is mapped to /app/config in the container

[!IMPORTANT] If you map /app/config to a host directory, then you MUST add the 2 external files to this location.

You can make this location accessible by Mapping the internal directory to a volume or bind mount in the docker compose file.

Linux:

volumes:
  - /etc/smib/:/app/config/

Windows:

volumes:
  - C:/smib/config:/app/config/

Local Development:

Logging

Map the internal /app/logs directory to a volume or bind mount in the docker compose to store the logs outside the containers

Linux:

volumes:
  - /var/log/smib/slack/:/app/logs/

Windows:

volumes:
  - C:/smib/slack/logs:/app/logs/

Database and Database Web UI Configuration

To set environment varaibles for the smib-db and smib-db-ui containers, you must do one of the following:

SMIBHID

SMIBHID is the So Make It Bot Human Interface Device and definitely not a mispronunciation of any insults from a popular 90s documentary detailing the activites of the Jupiter Mining Core.

This device runs on a Raspberry Pi Pico W and provides physical input and output to humans for the SMIB project; Buttons, LEDs, that sort of thing.

Further documentation can be found in the smibhid folder.

Legacy SMIB Commands

Currently, the old SMIB Commands do not work with the new SMIB.

The old SMIB worked using the Slack RTM API. This API has been replaced with the Events API.

Previously, SMIB Commands were created as the only way to interact with SMIB.

I think some form of backwards compatibility or similar functionality would be good. Work on a ShellPluginLoader was started but parked as it was not the main focus of the new amped up SMIB MVP

An issue has been created to track the progress and gather ideas.

Version

When bumping the poetry version (in pyproject.toml), the HID class (part of SMIBHID) version attribute also needs manually updating.

[!IMPORTANT] This version needs to match the release when it goes into the master branch.