Skip to content

Instantly share code, notes, and snippets.

@glynnbird
Created September 29, 2016 13:36
Show Gist options
  • Save glynnbird/1c4e15e61dd6ecef8426398d0867390d to your computer and use it in GitHub Desktop.
Save glynnbird/1c4e15e61dd6ecef8426398d0867390d to your computer and use it in GitHub Desktop.
Amazon Dash intercept - creating IFTTT action
var dash_button = require('node-dash-button');
var dash = dash_button(MYMACADDRESS, null, null, 'all');
var request = require('request');
dash.on("detected", function () {
var r = {
method: 'post',
url: 'https://maker.ifttt.com/trigger/button_pressed/with/key/MYKEY'
};
request(r, function(e, req, b) {
console.log(b);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment