mynamebrody / pizzadash Goto Github PK
View Code? Open in Web Editor NEWThis is a node.js application that "hacks" your Amazon Dash Button to order you a Domino's pizza!
License: MIT License
This is a node.js application that "hacks" your Amazon Dash Button to order you a Domino's pizza!
License: MIT License
Can't seem to get my order to actually go through, order validates but doesn't actually submit.
Below is what gets returned when I submit my order.
sudo node app.js
single element detected
Dash Button Found
[ { AutoRemove: false,
Code: '9193',
Qty: 1,
ID: 1,
isNew: true,
Options: { C: { '1/1': '1' }, X: { '1/1': '1' } } },
{ AutoRemove: false,
Code: '12SCREEN',
Qty: 1,
ID: 1,
isNew: true,
Options: { C: { '1/1': '1' }, X: { '1/1': '1' } } },
{ AutoRemove: false,
Code: 'PINPASCA',
Qty: 1,
ID: 1,
isNew: true,
Options: { C: { '1/1': '1' }, X: { '1/1': '1' } } },
[length]: 3 ]
Order is Priced
[ { AutoRemove: false,
Code: '9193',
Qty: 1,
ID: 1,
isNew: true,
Options: { C: { '1/1': '1' }, X: { '1/1': '1' } } },
{ AutoRemove: false,
Code: '12SCREEN',
Qty: 1,
ID: 1,
isNew: true,
Options: { C: { '1/1': '1' }, X: { '1/1': '1' } } },
{ AutoRemove: false,
Code: 'PINPASCA',
Qty: 1,
ID: 1,
isNew: true,
Options: { C: { '1/1': '1' }, X: { '1/1': '1' } } },
[length]: 3 ]
Order is Validated
Price is undefined
Estimated Wait Time undefined minutes
and here's what my order looks like.
order.addItem(
new pizzapi.Item(
{
code: '9193',
options: {},
quantity: 1
}
)
);
order.addItem(
new pizzapi.Item(
{
code: '12SCREEN',
options: {S: [Object], P: [Object]},
quantity: 1
}
)
);
order.addItem(
new pizzapi.Item(
{
code: 'PINPASCA',
options: {},
quantity: 1
}
)
);
Am I missing something? I've tried to fiddle with this without the coupon, without topping options, and even with a single menu item and I keep getting the same results.
This is on an raspberry pi running debian if it matters at all.
Love your idea of hacking the button to make pizza. I tried to replicate it with a friend and we are having trouble repeating the code.
Was easy to install [email protected] and [email protected], but when the domino's api downloads I get an ENONET Error. I am trying to install it through powershell.
Any insight on this? As soon as it downloads I think I would be able to run the find store tool and then package code with my order and add to the button.
On a side note, can this be run without the find store and using the information the store posts on the website for their store id and such? Curious...
Thanks anyways!
Tyler
I've run the command sudo node node_modules/node-dash-button/bin/findbutton
on two different computers and gotten the same error response. I apologize if this is a user error.
Other ideas? Dockerize it and enable to install to a Raspberry Pi and configure it using a web interface!
That'd be a whole new level of lazyness to get a pizza forever.
Please tell me how can I help you with this. Please ๐
The link in your README to the Medium article that you wrote about your experience (https://github.com/bhberson/pizzadash/blob/master/medium.com/@brody_berson/hacking-amazon-s-5-dash-button-to-order-domino-s-pizza-9d19c9d04646) is broken.
13 errors generated.
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Volumes/Optical/Users/anthonyseo/Downloads/pizzadash-master/node_modules/socketwatcher
gyp ERR! node -v v5.6.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.6.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the socketwatcher package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs socketwatcher
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls socketwatcher
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Volumes/Optical/Users/anthonyseo/Downloads/pizzadash-master/npm-debug.log
I've set up your application as described, all dependencies are installed, and the app.js file has been modified with correct customer info. Yet it does not actually place the order when the button is pushed (although the console log says it does, and I don't receive any errors). If you have any idea why this might be, please help!
switch to dominos module
npm i --save dominos
this will go into your package.json
I suggest you do this for all of your modules then delete your node modules dir and push to git.
git add -A
git commit -m "cleaning up node modules"
git push
Then after pushing add node_modules to your .git ignore
The reason you want to do this is so the user can run npm install from the root of your dir and they will get the right packages for their system and arch.
This is also the start to making this a module ;)
The user shouldn't have to run multiple scripts to get stuff working. Should be seamless. Perhaps a web server could be integrated to spin up a little page for choosing store etc.
Or perhaps the app could just order from the closest open store which delivers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.