Last active
December 31, 2020 12:03
-
-
Save dnicolson/eb67b582a910821d6bdde41b47e82ffa to your computer and use it in GitHub Desktop.
IFTTT solution to control an iHaper device from a Google Home Mini without the (false error) verbal confirmations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const shell = require('shelljs') | |
const express = require('express') | |
const app = express() | |
const port = 8000 | |
app.get('/', (req, res) => { | |
shell.exec('bash /home/pi/ihaper.sh') | |
res.send('') | |
}) | |
app.listen(port) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
STATUS=`python3 -m homekit.get_characteristic -f ~/.homekit_python/pairing.json -a iHaper -c 1.13` | |
if [[ "$STATUS" =~ "true" ]]; then | |
python3 -m homekit.put_characteristic -f ~/.homekit_python/pairing.json -a iHaper -c 1.13 false | |
else | |
python3 -m homekit.put_characteristic -f ~/.homekit_python/pairing.json -a iHaper -c 1.13 true | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su pi -c 'node /home/pi/ihaper.js < /dev/null &' | |
sudo docker run --name whr-relayd --net host --restart always -d webhookrelay/webhookrelayd-arm:latest --bucket gactions -k <key> -s <secret> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Raspberry Pi | |
sudo pip3 install homekit | |
sudo pip3 install --force-reinstall zeroconf | |
# macOS | |
pip3 install homekit | |
brew install webhookrelay/tap/relay | |
relay login -k <key> -s <secret> | |
relay forward --bucket <bucket> http://localhost:8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment