35
35

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

メモ:Raspberry PiからIFTTTのトリガを(簡単に)起こせるようになった

Last updated at Posted at 2015-06-25

IFTTTにMaker Channelができました | スイッチサイエンス マガジン

Introducing the Maker Channel | IFTTT Blog

なんと、マジっすか。

ifttt.sh
#!/bin/bash
CURL=/usr/bin/curl
IFTTT_EVENT="YOUR_EVENT_NAME"
IFTTT_KEY="YOUR_SECRET_KEY"
IFTTT_URL="https://maker.ifttt.com/trigger/${IFTTT_EVENT}/with/key/${IFTTT_KEY}"

${CURL} -X POST \
    ${IFTTT_URL} \
    --header "Content-Type: application/json" \
    --data-binary "{\"value1\": \"$1\"}"

ざっくりレシピ作って。

IFTTT.jpg

IFTTT3.jpg

実行して。

$ ifttt.sh ごはんですよは、桃屋ですよ!
Congratulations! You've fired the raspberrypi event

Notificationが来た。

IFTTT2.jpg

URLにシークレットキー文字列がそのまま埋まっているのはどうなの、って感じもするけれど。

35
35
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
35
35

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?