This simple web application serves as a webhook and flashes an IKEA Smart bulb. Use the webhook for any alert. This application is mainly designed for Raspberry Pi Zero W.
The blog post:
- IKEA Smart Bulb, remote and a gateway
- Raspberry Pi (or a computer)
- Installed libcoap
- ngrok
- python3
cp tradfri-sample.cfg tradfri.cfg
Update the values in the tradfri.cfg
for your home environment.
Configure ngrok web interface to be accessible from other computers in your network:
echo "web_addr: 192.168.0.193:4040" >> ~/.ngrok2/ngrok.yml
Run the server and ngrok
nohup python3 server.py &
~/ngrok http 192.168.0.193:8000 -region eu > /dev/null &
On your computer navigate to ngrok web interface (192.168.0.193:4040
in my case), copy the public https address, try it with curl:
curl -d '' https://0ec6f40b50a6.eu.ngrok.io/
When done, register that webhook url in your alert setup.