You could go down this path but Iβm not sure if this library will work on Windowsβ¦ it may need to be changed to use https://github.com/mscdex/cap. Give it a shot and let me know.
OK. So, do you mean to run the same command as your last post, but with the url changed?
Like this?..
npm install git+https://github.com/mscdex/cap
Sort of⦠either go down the python path (install python, etc with hopes that works), or change the plugin to use the mscdex/cap plugin instead of the other (at which point you would do an npm install for this library).
OKβ¦soβ¦if youβre willing to do any more βhand-holdingββ¦
How do I do this part?..
Is it possible to use with SmartThings/WebCore and have it blocked from going to Amazon? I tried to block it and it doesnβt trigger anything in SmartThings.
No - the issue is that the Dash Button will make a direct call to Amazon⦠the only way to block this effectively is at the router/gateway⦠has nothing to do with ST
Sureβ¦ howβs your JavaScript?? Send me a pm and we can work on itβ¦
I probably should have asked that better. I mean when blocking it from contacting Amazon, Iβm finding that it doesnβt trigger SmartThings either.
I created a rule on my router as mentioned previously and I noticed that it doesnβt trigger the switch that I have tied to it.
Is your router rule only blocking the Dash Button from getting to the internet, or from accessing the LAN altogether?
One way to knowβ¦
Assuming you already know the Dash Buttonβs IP address,
press the Dash Button, and ping it from another computer on the network while its white light is flashing.
If you get a response from the Dash Button, then itβs NOT being blocked altogether; at least this gives you some info to go on in troubleshooting.
Thanks for the suggestion. It was pinging but I just re-routed the buttons to my PiHole and blocked the Amazon dash address on it. Works like a champ now!
INSTALL OS
Download Raspberry JESSIE
Link: https://dl.dropbox.com/s/jl12v5peqvhorbt/2016-05-27-raspbian-jessie.img.zip
UNZIP AND PLACE 2016-05-27-raspbian-jessie.img ON YOUR DESKTOP
diskutil list
diskutil unmountDisk /dev/disk2
sudo newfs_msdos -F 16 /dev/disk2
sudo dd if=~/Desktop/2016-05-27-raspbian-jessie.img of=/dev/rdisk2 bs=5m
ββββββββββββββββββββββββββββββββββββββββββββ
Open Terminal
ssh pi@raspberrypi.local
Password : raspberry
Change password:
Type on terminal:
passwd
New password
ββββββββββββββββββββ
β’ ( ssh password: raspberry )
((((((((((((( On MacOsX Terminal ))))))))))))))
((((((((((((( Setting up Wifi with the Command Line ))))))))))))))
β’ CONNECT YOUR RASPBERRY PI TO YOUR ROUTER USING βINTERNET CABLEβ
β’ OPEN TERMINIAL ON YOUR MacOsX
ssh pi@raspberrypi.local
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
β’ copy and past at the end of file and edit with your information
network={
ssid="yourNetworkSSID"
psk=βyourNetworkPasswordβ
}
ββββββββββββββββββββββββββββββ
sudo reboot
βββββββββ
((((((((((((( iP-Static ))))))))))))))
https://www.modmypi.com/blog/how-to-give-your-raspberry-pi-a-static-ip-address-update
ββββββββββββ
ssh pi@raspberrypi.local
sudo nano /etc/dhcpcd.conf
Copy and past
A sample configuration for dhcpcd.
See dhcpcd.conf(5) for details.
Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
Inform the DHCP server of our hostname for DDNS.
hostname
Use the hardware address of the interface for the Client ID.
clientid
or
Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
#duid
Persist interface configuration when dhcpcd exits.
persistent
Rapid commit support.
Safe to enable by default because it requires the equivalent option set
on the server to actually work.
option rapid_commit
A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
Most distributions have NTP support.
option ntp_servers
Respect the network MTU.
Some interface drivers reset when changing the MTU so disabled by default.
#option interface_mtu
A ServerID is required by RFC2131.
require dhcp_server_identifier
Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
A hook script is provided to lookup the hostname if not set by the DHCP
server, but it should not be run by default.
nohook lookup-hostname
interface eth0
static ip_address=YOUR.PI.IP/24
static routers=YOU.ROUTER.IP
static domain_name_servers=ROUTER.DNS.1 ROUTER.DNS.2
interface wlan0
static ip_address=YOUR.PI.IP/24
static routers=YOU.ROUTER.IP
static domain_name_servers=ROUTER.DNS.1 ROUTER.DNS.2
βββββββββββββββββββββββββββββββββββ
sudo reboot
ssh pi@raspberrypi.local
wget --no-check-certificate -P /home/pi/Downloads https://github.com/redloro/smartthings/archive/master.zip
sudo apt-get remove nodered -y
sudo apt-get remove nodejs nodes-legacy -y
sudo apt-get remove npm -y
wget --no-check-certificate -P /home/pi/Downloads https://nodejs.org/dist/v9.3.0/node-v9.3.0-linux-armv6l.tar.xz
cd Downloads/
tar -xvf node-v9.3.0-linux-armv6l.tar.xz
cd node-v9.3.0-linux-armv6l
sudo cp -R * /usr/local/
sudo reboot
ββββββββββββββββββββ
ssh pi@raspberrypi.local
node -v
cd Downloads/
unzip master.zip
cd smartthings-master
sudo mv smartthings-nodeproxy /home/
cd /home
cd smartthings-nodeproxy
mkdir plugins
mv avail_plugins/dash.js plugins/
nano config.json
Copy and past
{
βportβ: 8080,
βauthCodeβ: βsecret-keyβ,
βdashβ: {
βbuttonsβ: [
β78:e1:03:67:13:92β,
βb4:7c:9c:88:4a:c1β,
β78:e1:03:d8:f9:acβ,
βb4:7c:9c:b1:a4:11β
]
},
βnotifyβ: {
βaddressβ: β10.0.0.130β,
βportβ: β39500β
}
}
βββββββββββββββββββββ
ssh pi@raspberrypi.local
cd /home
cd smartthings-nodeproxy
npm install
sudo apt-get install libpcap-dev
npm run install:dash
ββββββββββββββββββ
https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/
βββββββββββββββββ
sudo nano /home/pi/.bashrc
Go to the last line of the script and add:
echo Running at boot
cd /home
cd smartthings-nodeproxy
sudo node server.js
βββββββββββββ
Add buttons
cd /home
cd smartthings-nodeproxy
nano config.json
Note add X in front dash : dashX to enter in discovery mode after finish remove the X
ββββββββββββββ
cd /home
cd smartthings-nodeproxy
sudo pkill node
sudo node server.js
ββββββββββββββββββ
Iβve successfully setup a Dash button (with multiple complications getting all the dependencies installed for the node proxy), but it finally works!
Iβve run into an issue. I have this successfully turning on and off GE switches, but if I tell the SmartAppp - Dash Button to control my cabinet lights (Osram - Lightify), it only turns them on. Thoughts on how to modify this so that it will turn on and off the cabinet lights?
Thanks
If you can get it to turn βrealβ switches on AND off, then you couldβ¦
-
create virtual (simulated) switches to represent the Osram lights
-
create rules in webCoRE that monitor those virtual switches, and turn the Osram lights on and off when they get turned on and off
Any update on this? I am in the same boat.
**that boat being attempting to install the liabpcap-dev on windows.
I had to run this command prior to attempting to install liabpcap-dev but I was on a Pi.
sudo apt-get install build-essential
Iβm trying to run this on a Windows 10 x64 machine and canβt get past installing pcap. Iβve installed the windows equivalents but canβt figure out how to get your setup to look for/past anything except pcap. Is there hope for me? I am trying to avoid creating a Linux VM just for this little old task.
Did you get your Win10 issue resolved? Would you share?
Oh I have similar issue as I was investigating why my dash buttons no longer works after my Pi rebuild and found that seems the MQTT bridge seems intercepting the message by the STNP(I can see the STNP can get the MAC of dash(es) but the SmartApp seems has never been triggered), sounds like there is no way around it @redloro if I would like to run the STNP and MQTT on the same Pi
I ended up moving away from this type of implementation. I use Dasher and Homeassistant. Much cleaner.
I have homeassistant as well may be I should do the same, will take a look at dasher