Language Switcher

M5StickCでドアベルを作る

Building a slack integrated doorbell with a M5StickC

Make things

Make a doorbell with a M5StickC.
When a visitor presses the doorbell, it pushes a notification to a Slack channel.

Materials

How to make

Hardware

Hardware you need to build a Slack doorbell is just a M5StickC.
It is ok as long as it is supplied with power.

Software

As for software, go to this page, and get the Webhook URL to send a message to a Slack. 

Select the channel where you want to receive a notification, and press “Add Incoming Webhooks Integration.”

Then, add your Webhook URL to the code below.

Use this URL for “WEBHOOK_URL_HERE,” and replace “CHANNEL_NAME_HERE” with your channel name.
Make sure to put “#” before the name.

var url = 'WEBHOOK_URL_HERE';
var data = {
  "channel": 'CHANNEL_NAME_HERE',
  "username": 'obniz-bot',
  "text": msg
};

Program