Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A bash script for toggling on and off smart devices via IFTTT webhooks

License

NotificationsYou must be signed in to change notification settings

eathtespagheti/webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

It's a posix compliant shell script for toggling on and off smart devices via IFTTT webhooks, to use it you need to configure some webhooks in your IFTTTaccount using this scheme:

For every device create two Webhooks, one for turning on

IF:webhooks.receiveWebRequestEventName:turn_on_{{DEVICE}}THEN:yourSmartDeviceManagerTurnOn: {{DEVICE}}

and one for turning off

IF:webhooks.receiveWebRequestEventName:turn_off_{{DEVICE}}THEN:yourSmartDeviceManagerTurnOff: {{DEVICE}}

then launch the script with these args:

./webhook.sh [0/1] [DEVICE] optional[DELAY]

Configuration

Key

You need to configure a 'KEY' variable inside your webhook config file.This variable should contain your Webhook Authentication Key, in order to allow the script to make request the the IFTTT servers, eg:

KEY=a68f0060404741799713db2f95e5f3c554488d86fe0

Config file location

The name of the config file should beconfig and the default config folder it's~/.config/webhook.You can change the default folder setting the variableWEBHOOK_FOLDER to the path you want to use

bash-completion

You can also enable some bash completion for your devices sourcing thewebhook-completion.bash file in your.bashrc. Notice that you should source the completion file only AFTER setting theWEBHOOK_FOLDER if you don't use the default one.

Write your devices in aDEVICES variable as a shell array, eg:

DEVICES="smartDevice smartLamp smartPlug"

About

A bash script for toggling on and off smart devices via IFTTT webhooks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp