Skip to content

Use a Raspberry Pi to post the status of a door to a Slack channel

Notifications You must be signed in to change notification settings

jpdenford/DoorSlackBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Post the status of a door to slack using Raspberry Pi

A simple bot using node js to poll a door sensor (gpio pin) and post the result to a Slack Channel

Requirements

  • Node 7 or later
  • Raspberry PI

Installation

  1. Clone repo and install dependencies
    git clone https://github.com/jpdenford/DoorSlackBot.git  
    cd DoorSlackBot  
    npm install  
  2. Create a Slack Bot
    https://api.slack.com/bot-users
  3. Find the channelID where you want the message to be posted
    https://api.slack.com/methods/channels.list/test
  4. Put the channelID and slackbot TOKEN in the config.json file

Running

Run command sudo node index.js
If you want to leave the process running, run sudo nohup sudo node index.js &

About

Use a Raspberry Pi to post the status of a door to a Slack channel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published