stephenkeep / node-red-contrib-amazondash Goto Github PK
View Code? Open in Web Editor NEWNode-RED node that listens for an Amazon dash button press
Node-RED node that listens for an Amazon dash button press
Hello!
I've just installed the lib because I want to see if this might do for some fun buttons around the house and I noticed something:
after reboot, the message is sent once into the debug window BUT with every deploy, the messages increase by the number of deploys. So after 5 times hitting the deploy button, the message is sent 5 times
after I reboot the raspi it starts again from 1
maybe thats fixable???
Thanks!!!!
I got this error while starting Node-RED. pcap-dev installed. What could be the problem ?
Hi,
I installed this a while ago on my Pi3 and it worked well but I've been trying to load it on my Pi Zero W for a few days now and the install fails every time with an error saying it cannot access GITHUB
Debug log attached as well as the terminal output.
9 Mar 19:20:23 - [warn] Error: Command failed: npm install --production node-red-contrib-amazondash
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit at F (/usr/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit at E (/usr/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN addRemoteGit git+https://github.com/mranney/node_pcap.git resetting remote /home/pi/.npm/_git-remotes/git-https-github-com-mranney-node-pcap-git-53ba2616 because of error: { Error: not found: git
npm WARN addRemoteGit at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit at F (/usr/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit at E (/usr/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOGIT' }
npm ERR! git clone --template=/home/pi/.npm/_git-remotes/_templates --mirror https://github.com/mranney/node_pcap.git /home/pi/.npm/_git-remotes/git-https-github-com-mranney-node-pcap-git-53ba2616: undefined
npm ERR! git clone --template=/home/pi/.npm/_git-remotes/_templates --mirror https://github.com/mranney/node_pcap.git /home/pi/.npm/_git-remotes/git-https-github-com-mranney-node-pcap-git-53ba2616: undefined
npm ERR! Linux 4.4.48+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--production" "node-red-contrib-amazondash"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ENOGIT
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/.node-red/npm-debug.log
Is there a way to install this into hass.io I keep getting libpcab error socketware 3.0 issue
Would be useful as currently passes "undefined"
Both generation buttons are no longer working - I can see buttons registering on the network, but node red is not picking it up, also nodes give a deployment error:
Error: Error: No devices to listen
Hi, i can not Install it.
I got this error
: not foundram Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm:
: not foundram Files/nodejs/npm: 5: /mnt/c/Program Files/nodejs/npm:
/mnt/c/Program Files/nodejs/npm: 6: /mnt/c/Program Files/nodejs/npm: Syntax error: word unexpected (expecting "in")
My nodejs Version ist 8.12.
Is that the Problem or what did it mean?
Hello,
I just tried downloading the node for the first time...
I am installing it globally (with -g argument) and upon starting, I get the error:
[ButtonPressed] Error: Cannot find module './build/Release/pcap_binding'
As a result, the node is also not displayed in the Node-Red nodes...
Though, when I go to the node-red manage-palette section, I can see, that node-red-contrib-amazondash is installed and has one node.
My configuration:
Raspberry Pi Zero W running DietPi
Node.js v6.10.0
Node-Red v0.17.5
npm v5.5.1
Does anyone have a solution?
Thanks in advance!
I receive the error below from node red:
Error: socket: Operation not permitted
at new PcapSession (/home/pi/.node-red/node_modules/pcap/pcap.js:49:39)
at Object.exports.createSession (/home/pi/.node-red/node_modules/pcap/pcap.js:123:12)
at create_session (/home/pi/.node-red/node_modules/node-red-contrib-amazondash/node_modules/node-dash-button/index. js:12:28)
at register (/home/pi/.node-red/node_modules/node-red-contrib-amazondash/node_modules/node-dash-button/index.js:29: 24)
at new node (/home/pi/.node-red/node_modules/node-red-contrib-amazondash/button-pressed.js:14:20)
at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:302:18)
at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:87:35)
at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:277:29)
at tryCatchReject (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:845:30)
at runContinuation1 (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:804:4)
at Fulfilled.when (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:592:4)
at Pending.run (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:483:13)
at Scheduler._drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:62:19)
at Scheduler.drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:27:9)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Failed to create pcap session: couldn't find devices to listen on.
Try running with elevated privileges via 'sudo'
6 Jan 23:03:35 - [error] [ButtonPressed:79260a05.2b2d34] Error: Error: No devices to listen
I understand I need to run Pcap with higher privileges. Do you have any ideas?
Hello,
i finally got the node to install. Nonetheless, I now get an error when having the node in a flow and deploying. Once deployed, the node immediately sends the error:
Error: Error: No devices to listen
even though I did add the right MAC Adress (copied out of the findbutton-skript and double checked with my router settings-page).
What I noticed is, that I do get four
node_pcap: EthernetFrame() - Don't know how to decode ethertype 34958
messages in the bin/findbutton skript every time i press the button before the actual mac-address is displayed (It does find the right mac address without problems though!).
My configuration:
Raspberry Pi Zero W running DietPi
Node.js v6.10.0
Node-Red v0.17.5
npm v5.5.1
Thanks in advance!
Can this be installed on the windows version of node-red? I get errors when it trys to install libpcap-dev
Hello,
after I finally got the node working a few weeks back, I just encountered the next problem a few days back :(
Node-Red does not detect any button presses anymore (weirdly enough, I did not change anything much, which could cause this problem).
The terminal output for node-red upon a button press ist:
node_pcap: EthernetFrame() - Don't know how to decode ethertype 34958
node_pcap: EthernetFrame() - Don't know how to decode ethertype 34958
node_pcap: EthernetFrame() - Don't know how to decode ethertype 34958
node_pcap: EthernetFrame() - Don't know how to decode ethertype 34958
This output is generated each time I press the button. The node-red-contrib-amazondash/node_modules/node-dash-button/bin/findbutton
script shows similar symptoms. Each time the button is pressed, the four lines appear, but no button/mac-address is detected.
For comparison, I installed the npm node-dash-button module seperately and ran the findbutton script. here, the output was correct and as shown on the README.md file:
Possible dash hardware address detected: ab:cd:ef:gh:ij:kl Manufacturer: unknown Protocol: udp
Although the manufacturer (Amazon) was not detected (see node-dash-button issue #59), the IP-adress matched.
Therefore, I am now wondering if this node-red-node uses an older version of node-dash-button or how come the standalone installation works, but the node doesn't?
Since the node does not work for me and I am not very experienced in javascript, could anyone help me implement the new version of node-dash-button? Suggestions to solve the problem in another way would be helpful too! I have so far tried googling, reinstalling, and replacing the node-red-contrib-amazondash/node_modules/node-dash-button/
folder, none of which solved the problem or worked.
Thank a lot in advance!
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.