From 2fd0f7748b865bf99da6d58950349dfafb280018 Mon Sep 17 00:00:00 2001 From: Admin Date: Wed, 11 Nov 2015 13:19:50 -0600 Subject: [PATCH] Some more readme updates. --- README.md | 93 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 82 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f56b3f3..df46b3e 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,17 @@ Anything that takes an action as a result of an HTTP request will probably work } ``` #### Response +Name | Type | Description +-----|-------|------------- +id | number | This is the ID assigned to the device and used for lookup. +name | string | A name for the device. This is also the utterance value that the Echo will use. +deviceType | string | This identifies what type of device entry this is. It is used by the system and should be the values of "switch", "scene", "custom", "activity" or "button". +onUrl | string | This is the URL that is executed for an "on" request and is used for the device types of "switch", "scene" and "custom". For "activity" or "button" it is the Json target generated by the Harmony Hub helpers. +offUrl | string | This is the URL that is executed for an "off" request and is used for the device types of "switch", "scene" and "custom". For "activity" or "button" it is the Json target generated by the Harmony Hub helpers. +httpVerb | string | This is used for "custom" calls that the user would like to execute. The values can only be "GET, "PUT", "POST". +contentType | string | This is an http type string such as "application/text" or "application/xml" or "application/json". +contentBody | string | This is the content body that you would like to send when executing an "on" request. +contentBodyOff | string | This is the content body that you would like to send when executing an "off" request. ``` { "id" : 12345, @@ -183,17 +194,7 @@ Get a device by ID assigned from creation and saved in the HA bridge configurati GET http://host:8080/api/devices/ ``` #### Response -Name | Type | Description ------|-------|------------- -id | number | This is the ID assigned to the device and used for lookup. -name | string | A name for the device. This is also the utterance value that the Echo will use. -deviceType | string | This identifies what type of device entry this is. It is used by the system and should be the values of "switch", "scene", "custom", "activity" or "button". -onUrl | string | This is the URL that is executed for an "on" request and is used for the device types of "switch", "scene" and "custom". For "activity" or "button" it is the Json target generated by the Harmony Hub helpers. -offUrl | string | This is the URL that is executed for an "off" request and is used for the device types of "switch", "scene" and "custom". For "activity" or "button" it is the Json target generated by the Harmony Hub helpers. -httpVerb | string | This is used for "custom" calls that the user would like to execute. The values can only be "GET, "PUT", "POST". -contentType | string | This is an http type string such as "application/text" or "application/xml" or "application/json". -contentBody | string | This is the content body that you would like to send when executing an "on" request. -contentBodyOff | string | This is the content body that you would like to send when executing an "off" request. +The response is the same layout as defined in the add device response. ``` { "id" : 6789, @@ -215,16 +216,86 @@ Get current version of the HA bridge software. ``` GET http://host:8080/api/devices/habridge/version ``` +#### Response +Name | Type | Description +-----|-------|------------- +version | string | The version returned by the software. +``` +{"version":"1.0.7"} +``` ### Get Vera Devices Get the list of devices available from the Vera, VeraLite or VeraEdge if configured. Please refer to the Luup Sdata Structure for the explanation of the devices list returned. ``` GET http://host:8080/api/devices/vera/devices ``` +#### Response +Name | Type | Description +-----|-------|------------- +name | string | The name of the Vera device. +altid | string | Vera internal alternate id +id | string | Vera id for accessing device. This is used in calls to the vera url for control. +category | string | Vera category name. +subcategory | string | Vera subcategory identifier. +room | string | Room name assigned to device. +parent | string | Vera id of the parent device. +status | string | Vera status for identifying on = 1 and off = 2. +level | string | Vera device dim percentage. +state | string | Vera additional state attribute. -1 means nothing is happening. 0, 1, 5, 6 mean that the engine is working. 2 or 3 indicates an error. 4 indicates a successful operation. +comment | string | Comment configured with device. Not always present. +``` +[{ + "name":"Couch Left Lamp", + "altid":"4", + "id":"6", + "category":"Dimmable Light", + "subcategory":"0", + "room":"Family Room", + "parent":"1", + "status":"0", + "level":"0", + "state":"-1", + "comment":"" +}, +{ + "name":"Couch Right Lamp", + "altid":"7", + "id":"9", + "category":"Dimmable Light", + "subcategory":"0", + "room":"Family Room", + "parent":"1", + "status":"0", + "level":"0", + "state":"-1", + "comment":"" +}] +``` ### Get Vera Scenes Get the list of scenes available from the Vera, VeraLite or VeraEdge if configured. Please refer to the Luup Sdata Structure for the explanation of the scenes list returned. ``` GET http://host:8080/api/devices/vera/scenes ``` +#### Response +Name | Type | Description +-----|-------|------------- +active | string | 1 if the scene is active, 0 otherwise. +name | string | The name of the Vera scene. +id | string | Vera id for accessing scene. This is used in calls to the vera url for control. +room | string | Room name assigned to scene. +``` +[{ + "active":"1", + "name":"AccentLightsOff", + "id":"27", + "room":"no room" +}, +{ + "active":"0", + "name":"AccentLightsOn", + "id":"26", + "room":"no room" +}] +``` ### Get Harmony Activities Get the list of activities available from the Harmony Hub if configured. ```