Skip to content
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.

V7 #101

Merged
merged 4 commits into from Nov 16, 2020
Merged

V7 #101

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Expand Up @@ -18,7 +18,7 @@ jobs:
if: contains(github.event.commits[0].message, '[skip ci]') == false
uses: "actions/setup-node@v1"
with:
node-version: "12.x"
node-version: "14.x"
registry-url: "https://registry.npmjs.org"

- name: Restore npm cache
Expand Down
71 changes: 12 additions & 59 deletions README.md
Expand Up @@ -26,87 +26,40 @@ npm install --global homebridge-harmony-tv-smockle

1. Find the static IP address of your Harmony Hub. In the plugin [configuration](#Configuration), this is the `"host"` value.

2. Run `hubinfo $HOST` (or `$(npm root --global)/homebridge-harmony-tv-smockle/dist/bin/hubinfo.js $HOST`, if you don’t include globally-installed packages in `$PATH`) to find the unique identifier of your Harmony Hub. In the plugin [configuration](#Configuration), this is the `"remoteId"` value.
2. Run `npx homebridge-harmony-tv-smockle@6.x $HOST`, if you don’t include globally-installed packages in `$PATH`) to find the unique identifier of your Harmony Hub. In the plugin [configuration](#Configuration), this is the `"remoteId"` value.

3. Run `hubinfo $HOST $REMOTE_ID` (or `$(npm root --global)/homebridge-harmony-tv-smockle/dist/bin/hubinfo.js $HOST $REMOTE_ID`, if you don’t include globally-installed packages in `$PATH`) to find the unique identifier of the Harmony Hub-connected TV you want to control. In the plugin [configuration](#Configuration), this is the `"deviceId"` value.

4. Run `hubinfo $HOST $REMOTE_ID $DEVICE_ID` (or `$(npm root --global)/homebridge-harmony-tv-smockle/dist/bin/hubinfo.js $HOST $REMOTE_ID $DEVICE_ID`, if you don’t include globally-installed packages in `$PATH`) to find the list of commands supported by your Harmony Hub-connected TV. In the plugin [configuration](#Configuration), this is the `"commands"` value.
3. Run `npx homebridge-harmony-tv-smockle@6.x $HOST $REMOTE_ID`, if you don’t include globally-installed packages in `$PATH`) to find the unique identifier of the Harmony Hub-connected TV you want to control. In the plugin [configuration](#Configuration), this is the `"deviceId"` value.

# Configuration

```JSON
{
"bridge": {
"name": "TV Bridge",
"name": "Homebridge Harmony TV",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},
"description": "SmartHome with Homebridge",
"accessories": [{
"accessory": "HarmonyTV",
"description": "Homebridge Harmony TV",
"accessories": [{}],
"platforms": [{
"platform": "HarmonyTV",
"name": "Living Room TV",
"host": "192.168.1.10",
"remoteId": "22571993",
"deviceId": "72306838",
"commands": [{
"action": "{\"command\":\"PowerToggle\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "PowerToggle",
"label": "Power Toggle"
}, {
"action": "{\"command\":\"VolumeDown\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "VolumeDown",
"label": "Volume Down"
}, {
"action": "{\"command\":\"VolumeUp\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "VolumeUp",
"label": "Volume Up"
}, {
"action": "{\"command\":\"DirectionDown\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "DirectionDown",
"label": "Direction Down"
}, {
"action": "{\"command\":\"DirectionLeft\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "DirectionLeft",
"label": "Direction Left"
}, {
"action": "{\"command\":\"DirectionRight\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "DirectionRight",
"label": "Direction Right"
}, {
"action": "{\"command\":\"DirectionUp\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "DirectionUp",
"label": "Direction Up"
}, {
"action": "{\"command\":\"Select\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "Select",
"label": "Select"
}, {
"action": "{\"command\":\"Menu\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "Menu",
"label": "Menu"
}, {
"action": "{\"command\":\"InputHdmi1\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "InputHdmi1",
"label": "InputHdmi1"
}, {
"action": "{\"command\":\"InputHdmi2\",\"type\":\"IRCommand\",\"deviceId\":\"72306838\"}",
"name": "InputHdmi2",
"label": "InputHdmi2"
}]
}],
"platforms": []
"deviceId": "72306838"
}]
}
```

**Notes:**

- `"accessory"` must be `"HarmonyTV"`
- `"platform"` must be `"HarmonyTV"`
- `"name"` values must be unique

# Useful Links

- [Harmony HTTP](https://github.com/smockle/harmony-http)
- [Homebridge Developer Documentation for Television Service](https://developers.homebridge.io/#/service/Television)
- [Homebridge Example Independent Platform Plugin](https://github.com/homebridge/homebridge-examples/blob/master/independent-platform-example-typescript/src/independent-platform.ts)
- [Node.JS HAP TV Accessory Docs](https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes-Television.js)
- [Node.JS HAP TV Accessory Example](https://github.com/KhaosT/HAP-NodeJS/blob/master/accessories/TV_accessory.js)
- [WIP Homebridge plug-in for Sony TVs](https://github.com/arnif/homebridge-sony-television)