I’ve ordered one, will arrive on in two days . Hope to start on a new plugin, soon.
-
Amazon Dash Button as a wireless trigger
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
The good thing is if you order it for a product that costs at least 5€ and you order it at least once, the dash button is basically for free - the 5€ are deducted from your first order. So that’s what I call a no brainer… can’t wait for the smart guys here to develop a nice plugin! Pretty sure there will be a way to flash the firmware to avoid letting the device placing orders.
-
@LinuxDoc I’ll probably go with https://www.npmjs.com/package/node-dash-button. Now relax and wait for the things to come .
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
I have received mine today. I have done a quick setup with PingPresence (pimatic-ping). With some tweaks of the defaults configuration properties it is working finr now. I’ll post more details (including my setup details and findings) later today.
Btw. Changing the Ping settings with Device Editor ocassionally resulted in a server crash for me. So, I guess there is a bug in the Ping Device implementation itself.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
So quick and dirty implementation is done. I did the following steps:
(1) Register via the Amazon App as new device (follow the box included manual).
(2) DO NOT CHOOSE ANY PRODUCT IN THE AMAZON APP to be delivered. Only do the register to your home WiFi network and nothing else!
(3) Identify the IP address of the Dash Button in the router (FritzBox). Configure the DHCP that allways the same IP address is given to the DashButton MAC address.
(4) I selected the FritzBox Internet Filter that the button is not allowed to communicate with the Internet as an additional blocker to prevent any orders.
(5) You can in the FritzBox event log (WLAN) when the button is registered & checked out in the network. You have to enable the additional FritzBox option that such events should be logged in the FritzBox event log.
(6) You can see that the DashButton is registered in the WiFi for at least 1 second. This is very short and you have to consider this in the PIMATIC ping probe.
(7) On pimatic you need the PING PlugIn. Then you can register the PingPresence class device to your config (adapt this with your IP Dash Button address, interval is in msec: 1000 => 1 sec ping intervall).
{
“id”: “AmazonDash01”,
“name”: “AmazonDash01”,
“class”: “PingPresence”,
“host”: “192.168.178.50”,
“interval”: 1000
},
(8) Add a rule to do an action if the Dash Button is pressed (I get a telegram message to my mobile).
{
“id”: “amazondash01-press”,
“name”: “AmazonDash01_press”,
“rule”: "if AmazonDash01 is present then execute "/home/pi/tg/bin/telegram-cli -k tg-server.pub -W -e \“msg @XYZ AmazonDash01 pressed.\” “”,
“active”: true,
“logging”: true
}So that’s it for further testing. I am looking forward to find any additional idea to integrate the button more professional. There are also some multi-light (red/blue/white/green) LEDs on the Dash Button which might open additional options for status information back to the button.
Nice weekend
-emeins- -
I have done a similar setup, but I have found the PingPresence Sensor to work more reliable if timeout and retry settings are changed as follows:
{ "host": "192.168.178.148", "interval": 1000, "id": "dash-1", "name": "dash-1", "class": "PingPresence", "timeout": 100, "retries": 9 }
I am using a simple rule to toggle a switch - a Milight switch in my case, but this can be easily replaced by ShellSwitch or DummySwitch.
{ "id": "dash-toggle", "name": "dash-toggle", "rule": "when dash-1 is present then toggle Milight WWCW Zone@192-168-178-68", "active": true, "logging": true }
As an extra line of defense I setup filtering on my Fritzbox Router to deny the dsash contacting the internet.
My Findings
- Presence sensor works most of the time, but there are glitches. In about 1 of 10 button presses the dash is not detected by the PingPresence sensor
- System CPU usage has not significantly grown
Next steps
I am going to experiment with node-dash-button and win-node-dash-button which are basically ARP sniffers using the PCAP library. This should work reliably, but I am concerned about performance penalties this may have. Let’s see.
If you want to checkout similar things, have look at http://www.danielgallo.co.uk/post/hack-an-amazon-dash-button-to-control-philips-hue-lights/ which is an easy to digest tutorial
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Regarding dash status LED codes see https://www.amazon.com/gp/help/customer/display.html?nodeId=201746360
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
I’m almost finished with my implementation of https://github.com/michbeck100/pimatic-dash-button
Just wait for the first commit. I’ll test it tonight and hopefully release the first version.
It uses a customized version of node-dash-button to support device discovery 😎pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
@michbeck100 said in Amazon Dash Button as a wireless trigger:
Just wait for the first commit.
That’s nice. What are you experiences so far regarding memory consumption and CPU usage? Btw, I am working on alternative implementation directly basing on “cap” which will also work on Windows (which is a edge case, but some users run Pimatic on Windows). However, I do not have much time to work on this at the moment, so it may some weeks before I’ll release it.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@mwittig said in Amazon Dash Button as a wireless trigger:
What are you experiences so far regarding memory consumption and CPU usage?
I have none yet. I couldn’t test my buttons yet, but i will have a look on these parameters. I do hope that its not too bad, though. And i think that node-dash-button also works on windows, but i might be wrong.
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
Most of the work in the plugin is done. I changed my mind and also used pcap directly without node-dash-button, because it’s api isn’t really sufficient for a pimatic plugin.
So far i’ve implemented- auto discovery of dash buttons
- predicate handler to enable rules like “if dash button is pressed then do something”
Have a look at https://github.com/michbeck100/pimatic-dash-button and try for yourself. I’m not sure if the auto discovery works yet, because i’m filtering for mac addresses that are registered for Amazon. If it doesn’t work for you just add the dash button manually to the config.
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
Great job @michbeck100! Installing the plugin worked like a breeze, but since I’m still using Pimatic 0.8, I wasn’t able to use auto-discovery. I used Fing on my iPhone to find the MAC address of my Dash Button and added it manually. Unfortunately, when trying to create a rule, I always receive this error message (already appearing when I enter “dash_button1 is pressed” in the if field:
Object #<DashButtonPredicateHandler> has no method ‘dependOnDevice’Any advice?
-
@sebster6 my advice would be to update to pimatic 0.9, sorry. The missing function exists only on 0.9.
What reasons do you do have to still use 0.8?pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
None really. Just a little hesitant due to my rather complex setup (“never touch a running system”). Well now here’s the reason to finally make the switch.
-
@sebster6 just try before you buy 😜.
If you just copy your config to a second directory with pimatic 0.9 and stop the 0.8 instance you can try if it still works.pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
@mwittig I couldn’t find any issues with performance or memory consumption. Has anyone other experiences?
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
received mine today but haven’t tried your plugin yet.
but already did some redesignneed some spare time, maybe i can create a sticker layout for the button
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
Ordered two today, should arrive tomorrow!
I’m really eager to test this stuff out! -
@mwittig said in Amazon Dash Button as a wireless trigger:
Btw, I am working on alternative implementation directly basing on “cap” which will also work on Windows (which is a edge case, but some users run Pimatic on Windows).
I have also published my work available at https://github.com/mwittig/pimatic-amazing-dash-button. Installation via frontend should be available in a few hours.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law