You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 21, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -31,16 +31,17 @@ The API depends on environment variables. **Make sure to configure the bold vari
31
31
Using the included Dockerfile, it is also possible to run this API inside a container.
32
32
33
33
## Endpoints
34
-
| Method | URL | Description | Example Request | Example Response |
35
-
| -- | -- | -- | -- | -- |
36
-
| GET | /api/test/session | Returns valid session key (Only necessary for testing) ||`{ "session": "string"` } |
37
-
| GET | /api/test/communication | Returns status 200 when API can connect to Google to verify internet connectivity |
38
-
||||
39
-
| GET | /api/plug | Returns all registered plugs || * |
40
-
| GET | /api/smartplug | Returns info about your internet connected smartplug. (Tip: Use this to determine the ID of your smartplug. Use the `id` property.) || * |
41
-
| GET | /api/plug/:plugID| Returns `true` or `false` for is_active state of a plug specified by plugID ||`{ "is_active": false }`|
42
-
| POST | /api/plug/:plugID|[DIMMER] Change dimmer state when request body contains `"type": "dimmer"` and `"value": number`. When value is below `MIN_DIMMING_VALUE`, the dimmer will switch off. Returns `is_active state`. |`{ "type": "dimmer", "value": 75 }`|`{ "is_active": true }`|
43
-
|||[SWITCH] Switches plug when request body contains `"type": "switch"` and `"value": "on/off"`. Returns `is_active` state |`{ "type": "switch", "value": "on" }`|`{ "is_active": true }`|
34
+
| Method | URL | Description | Example Request | Example Response |
| GET | /api/test/session | Returns valid session key (Only necessary for testing) ||`{ "session": "string"` } |
37
+
| GET | /api/test/communication | Returns status 200 when API can connect to Google to verify internet connectivity |||
38
+
||||||
39
+
| GET | /api/plug | Returns all registered plugs || * |
40
+
| GET | /api/smartplug | Returns info about your internet connected smartplug. (Tip: Use this to determine the ID of your smartplug. Use the `id` property.) || * |
41
+
| GET | /api/plug/:plugID| Returns `true` or `false` for is_active state of a plug specified by plugID ||`{ "is_active": false }`|
42
+
| POST | /api/plug/:plugID|[DIMMER] Change dimmer state when request body contains `"type": "dimmer"` and `"value": number`. When value is below `MIN_DIMMING_VALUE`, the dimmer will switch off. Returns `is_active state`. |`{ "type": "dimmer", "value": 75 }`|`{ "is_active": true }`|
43
+
|||[SWITCH] Switches plug when request body contains `"type": "switch"` and `"value": "on/off"`. Returns `is_active` state |`{ "type": "switch", "value": "on" }`|`{ "is_active": true }`|
44
+
|||[CURTAIN] Switches a Brel type curtain to either `"type": "brel_ud_curtain"` and `"value": "up/down/stop"`. Returns `is_active` state |`{ "type": "brel_ud_curtain", "value": "down" }`|`{ "is_active": true }`|
44
45
45
46
`*` Try this yourself. Response contains a bunch of useful info and does not fit needly in this table.
0 commit comments