Dasshio - Amazon Dash Buttons Hass.io add-on

If you’re rubbish at setting it up I would suggest hassio is perfect for you. What did you find restrictive, very little isn’t catered for nowadays and much that isn’t is handled better by other means?

Vanilla docker is what most turn to who genuinely need to do more.

I needed to set up Apple TV 4 integration. It required command line installation of some stuff. Same for Virgin Tivo - I had to install some stuff via Command line that Hass.io wouldn’t allow for.

You can also try this solution that has Home Assistant integration. It worked for me.

Error when I get to the second line of that tutorial too.

pi@hassbian:~ $ sudo python -m amazon_dash.install
/usr/bin/python: No module named amazon_dash

Try
sudo python3 -m amazon_dash.install
instead.

Hi,

Is anyone having issues since updating to 0.79? I am running 79.3 and my button that was working okay is not giving the following errors. Can anyone point me in the right direction to investigate this, please?

2018-10-05 18:38:06,168 | INFO | Starting sniffing…
2018-10-05 18:51:19,488 | INFO | Music button pressed!
2018-10-05 18:51:19,489 | INFO | Request: http://hassio/homeassistant/api/services/switch/toggle
2018-10-05 18:51:19,503 | INFO | Status Code: 401
2018-10-05 18:51:19,503 | ERROR | Bad request
2018-10-05 18:51:19,529 | INFO | Packet captured, waiting 20s …
2018-10-05 18:51:39,530 | INFO | Starting sniffing…

Any idea how I could make this work as a Doorbell? Push notification scenario on my phone, etc?

I think the use case of the doorbell is a bit risky, as anyone pressing and holding the dash button will make it enter the configuration mode and the setup will stop working.

However, if that is fine with you, it would be as simple as configuring Dasshio to trigger an automation or a script that fires whatever you want: sends a notification, blink lights, turn on a real doorbell…

Check the readme and you will find an example of how to trigger a script.
Hope it helps! Thanks

Agree with @danimtb, buttons are great for a lot of purposes where a single quick press is used but would be hopeless for a doorbell. Just watch how the idiots that come to your door use the bell over a few days. I have some daily use ones but also find them really useful for trying out functions before creating a more permanent solution.

If you’re determined to give a Dash button a go though there are guides on youtube as well as ones you need to read.

The solutions using ESP8266s and MQTT are far better, I’m going to do mine with a spare Sonoff when I get around to it, again guides are just a Google away and on here too.

*DISREGARD ALL OF THIS, I’M AN IDIOT OF THE HIGHEST ORDER AND HAVE BEEN WORKING WITH MY PC MAC ADDRESS AND NOT THAT OF THE DASH. I’M ONLY LEAVING THIS HERE AS INFORMATION OF HOW SIMPLE IT IS TO LOOSE 2 HOURS ON THE MOST BASIC OF MISTAKES

Morning all,

I have done two things at the same time so am slightly lost which might be causing a problem based on the rest of you having a happy experience.

I updated HassIO to .83.1 and I added a brand new, and my first, dash button to my set-up. Dashio is 0.3.1
Supervisor v140

According to my log files, presses are being detected regularly. This matches with my house going dark as the config is mapped to a test scene that turns everything off.

Has anyone else seen this behaviour please? The thing that really jumps out from the HASSIO log is it exactly every 2 mins, although I don’t know if this is an Amazon thing or something at our end?

{
  "timeout": 15,
  "buttons": [
    {
      "name": "Lights Dash Button",
      "address": "7C:5C:F8:2F:3D:2F",
      "domain": "scene",
      "service": "turn_on",
      "service_data": "{\"entity_id\": \"scene.test\"}"
    }
  ]
}

ADD-ON LOG:
2018-11-30 10:14:35,618 | INFO | Reading config file: /data/options.json
2018-11-30 10:14:35,623 | INFO | Starting sniffing…
2018-11-30 10:15:09,105 | INFO | Lights Dash Button button pressed!
2018-11-30 10:15:09,106 | INFO | Request: http://hassio/homeassistant/api/services/scene/turn_on
2018-11-30 10:15:09,669 | INFO | Status Code: 200
2018-11-30 10:15:09,670 | INFO | Successful request
2018-11-30 10:15:09,707 | INFO | Packet captured, waiting 15s …
2018-11-30 10:15:24,723 | INFO | Starting sniffing…
2018-11-30 10:17:09,106 | INFO | Lights Dash Button button pressed!
2018-11-30 10:17:09,107 | INFO | Request: http://hassio/homeassistant/api/services/scene/turn_on
2018-11-30 10:17:09,585 | INFO | Status Code: 200
2018-11-30 10:17:09,586 | INFO | Successful request
2018-11-30 10:17:09,627 | INFO | Packet captured, waiting 15s …
2018-11-30 10:17:24,637 | INFO | Starting sniffing…

HassIO LOG:
18-11-30 08:17:09 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services/scene/turn_on access from 03d23610_dasshio
18-11-30 08:19:09 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services/scene/turn_on access from 03d23610_dasshio
18-11-30 08:21:09 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services/scene/turn_on access from 03d23610_dasshio
18-11-30 08:23:09 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services/scene/turn_on access from 03d23610_dasshio
18-11-30 08:25:09 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services/scene/turn_on access from 03d23610_dasshio
18-11-30 08:27:09 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services/scene/turn_on access from 03d23610_dasshio
18-11-30 08:29:09 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services/scene/turn_on access from 03d23610_dasshio
18-11-30 08:31:09 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services/scene/turn_on access from 03d23610_dasshio

having the same problem any update ?

