Skip to content

Commit

Permalink
Changing default port because shelly plugin use it
Browse files Browse the repository at this point in the history
Improving doc
Changing help
Typo in keywords
androidtv-remote plugin update
Fix state to show Pair button in admin
  • Loading branch information
louis49 committed Jan 3, 2022
1 parent 533a109 commit cc50604
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ Note that this is an unofficial plugin.
1. Install Homebridge by following
[the instructions](https://github.com/homebridge/homebridge/wiki).
2. Install this plugin using [Homebridge Config UI X](https://github.com/oznu/homebridge-config-ui-x), or by running `npm install -g homebridge-androidtv`.
3. Connect to http://localhost:8181 and pair detected devices
4. Enjoy ;-)
3. Connect to [http://localhost:8182](http://localhost:8182) and pair detected devices with shown secret code
4. On HomeKit app tap on 'Add accessory'
5. Enjoy ;-)

## Configuration
You can configure channels and applications (don't hesitate to create an HomeKit Scene to launch them by voice)

For channels, we always consider TV App as the first on the list channel shown after a 'Home' tap
For channels, we always consider TV App as the first on the list channel shown after a 'Home' tap on regular remote

Example for French TV :

Expand Down
8 changes: 4 additions & 4 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"pluginAlias": "HomebridgeAndroidTV",
"pluginType": "platform",
"singular": true,
"headerDisplay": "",
"footerDisplay": "",
"headerDisplay": "Homebridge AndroidTV plugin",
"footerDisplay": "Please, go to http://localhost:8182 (change host to your) to see and add detected devices",
"schema": {
"port": {
"title": "port",
"type": "integer",
"default": "8181",
"default": "8182",
"required": true
},
"channels": {
Expand Down Expand Up @@ -62,7 +62,7 @@
{
"key" : "port",
"type" : "fieldset",
"title" : "Admin port",
"title" : "Administration port",
"items" : {
"title" : "Port",
"key": "port"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-androidtv",
"version": "2.0.11",
"version": "2.0.12",
"description": "Homebridge plugin to control your AndroidTV / Freebox Player Pop / Freemox Mini 4k",
"main": "dist/index.js",
"engines": {
Expand All @@ -16,12 +16,12 @@
"androidtv",
"freebox",
"freebox-player-pop",
"freemox-mini-4k"
"freebox-mini-4k"
],
"author": "@louis49",
"license": "ISC",
"dependencies": {
"androidtv-remote": "^1.0.6",
"androidtv-remote": "^1.0.7",
"bonjour": "^3.5.0",
"express": "^4.17.2",
"core-js": "^3.20.2"
Expand Down
2 changes: 1 addition & 1 deletion src/homebridge/admin/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</div>
</td>
<td>
<button class="btn btn-primary btn-sm" v-on:click="pair(device)" v-if="!device.paired && !device.pairing">Pair</button>
<button class="btn btn-primary btn-sm" v-on:click="pair(device)" v-if="device.online && !device.paired && !device.pairing">Pair</button>
<button class="btn btn-warning btn-sm" v-on:click="power(device)" v-if="device.started">Power</button>
<div class="row" v-if="device.pairing">
<div class="col-sm-4">
Expand Down
6 changes: 3 additions & 3 deletions src/homebridge/platform.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AdminServer } from "./admin"
import { DeviceManager } from "./DeviceManager.js"
import { AdminServer } from "./admin/index.js";
import { DeviceManager } from "./DeviceManager.js";
export const PLATFORM_NAME = 'HomebridgeAndroidTV';
export const PLUGIN_NAME = 'homebridge-androidtv';
import {RemoteKeyCode, RemoteDirection} from "androidtv-remote";
Expand Down Expand Up @@ -43,7 +43,7 @@ class AndroidTV {

this.deviceManager.on('discover', this.discover.bind(this));

this.adminServer = new AdminServer(this.config.port?this.config.port:8181, this.deviceManager)
this.adminServer = new AdminServer(this.config.port?this.config.port:8182, this.deviceManager)
this.adminServer.listen()
.then(port => {
this.log.info(`Admin server is running on port ${port}`);
Expand Down

0 comments on commit cc50604

Please sign in to comment.