A python-based Slack bot which allows you to chat to your openHAB server.
Requires an old-style Real-Time Messaging bot which permits use of the Slack RTM API. New Slack apps don't support the RTM API.
Create a new Slack RTM bot integration
SLACKHAB_SLACK_TOKEN belowYou need to find the user id of your new bot. The easiest way to is run slackhab with SLACKHAB_LOG_LEVEL=DEBUG. When slackhab starts it will connect to Slack using your token and log some details about your bot, including the user id. Copy this into SLACKHAB_SLACK_USER_UD and restart.
Run via docker;
docker run
-e "SLACKHAB_SLACK_TOKEN=xoxb-1234567890-12345678901234567890"
-e "SLACKHAB_SLACK_USER_UD=UXXXXXXX"
-e "SLACKHAB_OPENHAB_URL=http://openhab_ip:8080"
-e "SLACKHAB_LOG_LEVEL=DEBUG"
sumberboy12/slackhab
Once connected you can issue commands directly to slackhab via the Apps section in your Slack client (usually down the bottom under your direct messages).
| Command | Description | Example |
|---|---|---|
items <filter> | Query the state of one or more items (filter optional) | items gf_living |
update <item> | Update the state of a single item | update gf_living_temp 12.34 |
send <item> | Send command to a single item | send GF_Living_Heater ON |
NOTE: all commands, filters and values are case insensitive. Partial item names can be used for update and send commands, as long as there is only a single match.
Content type
Image
Digest
Size
47.8 MB
Last updated
about 6 years ago
docker pull sumnerboy12/slackhab