From: Jerry Gallo <23113287+2wyck3d@users.noreply.github.com> Date: Tue, 13 Jul 2021 06:16:33 +0000 (-0700) Subject: [harmonyhub] Updated README to get buttonPress values with the new REST API implement... X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=225cb9ed384b67f59a0276246d2cecb681feff83;p=openhab-addons.git [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> --- diff --git a/bundles/org.openhab.binding.harmonyhub/README.md b/bundles/org.openhab.binding.harmonyhub/README.md index 7bcf39fb09..e1891cfc5b 100644 --- a/bundles/org.openhab.binding.harmonyhub/README.md +++ b/bundles/org.openhab.binding.harmonyhub/README.md @@ -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, . -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 or, in the case of openhabian, +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 + }