2018-12-15 14:49:14,648 | INFO | Reading config file: /data/options.json
2018-12-15 14:49:14,652 | INFO | Starting sniffing...
2018-12-15 14:51:36,771 | INFO | Gatorade button pressed!
2018-12-15 14:51:36,772 | INFO | Request: https://xxxxxxxxxxx/api/services/switch/toggle
2018-12-15 14:51:37,127 | INFO | Status Code: 401
2018-12-15 14:51:37,128 | ERROR | Bad request
2018-12-15 14:51:37,217 | INFO | Packet captured, waiting 5s ...
2018-12-15 14:51:42,219 | INFO | Starting sniffing...

I’m getting the same error as well!

Hello ,

I have dash buttons (with known IP and MAC Address) working previously on a Rpi3 B with Rasspbian and Dasher. I was using it mainly for triggering notifications from IFTTT (with maker channel) to add data to an excel sheet and also to trigger mobile notifications. My Dasher config files looks like this

{"buttons":[
  {
    "name": "Doorbell",
    "address": "b4:7c:9c:00:9c:xx",
    "url": "https://maker.ifttt.com/trigger/Open_Main_Door/with/key/<<my key>>",
    "method": "POST"
  },
  {
    "name": "Good_points",
    "address": "fc:a6:67:4c:c4:xx",
    "url": "https://maker.ifttt.com/trigger/ilsa_good/with/key/<<my key>>",
    "method": "POST"
  },
  {
    "name": "Bad_points",
    "address": "fc:a6:67:9a:74:xx",
    "url": "https://maker.ifttt.com/trigger/ilsa_bad/with/key<<my key>>",
    "method": "POST"
  }
]}

Now when I am considering moving to HA for all automations and IoT interfacing, I thought of using Dasshio within Hassio 0.84.6 .

Have been able to install it correctly and added the following to my configurations.yaml

trusted_networks:
    - 127.0.0.1
    - 192.168.10.0/24
    - 172.17.0.0/16 # Example Docker bridge - change to your relevent ip subnet range.
    - 172.30.32.0/23 # Example Docker hassio - change to your relevent ip subnet range.

In the HassIo addon configuration window, i tried replicating my old configuration as below

{
  "timeout": 20,
  "buttons": [
    {
      "name": "DoorBell",
      "address": "b4:7c:9c:00:9c:xx",
      "url": "https://maker.ifttt.com/trigger/Open_Main_Door/with/key/<<mykey>>"
      "method": "POST"
    }
  ]
}

When I press the start button , I get the following messages in the log, hence the addon never starts.

2018-12-28 17:53:52,514 | INFO | Reading config file: /data/options.json
2018-12-28 17:53:52,518 | ERROR | Parameter error for button 1: No config [url], [body], [headers] or [domain], [service], [service_data] provided
2018-12-28 17:53:52,519 | INFO | Exiting...

Would appreciate if someone can review the configuration and guide for possible troubleshooting. The reason i need to use Dash with HA is to be able to call internal HA (domanis - native services) as well as outside world services and web-hooks.

Thanks for the replis.

Hi, I have the same problem, do you have any solution? Please let me know

@SFHasan and @julioflores86

When you want to use a “url”, you need to also have “body” and “headers” configured. If you were calling directly into Home Assistant, you could use “domain”, “service” and “service_data” instead.

2 Likes

Could you please reform the below (incorrect code) with the correct syntax as you have mentioned in your reply. Also if you can add line to show syntax for any dummy hypothetical HA services and domains.

{
  "timeout": 20,
  "buttons": [
    {
      "name": "DoorBell",
      "address": "b4:7c:9c:00:9c:xx",
      "url": "https://maker.ifttt.com/trigger/Open_Main_Door/with/key/<<mykey>>"
      "method": "POST"
    }
  ]
}

Thanks for your help.

Have a look at the documentation on the GitHub page (https://github.com/danimtb/dasshio). Specifically look at the " Options: url, body, headers" section and the “Options example: domain, service, service_data” section. They have good examples demonstrating the correct usage of both URLs and services.

1 Like

As @theastropath pointed out, those of you coming from Dasher keep in mind that the configuration is not the same for Dasshio. Have a look at this example: https://github.com/danimtb/dasshio#options-url-body-headers

However, if you are triggering any HA service, I strongly suggest you to migrate the much simpler domain, service and service_data option: https://github.com/danimtb/dasshio#options-example-domain-service-service_data

1 Like

Alright can you please see if the above example is now reformatted in the correct syntax, based on the examples from the GitHub page

Original Incorrect One

{
  "timeout": 20,
  "buttons": [
    {
      "name": "DoorBell",
      "address": "b4:7c:9c:00:9c:xx",
      "url": "https://maker.ifttt.com/trigger/Open_Main_Door/with/key/<<mykey>>"
      "method": "POST"
    }
  ]
}

Corrected (presumably)

{
  "timeout": 20,
  "buttons": [
    {
      "name": "DoorBell",
      "address": "b4:7c:9c:00:9c:xx",
      "url": "https://maker.ifttt.com/trigger/Open_Main_Door/with/key/<<mykey>>"
      "headers": "{}",
      "body": "{\"payload\": \"This is an HTTP Post request!\"}"
    }
  ]
}

For my understanding can you please tell what would be the parsed values of the complete URL like

https://maker.ifttt.com/trigger/Open_Main_Door/with/key/<<myhookapikey>

into sections for “url” , “headers” and “body”.

Thanks.

Your URL won’t change based on the values of the headers and body fields. The headers go into the HTTP headers and the body is the actual content being sent to that URL. Assuming IFTTT doesn’t require anything specific to be in the headers or body, you should be fine as you’ve shown (Although your body could simple be “{}” just like the headers).

2 Likes