Hello, I am having a slightly different issue. The node proxy seems to start up fine but I noticed it shows it’s listening on http:/0.0.0.0 instead of http://:::8080 like everyone else is showing. The discovery works fine and see’s the buttons and reports the MAC addresses. I confirmed they are all correct. However, when I press the buttons, nothing happens and I do not see anything reported on the console either. It only sees the buttons in discovery mode. Any ideas? I am using port 8181 on the node proxy and the smart app. Also verified the secret is correct as well as the MAC addresses in the config.json file. TIA.
I skimmed through this thread, and didn’t see this specific question anywhere. Sorry if it’s a repeat…
My question has to do with ‘Notifications’.
I did see this general issue addressed in this thread (i.e. turn off notifications results in them all being turned off; even for ‘real’ ordering buttons you may have).
However, what I’m wondering about is a little different…
Is it possible to configure a router (with DD-WRT) to ‘catch’ messages from a given Amazon Dash Button (via MAC address), and only allow it to interact on the LAN, and block it from getting out to the internet?
If so, then we could use these on our LAN (for SmartThings, etc) all we want without them ever connecting to Amazon at all (that is, if I’m properly understanding how they work).
That sounds like an iptables question. I think it’s possible, but unsure how it would integrate within this topic.
DD-WRT = Linux using iptables … So, first thing I would look at to do something like this would be to check out other people doing MAC based routing on DD-WRT/iptables. Good news is my first search did provide something similar to what you’re asking for:
That’s right… the Amazon Surprise Sweets button gets tied to the Surprise Sweets so if you ever press it, it places an order… lol… unless you implement one of the following work arounds listed in the first post under How to Block Orders. I’ve implemented the DNS block and it works great!
Don’t worry about the http://0.0.0.0 vs http://:::8080… once you identified the buttons in discovery mode, did you put the MAC address for those buttons in the config.json and restart the STNP service? If you don’t see a message that says…
…then the STNP service is not detecting the button press which could be one of the following:
MAC address not set in config.json
Dash Button not on same network as STNP
Button configuration not complete with the Amazon App… note that when it’s correctly configured it’ll blink a couple times in white and then blink fast in red
Thanks.
I just took a look in my DD-WRT router configs, and I found where I can create Access Policies. I created one that specifically denies internet access for all of my Dash Buttons. So, I think I should be good to go as far as that is concerned.
Now, I need to go back to the top, and read through everything carefully so I can try to actually do this thing…
So either I did something wrong with my firewall or this does not work by blocking the mac address. I push the button the switch t I have set up turns on however the white light On the dash continued to flash for a long time and then the switch turns back off.
Check and make sure that your access rules are not completely blocking access… ie. these MAC rules are usually used to prevent a device from connecting to your router, in which case the Dash button won’t even be able to connect to your LAN. You may also want to re-run the button setup to make sure that it’s got the right wifi settings, etc. When it works, it pulses white slowly and then flashes rapidly red.
Looks like that’s a no… you’d need to put a router in front of the Google Wifi that can set local DNS and then configure the Google Wifi to use the router for DNS resolution. If you’re looking for a good option… get a Ubiquiti EdgeRouter.
I’m trying this on a Windows 10 system, and (of course) having difficulty lol
When it came time to ‘install’ pcap, I got the Windows 10 version (Win10Pcap).
Now I’m getting this when I try to run node…
>node server.js
[2017-12-14T00:39:59.756Z] [stnp] SmartThings Node Proxy listening at http://:::8080
module.js:538
throw err;
^
Error: Cannot find module 'pcap'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (STNP\plugins\dash.js:22:12)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
I put the Win10Pcap install directory in my PATH.
ALSO,
sorry that I didn’t say this first…but when I ran ‘npm run install:dash’, I got this…
STNP>npm run install:dash
> smartthings-nodeproxy@1.0.0 install:dash STNP
> npm install && npm install git+https://github.com/mranney/node_pcap.git
up to date in 1.032s
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\CurrentUser\AppData\Roaming\npm-cache\_logs\2017-12-14T01_03_52_663Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! smartthings-nodeproxy@1.0.0 install:dash: `npm install && npm install git+https://github.com/mranney/node_pcap.git`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the smartthings-nodeproxy@1.0.0 install:dash script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\CurrentUser\AppData\Roaming\npm-cache\_logs\2017-12-14T01_03_52_709Z-debug.log
I then also installed git for Windows, and put it in my PATH, but it’s still giving the same messages, and I’m not sure what else may be needed on that either.
Any idea what to try next to troubleshoot (or fix) this?