Add endpoint

This commit is contained in:
Fabian Affolter 2017-05-23 23:29:41 +02:00
parent d520317324
commit 13c661c2f5
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -40,6 +40,8 @@ binary_sensor:
You need to configure every button to make it work with Home Assistant. First connect the Wifi Buttons to your wireless network. Keep in mind that they only support WPS (Wi-FI Protected Setup). Once a button is connected you have three minutes to set the actions for the push patterns. The fastest way is to use `curl`. Check the [documentation](https://mystrom.ch/wp-content/uploads/REST_API_WBP.txt) of the WiFi Button for further details about the implementation (`http://` is replaced by `get://` or `post://`). `action` is the name of the corresponding push pattern (see above).
The endpoint that is recieving the data is `[IP address Home Assistant]:8123/api/mystrom`.
```bash
$ curl -d "[action]=get://[IP address Home Assistant]:8123/api/mystrom?[action]%3D[ID of the button]" http://[IP address of the button]/api/v1/device/[MAC address of the button]
{