danimtb / dasshio Goto Github PK
View Code? Open in Web Editor NEWHass.io add-on to easily use Amazon Dash Buttons with Home Assistant
License: Apache License 2.0
Hass.io add-on to easily use Amazon Dash Buttons with Home Assistant
License: Apache License 2.0
When i add the repo to my add-on-store, nothing happen.
In the system tab i get this errors:
19-04-09 18:45:38 ERROR (MainThread) [hassio.addons.git] Can't clone https://github.com/danimtb/ repository: Cmd('git') failed due to: exit code(128)
cmdline: git clone --depth=1 --recursive --shallow-submodules -v https://github.com/danimtb/ /data/addons/git/4fae26c1
stderr: 'Cloning into '/data/addons/git/4fae26c1'...
remote: Not Found
fatal: repository 'https://github.com/danimtb/' not found
'.
19-04-09 18:45:38 ERROR (MainThread) [hassio.addons] Can't load from repository https://github.com/danimtb/
Hello,
I have intalled Home Assistant manually in a python environment and I'd like to integrate dasshio, but the only installation process described is as Hassio addon. Is it possible to install dasshio manually (not as an addon)?
Thanks!
Here is the log:
2018-05-06 10:37:37,448 | INFO | Mutfak button pressed!
2018-05-06 10:37:37,450 | INFO | Request: http://hassio/homeassistant/api/services/switch/toggle
2018-05-06 10:37:37,498 | INFO | Status Code: 500
2018-05-06 10:37:37,499 | ERROR | Bad request
2018-05-06 10:37:37,563 | INFO | Packet captured, waiting 10s ...
2018-05-06 10:37:47,572 | INFO | Starting sniffing...
hassio => 0.68.1
supervisor => 103.1
I have Hassio with the dashio and node-red addons. Dashio is working fine with a physical Amazon Dash when sending a RESTful call to the hassio api URL.
Triggering the workflow via curl on the pi and/or hassio (using the community ssh addon) also works fine.
The trouble comes when trying to do the same to a node-red URL. Now when trying to trigger the node-red URL via the Dash button, dashio logs shows it's getting a 404. Again, a basic curl to the same node-red URL works fine.
Below is the dashio setup (node-red is on port 1880)
{
"buttons": [
{
"name": "Seventh Generation",
"address": "18:74:2E:XX:XX:XX",
"url": "https://XXXXX.duckdns.org:1880/bedroom_lights",
"headers": "{}",
"body": "{}"
}
]
}
Seems like the dashio docker is getting to the endpoint but for some reason it's getting back a 404
2018-08-10 12:03:24,736 | INFO | Reading config file: /data/options.json
2018-08-10 12:03:24,737 | INFO | Starting sniffing...
2018-08-10 12:03:31,709 | INFO | Seventh Generation button pressed!
2018-08-10 12:03:31,709 | INFO | Request: https://xxxxx.duckdns.org:1880/bedroom_lights
2018-08-10 12:03:32,038 | INFO | Status Code: 404
2018-08-10 12:03:32,038 | ERROR | Bad request
2018-08-10 12:03:32,100 | INFO | Packet captured, waiting 20s ...
Showing how it works fine by doing a simple curl from the hass.io terminal to the same URL
$ curl -v https://xxxx.duckdns.org:1880/bedroom_lights
* Trying 47.152.XX.XX...
* TCP_NODELAY set
* Connected to xxxxx.duckdns.org (47.152.XX.XX) port 1880 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /Applications/Anaconda/anaconda2/ssl/cacert.pem
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=xxxxxx.duckdns.org
* start date: Jun 25 18:45:12 2018 GMT
* expire date: Sep 23 18:45:12 2018 GMT
* subjectAltName: host "xxxxx.duckdns.org" matched cert's "xxxxxx.duckdns.org"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
> GET /bedroom_lights HTTP/1.1
> Host: xxxxx.duckdns.org:1880
> User-Agent: curl/7.55.1
> Accept: */*
>
< HTTP/1.1 200 OK
< X-Powered-By: Express
< X-Content-Type-Options: nosniff
< Content-Type: application/json; charset=utf-8
< Content-Length: 2
< ETag: W/"2-vyGp6PvFo4RvsFtPoIWeCReyIC8"
< Date: Fri, 10 Aug 2018 19:01:10 GMT
< Connection: keep-alive
<
* Connection #0 to host xxxxx.duckdns.org left intact
{}
Is there any way to stop the "Your dash button is almost ready" notification on your phone without turning off all amazon notifications? I dont suppose there is
P.S. thanks for such an easy to use addon, the other methods I looked at to get a dash button working seamed lots more complicated. I found it super simple to setup (can I give a bit of feedback on the readme notes. I did spend a while trying to edit the /data/options.json file until I realised the config is done in the addon config within HASSIO you dont have to ssh into the pi to edit the file).
Many Thanks
Recently a number of my buttons have stopped working, they still flash etc. and appear to be working. However, I see nothing in the dasshio logs. This is after months of everything working flawlessly.
Is there a good way to debug and investigate this?
I see the following in my log:
Request: http://hassio/homeassistant/api/services/switch/switch.firplace_fan
but if I copy that into my web browser it says that site can not be read.
Running HA v 0.81.6 with the Dashio plugin
If you have 2 dash buttons and press both at the same time ( I guess within the timeout configured in config.json), it is only detected one of them.
Version 0.3.1
Related to: #34
The add-on does not auto start and when manually starting it does not indicate it has started from the dashboard (puzzle piece is grey). Nothing is shown in the dasshio log.
Any idea why the sniffing restarts after each button press? I have two buttons next to each other and I sometimes press them right after each other. But due to this 20sec delay the seccond button press is not recognized...
2018-03-02 00:53:27,507 | INFO | Starting sniffing...
2018-03-02 00:53:45,691 | INFO | 01 - button pressed!
...
2018-03-02 00:53:56,051 | INFO | Packet captured, waiting 20s ...
2018-03-02 00:54:16,053 | INFO | Starting sniffing...
2018-03-02 00:54:29,577 | INFO | 03 - button pressed!
...
2018-03-02 00:54:30,275 | INFO | Successful request
2018-03-02 00:54:30,331 | INFO | Packet captured, waiting 20s ...
2018-03-02 00:54:50,339 | INFO | Starting sniffing...
Fresh Ubuntu 16.04LTS w/updates, HASSIO Docker install, Supervisor 0.78, Host OS 0.3, Home Assistant 0.60
I add the dassho repo, go to install. click Install, the button lights up goes back to default and the following is shown in error log.
Any ideas where to being looking for the issue?
Thank you.
``
18-01-05 03:51:24 INFO (SyncWorker_4) [hassio.dock.addon] Start build 03d23610/amd64-addon-dasshio:0.2.0
18-01-05 03:51:24 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 410, in start
resp = yield from self._request_handler(request)
File "/usr/lib/python3.6/site-packages/aiohttp/web.py", line 325, in _handle
resp = yield from handler(request)
File "/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 93, in impl
return (yield from handler(request))
File "/usr/lib/python3.6/site-packages/hassio/api/util.py", line 33, in wrap_api
answer = await method(api, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/hassio/addons/addon.py", line 515, in install
if not await self.docker.install(self.last_version):
File "/usr/lib/python3.6/site-packages/hassio/dock/util.py", line 18, in wrap_api
return await method(api, *args, **kwargs)
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/hassio/dock/addon.py", line 251, in _install
return self._build(tag)
File "/usr/lib/python3.6/site-packages/hassio/dock/addon.py", line 264, in _build
image = self.docker.images.build(**build_env.get_docker_args(tag))
File "/usr/lib/python3.6/site-packages/docker/models/images.py", line 179, in build
raise BuildError(chunk['error'])
docker.errors.BuildError: Please provide a source image with from
prior to commit
`
Running HassOS VMDK 1.8, I get a status code of 401 status code after each button press.
{
"timeout": 10,
"buttons": [
{
"name": "Living Room | Accessory",
"address": "12:34:56:78:90:ab",
"domain": "switch",
"service": "toggle",
"service_data": "{\"entity_id\": \"switch.living_room_accessory\"}"
}
]
}
2018-07-23 22:44:25,412 | INFO | Living Room | Accessory button pressed!
2018-07-23 22:44:25,414 | INFO | Request: http://hassio/homeassistant/api/services/switch/toggle
2018-07-23 22:44:25,431 | INFO | Status Code: 401
2018-07-23 22:44:25,432 | ERROR | Bad request
2018-07-23 22:44:25,450 | INFO | Packet captured, waiting 10s ...
Latest breaking changes require that "arch" is specified in config.json
This issue is also referenced here: home-assistant/core#22854
Hi, there is an issue where this addon repeats the API call 5x for every button press. I have tried forking the repo and changing the wait value to 60 seconds, 300 seconds, and 1 second. no matter what, it just waits X seconds and repeats until it has called the API 5x... I don't know enough to troubleshoot further. Hopefully, you can take a look at this and help fix it? thx!
Logs (1 second delay in place):
root@hassio:~# docker logs -f 9cc5e9e13520
starting version 3.2.2
WARNING: No route found for IPv6 destination :: (no default route?). This affects only IPv6
2017-10-31 23:36:38,327 | INFO | Reading config file: /data/options.json
2017-10-31 23:36:38,329 | INFO | Starting sniffing...
2017-10-31 23:37:02,977 | INFO | ziplock button pressed!
2017-10-31 23:37:02,978 | INFO | Request: http://x.x.x.x:8123/api/services/script/dash_ziplock
2017-10-31 23:37:03,426 | INFO | Status Code: 200
2017-10-31 23:37:03,427 | INFO | Successful request
2017-10-31 23:37:04,439 | INFO | ziplock button pressed!
2017-10-31 23:37:04,440 | INFO | Request: http://x.x.x.x:8123/api/services/script/dash_ziplock
2017-10-31 23:37:04,868 | INFO | Status Code: 200
2017-10-31 23:37:04,869 | INFO | Successful request
2017-10-31 23:37:05,881 | INFO | ziplock button pressed!
2017-10-31 23:37:05,882 | INFO | Request: http://x.x.x.x:8123/api/services/script/dash_ziplock
2017-10-31 23:37:06,302 | INFO | Status Code: 200
2017-10-31 23:37:06,303 | INFO | Successful request
2017-10-31 23:37:07,315 | INFO | ziplock button pressed!
2017-10-31 23:37:07,316 | INFO | Request: http://x.x.x.x:8123/api/services/script/dash_ziplock
2017-10-31 23:37:07,740 | INFO | Status Code: 200
2017-10-31 23:37:07,742 | INFO | Successful request
2017-10-31 23:37:08,755 | INFO | ziplock button pressed!
2017-10-31 23:37:08,756 | INFO | Request: http://x.x.x.x:8123/api/services/script/dash_ziplock
2017-10-31 23:37:09,266 | INFO | Status Code: 200
2017-10-31 23:37:09,267 | INFO | Successful request
I'm unable to install Dasshio on the latest Hassio release. Here's the error from the supervisor logs:
17-09-28 04:34:04 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in start
resp = yield from self._request_handler(request)
File "/usr/lib/python3.6/site-packages/aiohttp/web.py", line 306, in _handle
resp = yield from handler(request)
File "/usr/lib/python3.6/site-packages/hassio/api/util.py", line 31, in wrap_api
answer = await method(api, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/hassio/api/addons.py", line 169, in install
addon.install(version=version), loop=self.loop)
File "/usr/lib/python3.6/site-packages/hassio/addons/addon.py", line 437, in install
if not await self.docker.install(version):
File "/usr/lib/python3.6/site-packages/hassio/dock/util.py", line 18, in wrap_api
return await method(api, *args, **kwargs)
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/hassio/dock/addon.py", line 184, in _install
return self._build(tag)
File "/usr/lib/python3.6/site-packages/hassio/dock/addon.py", line 197, in _build
image = self.docker.images.build(**build_env.get_docker_args(tag))
File "/usr/lib/python3.6/site-packages/docker/models/images.py", line 175, in build
raise BuildError(chunk['error'])
docker.errors.BuildError: invalid reference format: repository name must be lowercase```
Any idea what's going on?
Hi @JulianKahnert!
This is my dasshio repository. It was originally cloned from your amazon-dashbutton one (https://github.com/JulianKahnert/amazon-dashbutton). As you can see is pretty much the same but I have changed its shape to work as a Hass.io add-on.
I know it is not a big thing, but as I took your work as a basis, I would like to show you this kind of fork and collaborate if you are interested on a hass.io integration like this.
Cheers!
Edit: I have not forked you repo directly because it think this is something different. However, if you'd like so I can fork it and cherrypick the changes. Just tell me! Thanks
I'd like to toggle my light, and when it turns on it should always turn on at a certain brightness value?
How do I have to set service_data for more than one setting?
"service_data": "{\"entity_id\": \"light.trainingszimmer\"}"
I tried this:
"service_data": "{\"entity_id\": \"light.trainingszimmer\"}, {\"brightness_pct\": \"50\"}"
But this did not work, I dont know how to format it correct.
In my quest to find the cause of otherwise random hangs in the Frontend/SSH/Samba where my automations etc continue despite needing to power cycle my Pi3, I have noticed that the Dasshio segment of my snapshots often grows into excess of 70-80MB. Is this normal?
Hi there,
for several reasons I can't run hass.io on my Pi (piVPN, piVCCU (I want the original CCU) etc.). Is there a way to use a dashbutton in the normal home-assistant? My first thought was the python script: https://github.com/vancetran/amazon-dash-rpi/blob/master/habits.py and a combination of buttons, bashscripts and automations.
Hi, I am running the latest Hassio and HA 0.75.2. Dasshio captures the dash button packet but fails on the api request:
Request: http://hassio/homeassistant/api/services/script/ifttt.trigger
Status Code: 401
The logs of HA show
Login attempt or request with invalid authentication from 172.30.32.2
12:10 PM components/http/ban.py (WARNING)
Here's how my http component looks like in configuration.yaml:
http:
api_password: !secret http_password
Am I missing something basic? Thanks!
My router is to smart or too stupid to let through the hassio.local adress.
i have to enter http://10.0.0.27:8123 to get to the Homeassistant page.
i think thats why the addon wont work on my side.
I set up Dasshio version 0.3.0 in Hass.io supervisor version 121 on an Ubuntu 16.04 host. When I configure a button and then press it, I get the results below:
2018-07-31 18:52:35,229 | INFO | Reading config file: /data/options.json
2018-07-31 18:52:35,230 | INFO | Starting sniffing...
Traceback (most recent call last):
File "/dasshio.py", line 27, in arp_display
mac = pkt[ARP].hwsrc.lower()
File "/usr/lib/python3.6/site-packages/scapy/packet.py", line 966, in __getitem__
raise IndexError("Layer [%s] not found" % lname)
IndexError: Layer [ARP] not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/dasshio.py", line 149, in <module>
count=0)
File "/usr/lib/python3.6/site-packages/scapy/sendrecv.py", line 783, in sniff
if stop_filter and stop_filter(p):
File "/dasshio.py", line 29, in arp_display
mac = pkt[Ether].src.lower()
File "/usr/lib/python3.6/site-packages/scapy/packet.py", line 966, in __getitem__
raise IndexError("Layer [%s] not found" % lname)
IndexError: Layer [Ether] not found
This config worked perfectly in 64.3 and never registers a button press in 65.0.
I have done a rebuild, stop and start, but not an uninstall yet. Log looks good for dasshio.
Maybe the new entity ID stuff?
starting version 3.2.4
WARNING: No route found for IPv6 destination :: (no default route?). This affects only IPv6
2018-03-10 18:15:55,107 | INFO | Reading config file: /data/options.json
2018-03-10 18:15:55,113 | INFO | Starting sniffing...
{
"timeout": 8,
"buttons": [
{
"name": "Hammermill",
"address": "00:fc:8b:54:41:d9",
"domain": "light",
"service": "toggle",
"service_data": "{\"entity_id\": \"light.bathroom_2, light.bathroom_1\"}"
}
]
}
May I suggest you add the following:
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).
For those running Hass.io in Docker you must add the docker internal IP address to HTTP trusted_networks in the configuration.yaml file.
# Example configuration.yaml entry
http:
trusted_networks:
- 127.0.0.1
- 192.168.0.0/24
- 172.17.0.0/16 # Docker bridge
- 172.30.32.0/23 # Docker hassio
Hass.io installed in docker on Ubuntu 16.04.4.
Home assistant 65.5
hass.io supervisor 0.98
try to install via addon store and get the following error.
18-03-15 21:57:34 INFO (SyncWorker_5) [hassio.docker.addon] Start build 03d23610/amd64-addon-dasshio:0.2.1
18-03-15 21:57:34 ERROR (SyncWorker_5) [hassio.docker.addon] Can't build 03d23610/amd64-addon-dasshio:0.2.1: Please provide a source image with from
prior to commit
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": 8,
"buttons": [
{
"name": "test",
"address": "fc:65:de:ca:a3:8d",
"domain": "light",
"service": "toggle",
"service_data": "{\"entity_id\": \"light.bedroom\"}"
}
]
}
The dash button is connecting to my wifi, but dasshio isn’t working.
hassio ver: 0.69.1
dasshio ver: 0.2.1
tried rebuilding dasshio, restarting, uninstalling dasshio and reinstalling.
dasshio keeps disabling itself.
I have home assistant on my orange pi running Debian.
is it possible to install dasshio ?
thanks
Update config.json to use the same name parameters as in the service tab page on Home Assistant:
This may be done after issue #12
It would be nice if the timeout affected to each button separatly. Currently, if you press two different buttons at the same time, dasshio addon only sniff one of them.
PD: Btw the addon is very useful it makes really easy to use Amazon Dash buttons within Hass.io Thanks a lot for the effort!!
My Hassio setup was fine with Dashio installed and running, then one day it stopped and would not restart. Uninstalled Dashio, reinstalled it and now it starts but although it detects button presses, refuses to talk to the api. My entity ID is fine and I can toggle the switch using the Hassio services page, but Dashio refuses to communicate with the api.
Here is my Config:
{ "timeout": 20, "buttons": [ { "name": "SimpleHuman", "address": "6C:56:97:76:BE:17", "domain": "switch", "service": "toggle", "service_data": "{\"entity_id\": \"switch.plug\"}" } ] }
and here is the log showing button press detection but failure to communicate with the api:
2018-07-27 10:19:16,315 | INFO | Reading config file: /data/options.json
2018-07-27 10:19:16,319 | INFO | Starting sniffing...
2018-07-27 10:19:20,688 | INFO | SimpleHuman button pressed!
2018-07-27 10:19:20,689 | INFO | Request: http://hassio/homeassistant/api/services/switch/toggle
2018-07-27 10:19:20,756 | INFO | Status Code: 401
2018-07-27 10:19:20,757 | ERROR | Bad request
2018-07-27 10:19:20,797 | INFO | Packet captured, waiting 20s ...
Make sure empty headers and/or body of a configured button (in options.json) does not make the add-on crash.
Hass.io installed on Pi (HassOS 1.13)
Home assistant 0.86.2
hass.io supervisor 143
Trying to install the add on after adding the repo but within seconds the entire system crashes and reboots. Can't see anything in the logs because it crashes then reboots with fresh logs, anyone else getting this?
The last thing spotted in the logs was that the SyncWorker was attempting to pull data from this repo.
Last log: 19-02-13 22:28:57 INFO (SyncWorker_8) [hassio.docker.interface] Pull image danimtb/armhf-dasshio tag 0.3.1.
I'm getting 502 errors again (since installing homeassistant v0.75):
2018-08-06 13:13:54,889 | INFO | button1 button pressed!
2018-08-06 13:13:54,889 | INFO | Request: http://hassio/homeassistant/api/services/automation/trigger
2018-08-06 13:13:54,933 | INFO | Status Code: 502
2018-08-06 13:13:54,934 | ERROR | Bad request
2018-08-06 13:13:54,950 | INFO | Packet captured, waiting 20s ...
2018-08-06 13:14:14,966 | INFO | Starting sniffing...
my config hasn't changed since HA v0.74.2, I think something has broken in the HA api auth system (again)
This is what I can see in the hassio log:
18-08-06 11:13:54 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services/automation/trigger access from 03d23610_dasshio
18-08-06 11:13:54 ERROR (MainThread) [hassio.homeassistant] Authenticate problem with HomeAssistant!
18-08-06 11:13:54 ERROR (MainThread) [hassio.api.proxy] Authenticate error on API for request services/automation/trigger
HASSIO 0.77.3
Dasshio 0.3.1
The system seems to work ok, but only when a web page with homeassistant loaded is open.
Any ideas of how can identify the issue?
When trying to install, I'm getting a permissions file write error:
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']
This issue looks very similar to a Node-Red issue:
https://community.home-assistant.io/t/cant-install-node-red-hass-io-ubuntu-18-04/53286/3
Wondering if it requires the same fix?
I love this, it's almost exactly what I was looking for. If I could offer some feature suggestion, however, it would be to add some MQTT support.
I'm still new to HA and MQTT in general, but if it was possible to specify the broker, the topic and the message to be sent, all within the config json, that would be awesome, and go a long way towards what I'm hoping to achieve with the system.
Thank you :)
Where can I find the options.json file, my config isn't saved to /data/options.json (where the docs say that it should be), that file has my settings for the default ssh addon saved in it.
The settings persist on reboot, so must be saved somewhere, but I can't find them! I'd like to be able to store them under /config so that they can be kept in VCS with the rest of the config
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
Integrate find_button.py into main functionality.
Testing with setup of a new button is needed: Connect a dash button to wifi for the first time while this ad-on is running and check new MAC appears in log
Hi,
I hope you can help. I am trying to use the Dash button as a doorbell so that my Google home speakers say "Someone is at the door" when it is pressed.
I have successfully set it up to control a smart bulb but the doorbell setup will not work.
My Dashio config looks like this:
{
"timeout": 20,
"buttons": [
{
"name": "Doorbell",
"address": "XX:XX:XX:XX:XX:XX",
"domain": "media_player",
"service": "tts.google_say",
"service_data": "{"entity_id": "media_player.downstairs", "message": "'someones at the door'"}"
}
]
}
And the log when I press the button reads:
Log
starting version 3.2.4
WARNING: No route found for IPv6 destination :: (no default route?). This affects only IPv6
2018-03-22 18:48:19,912 | INFO | Reading config file: /data/options.json
2018-03-22 18:48:19,922 | INFO | Starting sniffing...
2018-03-22 18:48:23,523 | INFO | Doorbell button pressed!
2018-03-22 18:48:23,526 | INFO | Request: http://hassio/homeassistant/api/services/media_player/tts.google_say
So it recognised the button press and there are no errors generated, but nothing come out of the speakers. TTS seems to work fine through the media player widgets on the overview page of Home Assistant.
Any help would be much appreciated.
Nick.
Edit: masked MAC address.
Raspberry Pi 3B+ running latest 32bit hassio image.
The only other addons I have install are Duckdns and SSH server.
Clicking install does nothing, here is the log.
Sorry if I've done something stupid :)
19-03-11 12:53:34 INFO (SyncWorker_14) [hassio.docker.interface] Pull image danimtb/armv7-dasshio tag 0.3.1.
19-03-11 12:53:36 ERROR (SyncWorker_14) [hassio.docker.interface] Can't install danimtb/armv7-dasshio:0.3.1 -> 404 Client Error: Not Found ("pull access denied for danimtb/armv7-dasshio, repository does not exist or may require 'docker login'").
"service": "toogle",
solved the error was TOOGLE instead TOGGLE :-)
I just moved HASSIO (RP3) to UBUNTU 16.04 (VM).
Dashio v0.3.1
All dependicies installed and all add-on works perfectly. But Dashio keeps crashing sometimes. Here is the error log:
`2018-10-31 14:26:03,323 | INFO | Reading config file: /data/options.json
2018-10-31 14:26:03,324 | INFO | Starting sniffing...
Traceback (most recent call last):
File "/dasshio.py", line 27, in arp_display
mac = pkt[ARP].hwsrc.lower()
File "/usr/lib/python3.6/site-packages/scapy/packet.py", line 966, in __getitem__
raise IndexError("Layer [%s] not found" % lname)
IndexError: Layer [ARP] not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/dasshio.py", line 149, in <module>
count=0)
File "/usr/lib/python3.6/site-packages/scapy/sendrecv.py", line 783, in sniff
if stop_filter and stop_filter(p):
File "/dasshio.py", line 29, in arp_display
mac = pkt[Ether].src.lower()
File "/usr/lib/python3.6/site-packages/scapy/packet.py", line 966, in __getitem__
raise IndexError("Layer [%s] not found" % lname)
IndexError: Layer [Ether] not found`
Any advice?
This configuration works:
{
"buttons": [
{
"name": "Nerf",
"address": "AC:XX:XX:XX:XX:XX",
"domain": "script",
"service": "12334567890",
"service_data": "{}"
}
]
}
while this doesn't:
{
"buttons": [
{
"name": "Nerf",
"address": "AC:XX:XX:XX:XX:XX",
"domain": "script",
"service": "aktiviereradio",
"service_data": "{}"
}
]
}
My script (only the beginning):
'12334567890':
alias: AktiviereRadio
sequence:
In case it doesn't work, I see the following error in the log:
WARNING (MainThread) [homeassistant.core] Unable to find service script/aktiviereradio
| INFO | Nerf button pressed!
| INFO | Request: http://hassio/homeassistant/api/services/script/aktiviereradio
| INFO | Status Code: 200
| INFO | Successful request
| INFO | Packet captured, waiting 20s ..
Using Dashio 0.2.0
Home Assistant Hass.io 0.59.2
Great add-on by the way! Thanks for developing it
Works for about 2 min of testing then Home assistant crashes just keeps trying to reconnect but wont I set it not to start on boot so i pull the power and try again with same issue. Nothing in Home Assistant log to reference. Using this image https://www.home-assistant.io/hassio/installation/ for 32bit
My Dasshio add-on service randomly stops. Sometimes the dash buttons seem to stop working, but on inspecting the add-on I find that it has changed state to "stopped", with an error in the log.
The last time, this is what happened:
This is the log:
2017-12-13 07:01:35,704 | INFO | Gillette button pressed!
2017-12-13 07:01:35,705 | INFO | Request: http://homeassistant:8123/api/services/light/toggle
2017-12-13 07:01:35,810 | INFO | Status Code: 200
2017-12-13 07:01:35,811 | INFO | Successful request
Traceback (most recent call last):
File "dasshio.py", line 81, in <module>
sniff(stop_filter=arp_display, 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
Connection lost. Reconnecting…
This is the add-on configuration. Notice that at the moment I am actively using only the first configured button, "Gillette".
Description Use Amazon Dash Buttons in Home Assistant
Version 0.0.9
State stopped
Boot auto
Auto update X
Uses host network V
Builds locally V
Detached V
Options
{
"buttons": [
{
"name": "Gillette",
"address": "**:**:**:**:**:ea",
"url": "http://homeassistant:8123/api/services/light/toggle",
"headers": "{\"x-ha-access\": \"*******\"}",
"body": "{\"entity_id\": \"light.abatjour\"}"
},
{
"name": "Angelica",
"address": "**:**:**:**:**:B8",
"url": "http://homeassistant:8123/api/services/persistent_notification/create",
"headers": "{\"x-ha-access\": \"*******\"}",
"body": "{\"message\": \"prova angelica\"}"
},
{
"name": "Finish",
"address": "**:**:**:**:**:B9",
"url": "http://homeassistant:8123/api/services/persistent_notification/create",
"headers": "{\"x-ha-access\": \"*******\"}",
"body": "{\"message\": \"prova finish\"}"
},
{
"name": "Duracell",
"address": "**:**:**:**:**:A0",
"url": "http://homeassistant:8123/api/services/automation/trigger",
"headers": "{\"x-ha-access\": \"*******\"}",
"body": "{\"entity_id\":\"automation.demo_audio_e_luce\"}"
},
{
"name": "Barilla",
"address": "**:**:**:**:**:0D",
"url": "http://homeassistant:8123/api/services/persistent_notification/create",
"headers": "{\"x-ha-access\": \"*******\"}",
"body": "{\"message\": \"prova barilla\"}"
}
]
}
Hass.io version is 0.59.2 running on Raspberry Pi 3.
Hi! Love the add-on and have 15 buttons configured.. But on some of them, when I press the button once, it acts as if I am pressing it multiple times.. Ie. It waits until the time out.. and then acts as if it was pressed a second time.. This happens for about 45 seconds... Is there anything I can do to prevent this from happening? The workaround, is in Node-Red to not let the Boolean (which I have linked to the button) act upon the Home Assistant action for 1 minutes after the first press.. (in the process of implementing this)... It should work, but curious as to why Dasshio would act is if the button is pressed more than once.. The light on the button, indeed stays on for about that period of time, but that is above the 20 seconds default. So either I am doing something wrong and/or I've got defective buttons or?
Thanks again for such a fabulous add-on!
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.