Dasshio - Amazon Dash Buttons Hass.io add-on

Anyway to get this working with Hassbian?

This is a hassio-addon. You could try to get the python script from the Dasshio repo an try running it in hassbian…

Hi all. I am using this add-on and it working great. However sometimes the add-on stops and I get the following error. Any ideas?

File “dasshio.py”, line 147, in
filter=“arp or (udp and src port 68 and dst port 67 and src host 0.0.0.0)”, store=0, count=0)
File “/usr/lib/python3.6/site-packages/scapy/sendrecv.py”, line 617, in sniff
s.close()
File “/usr/lib/python3.6/site-packages/scapy/arch/linux.py”, line 499, in close
set_promisc(self.ins, i, 0)
File “/usr/lib/python3.6/site-packages/scapy/arch/linux.py”, line 151, in set_promisc
mreq = struct.pack(“IHH8s”, get_if_index(iff), PACKET_MR_PROMISC, 0, b"")
File “/usr/lib/python3.6/site-packages/scapy/arch/linux.py”, line 294, in get_if_index
return int(struct.unpack(“I”,get_if(iff, SIOCGIFINDEX)[16:20])[0])
File “/usr/lib/python3.6/site-packages/scapy/arch/linux.py”, line 288, in get_if
ifreq = ioctl(s, cmd, struct.pack(“16s16x”,bytes(iff,‘utf-8’)))
OSError: [Errno 19] No such device

Yes, we are aware of that and trying to get a fix for it. Have a look here https://github.com/danimtb/dasshio/issues/21

1 Like

Daniel, mine has not stopped since the upgrade. May just not be long enough yet, thanks for the timeout… 8 seconds is working well!

1 Like

Thank you for the feedback! Please report in GitHub for any issue related :smile:

I recently started fresh with hassio and installed dasshio again. Before I started fresh I had dasshio working with hassio.
this is the log:

Traceback (most recent call last):
  File "dasshio.py", line 7, in <module>
    from scapy.all import sniff
ModuleNotFoundError: No module named 'scapy'

dasshio does not start when I reboot hassio, even though start on boot is enabled. I have to manually start the add-on.

this is my config in the dasshio add-on:

{
“timeout”: 20,
“buttons”: [
{
“name”: “test”,
“address”: “fc:55:ae:ch:f3:9a”,
“domain”: “light”,
“service”: “toggle”,
“service_data”: “{"entity_id": "light.bedroom"}”
}
]
}

The dash button is connecting to my wifi, but dasshio isn’t working.

I apologize, I am pretty new to this and I am fumbling through a lot of it. I know my issue setting this up but I do not understand how to correct it. I am trying to get the lamp to toggle with dash but I do not have Home Assistant API set up properly so this command does nothing.
2018-06-17 23:26:47,624 | INFO | dash1 button pressed!
2018-06-17 23:26:47,625 | INFO | Request: http://hassio/homeassistant/api/services/lamp/toggle

I have read https://developers.home-assistant.io/docs/en/hassio_addon_communication.html and the REST API page over and over but I do not understand how to actually set it up. I have spent the last few days googling but I cannot find instructions that make sense to me. Please help me.

Have you tried with the example in the readme? https://github.com/danimtb/dasshio#options-example-domain-service-service_data

It should be very straightforward to set your config up. Your request URL seems good though

Yes I used that and that part is working but its this that is causing me issues…

Note: Dasshio uses http://hassio/homeassistant/api/services/{domain}/{service} as the base url to route requests over the Hassio local network between the containers. This is the prefered method as it means the requests don’t have to leave the machine Hassio is running on (See Hass.io Addon Communication).

You haven’t actually followed the template in the docs, you’ve left characters out and ignored the spacing. Using your example it should look like this…

{
  "timeout": 20,
  "buttons": [
  {
    "name": "test",
    "address": "c:55:ae:ch:f3:9a",
    "domain": "light",
    "service": "toggle",
    "service_data": "{\"entity_id\": \"light.bedroom\"}"
  }]
}

Did the log really say “http://hassio/homeassistant/api/services/lamp/toggle” ?

@danimtb, the domain should be “light” should it not?

yes, thanks a lot @Bobby_Nobble. That should be the configuration to use @mskrohn

The Dasshio part I have working, I don’t need help with that part. My issue is when this request is sent out

http://hassio/homeassistant/api/services/light/toggle

nothing happens because I don’t know how to set up the Hassio Addon Communication. Maybe this is more of a how do I set up REST API or the Hassio Addon Communication?

On the contrary, your config is wrong and not working.

There is no more to setting it up than that and, as confirmed by the best source for info ie the guy who created it, you need to do it as I showed you. I even made it cut and paste for you.

I think you are over thinking it.

In the hassio add on type exactly what @Bobby_Nobble wrote in his post above into the config box. Save it and start the add-on that’s it.

If there’s a problem you will see in the logs from the add-on.

Because it’s Json you have to fill the template exactly as shown

If you have tried the example from the github page it proves the issue is your config.

I think the way the add on works is it converts the json formatted config into the http string you are talking about. That’s why you don’t need to worry about that only that the config you have typed is correctly formatted and refers to the correct domain as others have already said

@danimtb

Ive been using Dasshio for some time now and love it!

Following an HA meltdown which required a rebuild two days ago I couldn’t get Dasshio to start and I assumed it was a problem with my rebuild or snapshot, or something…

But the new HassOS came out yesterday so I completely rebuilt again and still dasshio will not install so as it is a fresh build right down to the OS I am guessing it might actually be something to do with t he add-on. Can you please offer any suggestions?

I’d be very grateful as I really want this add-on back as it is brilliant. And my wife loves it :slight_smile:

Showing it installed and supposedly started

But it is not started on the Dashboard
image

And the log is empty (after pressing REFRESH)
image

For completeness…
image

Have just installed a fresh hass.io with hassOS. Will try to fix dasshio before the end of this week. thanks for reporting and glad you like it! :smile:

1 Like

Ah, so it is not just me.
That’s a relief!!

Thanks for responding and thanks in advance for fixing it - from my wife too!! :slight_smile:

There’s probably going to be a lot of this, I’m giving it a while until I see reports of everything I rely on is working.

Yes but I think in this case it is something with the add-on as it failed to load with a rebuild two days ago on HA on ResinOS.

But yes, I suspect there will be a few things ‘broken’.
So far I haven’t had anything else yet though :slight_smile: