Capture Amazon Dash button press

Hi!
Just in case you are interested: I have recently created a repository with a Hass.io addon to detect Amazon Dash buttons via ARP in python3, it is called Dasshio.

It is just a python script with all de add-on config, but it integrates well with hass.io making its use very straightforward.

I am currently testing it though, so any contribution or help is highly apreciated. :smile:

2 Likes

Just wondering, does this still have that delay when pressing the button?
Like what BRUH demo’d in his video from last year?

The delay is the Achilles heel of the Dash buttons

2 Likes

I see, bought a few anyway since it was on sale for 99 cents

1 Like

Yes, delay is from 2 to 5 or 6 seconds. It depends on the number of devices connected to your router.
I will use dash buttons only to setup scenes, arm alarms, change status… But not for tasks requiring an immediate response.

Here you can see the first test using Dasshio with Home Assistant: https://www.youtube.com/watch?v=FehZQiWFkHk

I’ll try to make a setup video soon and open a new Topic in the forum :smiley:

3 Likes

Delay in your vid looked perfectly acceptable for most things.

Would like to try this but need to get my head around Hass.io first, might need to wait for an idiot’s guide.

This is very cool. When I tried to replicate - I am seeing the the dash continuously toggle between home and away:

11:33 PM    Doorbell turned on
11:33 PM    Amazon Dash 1 is at home
11:33 PM    Doorbell turned off
11:33 PM    Amazon Dash 1 is away
11:33 PM    Doorbell turned on
11:33 PM    Amazon Dash 1 is at home
11:33 PM    Doorbell turned off
11:33 PM    Amazon Dash 1 is away
11:32 PM    Doorbell turned on
11:32 PM    Amazon Dash 1 is at home
11:32 PM    Doorbell turned off
11:32 PM    Amazon Dash 1 is away
11:32 PM    Doorbell turned on
11:32 PM    Amazon Dash 1 is at home
11:32 PM    Doorbell turned off
11:32 PM    Amazon Dash 1 is away
11:32 PM    Doorbell turned on
11:32 PM    Amazon Dash 1 is at home
11:32 PM    Doorbell turned off
11:32 PM    Amazon Dash 1 is away
11:31 PM    Doorbell turned on
11:31 PM    Amazon Dash 1 is at home
11:31 PM    Doorbell turned off

My device_tracker setup:

- platform: nmap_tracker
  interval_seconds: 8
  hosts: 192.168.1.1/24

My dash in known_devices:

amazon_dash_1:
  mac: 88:71:E5:87:C1:CE
  name: "Amazon Dash 1"
  track: true
  vendor: Amazon Technologies Inc.
  consider_home: 00:00:10

Thanks for sharing this!

Tom

They’re effectively free as you get a discount equivalent to what you paid, on Prime days you’re actually in profit!

That is how it will work with DHCP given that HA considers it home only for 10 seconds, but your router typically has a longer lease. So, the router considers it home for much longer.

Hi @danimtb, now got hass.io working so trying Dashio. It installed fine but I’m a bit lost with the options. My best guess which doesn’t work is this…

{
  "buttons": [
    {
      "name": "Butty",
      "address": "XX:XX:XX:XX:XX:XX",
      "url": "http://XXX:XXX:X:XXX:8123/api/services/script/turn_on?api_password=XXXXXXXXXX“,
      "headers": "{'method': 'POST'}",
      "body": "{'entity_id': 'script.all_off'}"
    }
  ]
}

Can you point me in the right direction please?

Hi @Bobby_Nobble,

I’m sorry I didn’t add much information to readme.

I’ve just added an example: https://github.com/danimtb/dasshio/blob/master/README.md

btw, method used is always POST at the moment

Hope it helps

1 Like

That’s exactly what I needed, thank you.

Thanks for this. I struggled getting dasher to work. This is a super simple way to do this and works great for me.

1 Like

Hmm…still doesn’t work :frowning:

The button is definitely connecting to the router because I left the Amazon notifications on to be sure, nothing appears in the Dasshio or HA logs?

Only difference to your example is I’m using switch/turn_on instead of light/toggle.

Just realised what the problem is, i read somewhere that you need to detect udp with the current buttons, ARP only works with the original ones.

I think that’s not the problem cause the dasshio.py script works fine outside the add-on.

I think it is networking inside docker containers.

I have fixed the logs and tweaked some of the add-on config parameters (host_network) so it should hopefully work now.

I will try it ASAP, cause I’m away of rpi right now.

This is from the Dasher config options…

protocol - Optionally set the protocol for your Dash button. Options are udp, arp, and all. Default listens to arp. The “newer” JK29LP button from ~Q2 2016+ tends to use udp.

Mine are all the “newer” version.

Dasshio is working fine now thanks to contribution of the community. Please, give it a try!

It works even with dash V2 devices.

3 Likes

@danimtb Perfect!!! Thanks for this, response is really quick too.

Hass.io, and the efforts of people like you, makes things like this so simple to set up.

1 Like

Where do you get 12 of these for $20??