mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[harmonyhub] Updated README to get buttonPress values with the new REST API implementation (#10978)
* fixed typo in example * Updated the instructions on how to find buttonPress values openHAB 3.X put the REST API behind authorization and the old URL no longer works in the browser due to an authentication error. These new instructions allow for a trivial way to find the commands. Signed-off-by: Jerry Gallo <2wyck3d@gmail.com>
This commit is contained in:
parent
478f7d9b55
commit
225cb9ed38
@ -148,5 +148,44 @@ Example subset of values for the current activity "buttonPress" channels
|
||||
Mute,VolumeDown,VolumeUp,DirectionDown,DirectionLeft,DirectionRight,DirectionUp,Select,Stop,Play,Rewind,Pause,FastForward,SkipBackward,SkipForward,Menu,Back,Home,SelectGame,PageDown,PageUp,Aspect,Display,Search,Cross,Circle,Square,Triangle,PS,Info,NumberEnter,Hyphen,Number0,Number1,Number2,Number3,Number4,Number5,Number6,Number7,Number8,Number9,PrevChannel,ChannelDown,ChannelUp,Record,FrameAdvance,C,B,D,A,Live,ThumbsDown,ThumbsUp,TiVo,WiiA,WiiB,Guide,Clear,Green,Red,Blue,Yellow,Dot,Return,Favorite,Exit,Sleep
|
||||
```
|
||||
|
||||
A complete list of names for device buttons values can be determined via the REST API for channel-types, <http://YourServer:8080/rest/channel-types>.
|
||||
Search the JSON for "harmonyhub:device".
|
||||
A complete list of names for device buttons values can be determined via the REST API for channel-types. The easiest way to do this is through the API explorer:
|
||||
|
||||
1. Go to the main UI page for your installation
|
||||
* This is usually at <http://your-openhab-ip:8080> or, in the case of openhabian, <http://openhabian:8080>
|
||||
2. Login if you are not already logged in
|
||||
3. Using the left panel (or three bars on the upper left corner) go to Developer Tools -> API Explorer -> channel-types
|
||||
4. Click `GET` next to `/channel-types`
|
||||
5. Click `Try it out`
|
||||
6. Click `Execute`
|
||||
7. Search the `Response Body` "harmonyhub:device" and find your device in the JSON output
|
||||
|
||||
The valid commands (read: values) will be listed with the device. For example, the response body might show that for `harmonyhub:device:HarmonyHub:lasko_fan` the valid commands are `PowerToggle, Speed, Timer`
|
||||
|
||||
{
|
||||
"parameters": [],
|
||||
"parameterGroups": [],
|
||||
"description": "Send a button press to device Harmony Device",
|
||||
"label": "Send Button Press",
|
||||
"itemType": "String",
|
||||
"kind": "STATE",
|
||||
"stateDescription": {
|
||||
"readOnly": false,
|
||||
"options": [
|
||||
{
|
||||
"value": "PowerToggle",
|
||||
"label": "Power Toggle"
|
||||
},
|
||||
{
|
||||
"value": "Speed",
|
||||
"label": "Speed"
|
||||
},
|
||||
{
|
||||
"value": "Timer",
|
||||
"label": "Timer"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tags": [],
|
||||
"UID": "harmonyhub:device:GreatRoom:lasko_fan:buttonPress",
|
||||
"advanced": false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user