Comments (4)
Hi @WagnerBeccard, thanks a lot for reporting!
Maybe for your case it is useful to use the URL, BODY and HEADERS interface of dasshio. You can see examples here: https://github.com/danimtb/dasshio#options-url-body-headers
Please try them and let me know! 😄
from dasshio.
I try, I try. But therefore my knowledge is to immature..
she setup for a button is straight forward.
"name": "1",
"address": "AX:6X:BX:EX:DX:8X",
"domain": "light",
"service": "toggle",
"service_data": "{\"entity_id\": \"light.1\"}"
but then with the url.. its over
Not documented well enough.. atm I'm trying to help me with
https://community.home-assistant.io/t/cant-get-amazon-dash-button-working-hassio-dasshio/25031/47
but from top to bottom nothing worked.
btw.. "method": "POST", wont stick in the config - maybe on purpos maybe not.
the most "clean way would be
"name": "Gel",
"address": "mac adress in small letters",
"url": "http://10.0.0.27:8123/api/services/light/toggle",
"headers": "{"login": "pass"}",
"body": "{"entity_id": "light.1"}"
i just see in the log that nothing happens when i press the button. even when i see the button press on the active devices at the router.
starting version 3.2.4
WARNING: No route found for IPv6 destination :: (no default route?). This affects only IPv6
2018-03-02 09:37:46,642 | INFO | Reading config file: /data/options.json
2018-03-02 09:37:46,647 | INFO | Starting sniffing...
Edit.. Ok..
I think it dont work at all.
just did a easy http config - but nothing moves
"url": "http://10.0.0.151/cm?cmnd=Power%20TOGGLE",
"headers": "{}",
"body": "{"payload": "This is an HTTP Post request!"}"
It would be nice if you can see buttonpresses in the logs
I did try to figure out the url body and headers. inconvinient to be honest.
from dasshio.
@WagnerBeccard I think I dont really get what your problem is.
I have tried url/headers/body configuration in Dasshio and everything worked just fine.
- Button presses are listed in the logs (even with url/headers/body configuration):
starting version 3.2.4
2018-03-04 18:27:52,926 | INFO | Reading config file: /data/options.json
2018-03-04 18:27:52,930 | INFO | Starting sniffing...
2018-03-04 18:28:01,606 | INFO | Gillette button pressed!
2018-03-04 18:28:01,606 | INFO | Request: http://hassio/homeassistant/api/services/input_boolean/toggle
2018-03-04 18:28:02,119 | INFO | Status Code: 200
2018-03-04 18:28:02,120 | INFO | Successful request
2018-03-04 18:28:02,184 | INFO | Packet captured, waiting 10s ...
2018-03-04 18:28:12,195 | INFO | Starting sniffing...
-
HTTP request is POST always:
Line 53 in c9f5c01
-
You can setup as many buttons as you like.
-
You can mix url/body/headers configurations with domain/service/service_data ones:
{
"timeout": 10,
"buttons": [
{
"name": "Gillette",
"address": "AB:66:BC:98:C4:0D",
"url": "https://ha_url_here.duckdns.org/api/services/switch/toggle",
"headers": "{\"x-ha-access\": \"yoursecretpasswordhere\"}",
"body": "{\"entity_id\":\"input_boolean.dash_gillette\"}"
},
{
"name": "Gillette2",
"address": "AT:63:BE:86:C7:0F",
"domain": "input_boolean",
"service": "toggle",
"service_data": "{\"entity_id\":\"input_boolean.dash_gillette\"}"
}
]
}
So maybe your problem is that you are not scaping " correctly. You have to use \" in order to use json format in body and headers. See the WARNING at the end of this section: https://github.com/danimtb/dasshio/blob/master/README.md#options-example-domain-service-service_data
Please, follow the examples in the readme and let me know if that works.
from dasshio.
well.. I' did try my best - no chance.
Guessed the api wasn't correctly setted up, that the buttons are on a different network, tried it with wireless instead of wired.. but I can't get it to work.
Changing tomorrow to hasbian and see if dasher works. Maybe it's my Network we ll see.
guessed first the buttons don't work because of the wrong network-prefix notation.
That's why I opened this issue, to use the intuitive options like domain, service and service_data
(i figured it out now how to use the url, body, headers part.. but it was a pain)
from dasshio.
Related Issues (20)
- README.md grammar error
- Errors Log, config HOT 4
- help to understand error in logs HOT 2
- Manual installation HOT 1
- 400 Bad Request from Homeassistant API HOT 1
- Some scripts work - others don't - here's how to fix it HOT 2
- support for 'dash wand'? HOT 1
- How to get dasshio to connect to HA IP address HOT 5
- Where to put the config file ? HOT 2
- Problem with config HOT 7
- Service started but not responding to Dash buttons HOT 5
- README.md regarding Quick Setup
- ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /addons/03d23610_dasshio/changelog
- Expections since ~ beginning of May
- Dash button stopped working HOT 16
- Amazon Dash button Not working updating Home Assistant 0.102.2 HOT 5
- Format for button connection to wifi HOT 7
- Prevent New Dash Button from Being Bricked HOT 1
- Nmap Device Tracker conflict HOT 1
- Older Dash Buttons HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dasshio.