Yesterday, I built an integration between IFTTT and my Philips Hue lights in my office. I wanted the Philips Hue lights to change to the latest CheerLights color. IFTTT offers a webhook as a trigger, so I decided to use MATLAB to trigger the webhook. MATLAB will get the latest CheerLights color, then send it to IFTTT and IFTTT sends the color to Philips Hue.
When I created the IFTTT webhook, IFTTT presented a CURL example:
curl -X POST -H "Content-Type: application/json" -d '{"value1":"green"}' https://maker.ifttt.com/trigger/mwOffice/with/key/xxxyyyzzz
Here’s how to turn the CURL request into a MATLAB command:
webwrite('https://maker.ifttt.com/trigger/mwOffice/with/key/xxxyyyzzz','value1','green');
Check out the IFTTT documentation for more information.