I have Hassio with the dashio and node-red addons. The dashio is working fine with a physical Amazon Dash when sending a RESTful call to hassio api URL. The trouble comes when trying to do the same to a node-red URL.
Triggering the workflow via curl on the pi and/or hassio using the community ssh addon also works fine. Now when trying to trigger it via the Dash button, the dashio logs are throwing errors.
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 ...
Below is the dashio setup (not sure why the indents isn’t making this monospaced)
{
“buttons”: [
{
“name”: “Seventh Generation”,
“address”: “18:74:2E:XX:XX:XX”,
“url”: “https://XXXXX.duckdns.org:1880/bedroom_lights”,
“headers”: “{}”,
“body”: “{}”
}
]
}
$ 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
{}