Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Feb 27, 2022
1 parent 81e27a5 commit 916e083
Show file tree
Hide file tree
Showing 12 changed files with 1,193 additions and 235 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### NOTE!!!
## After update to 2.x.x the plugin settings (xboxLiveId) need to be updated.

## [2.2.0] - (27.02.2022)
## Added
- MQTT Client, publish all device data
- possibility to set custom command for Info button in RC

## Changes
- update dependencies
- code refactor

## [2.1.3] - (28.01.2022)
### Fixed
- offset out of range
Expand Down
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Homebridge plugin for Microsoft game Consoles. Tested with Xbox One X/S and Xbox
* Siri can be used for all functions, some times need create legacy buttons/switches/sensors.
* Automations can be used for all functions, some times need create legacy buttons/switches/sensors.
* Record Game DVR with additional button.
* MQTT Client publisch all available data from device.

<p align="left">
<a href="https://github.com/grzegorz914/homebridge-xbox-tv"><img alt="Accessory tile in the HomeKit app" src="https://raw.githubusercontent.com/grzegorz914/homebridge-xbox-tv/master/graphics/homekit.png" width="382" /></a>
Expand Down Expand Up @@ -98,7 +99,7 @@ Install and use [Homebridge Config UI X](https://github.com/oznu/homebridge-conf
| `disableLogDeviceInfo` | If enabled, add ability to disable log device info by every connections device to the network. |
| `enableDebugMode` | If enabled, deep log will be present in homebridge console. |
| `volumeControl` | Here select what a additional volume control mode You want to use (None, Slider, Fan), not yet implemented. |
| `switchInfoMenu` | If enabled, `I` button change its behaviour in RC app between Menu and INFO. |
| `infoButtonCommand` | Here select the function of `I` button in RC app. |
| `getInputsFromDevice`| If enabled, apps will be loaded from device, only available if `webApiControl` enabled. |
| `filterGames` | If enabled, Games will be hidden and not displayed in the inputs list, only available if `webApiControl` enabled. |
| `filterApps` | If enabled, Apps will be hidden and not displayed in the inputs list, only available if `webApiControl` enabled. |
Expand All @@ -112,6 +113,14 @@ Install and use [Homebridge Config UI X](https://github.com/oznu/homebridge-conf
| `buttons.command` | Here select button control mode or command, `Reboot` and `Switch App/Game`- only possible if `webApiControl` enabled. |
| `buttons.oneStoreProductId` | Here set *Input oneStoreProductId*, only possible if `webApiControl` enabled.|
| `buttons.displayType` | Here select display type in HomeKit app, possible `Switch`, `Button` - selectable in HomeKit app as Light, Fan, Outlet.|
| `enableMqtt` | If enabled, MQTT Broker will start automatically and publish all awailable PV installation data. |
| `mqttHost` | Here set the *IP Address* or *Hostname* for MQTT Broker.) |
| `mqttPort` | Here set the *Port* for MQTT Broker, default 1883.) |
| `mqttPrefix` | Here set the *Prefix* for *Topic* or leave empty.) |
| `mqttAuth` | If enabled, MQTT Broker will use authorization credentials. |
| `mqttUser` | Here set the MQTT Broker user. |
| `mqttPasswd` | Here set the MQTT Broker password. |
| `mqttDebug` | If enabled, deep log will be present in homebridge console for MQTT. |
| `reference`, `oneStoreProductId` | If web Api enabled then all available in `./homebridge/xboxTv/inputs_xxxxxx` file. |

*Example Config:
Expand All @@ -134,7 +143,7 @@ Install and use [Homebridge Config UI X](https://github.com/oznu/homebridge-conf
"disableLogDeviceInfo": false,
"enableDebugMode": false,
"volumeControl": 0,
"switchInfoMenu": false,
"infoButtonCommand": "nexus",
"getInputsFromDevice": false,
"filterGames": false,
"filterApps": false,
Expand Down Expand Up @@ -176,7 +185,15 @@ Install and use [Homebridge Config UI X](https://github.com/oznu/homebridge-conf
"oneStoreProductId": "oneStoreProductId",
"displayType": 0
},
]
],
"enableMqtt": false,
"mqttHost": "192.168.1.33",
"mqttPort": 1883,
"mqttPrefix": "home/xbox",
"mqttAuth": false,
"mqttUser": "user",
"mqttPass": "password",
"mqttDebug": false
}
]
}
Expand Down
141 changes: 124 additions & 17 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,35 +70,35 @@
"required": false
},
"disableLogInfo": {
"title": "Disable log info",
"title": "Disable Log Info",
"type": "boolean",
"default": false,
"description": "This disable logging values and states on every it change.",
"required": false
},
"disableLogDeviceInfo": {
"title": "Disable log device info",
},
"disableLogDeviceInfo": {
"title": "Disable Log Device Info",
"type": "boolean",
"default": false,
"description": "This disable log device info by every connections device to the network.",
"required": false
},
"enableDebugMode": {
"title": "Enable Debug Mode",
},
"enableDebugMode": {
"title": "Debug",
"type": "boolean",
"default": false,
"description": "This enable debug mode.",
"required": false
},
},
"webApiControl": {
"title": "Enable Web Api",
"title": "Web Api",
"type": "boolean",
"default": false,
"description": "This enable possibility to control Xbox over Web Api.",
"required": false
},
"volumeControl": {
"title": "Volume Control Mode",
"title": "Volume Control",
"type": "integer",
"minimum": 0,
"maximum": 2,
Expand All @@ -125,12 +125,24 @@
],
"required": true
},
"switchInfoMenu": {
"title": "Switch Info/Menu",
"type": "boolean",
"default": false,
"description": "This toggle behaviour for *I* button in RC app and *PowerModeSelection* in settings.",
"required": false
"infoButtonCommand": {
"title": "Info Button",
"type": "string",
"oneOf": [{
"title": "View",
"enum": [
"view"
]
},
{
"title": "Nexus",
"enum": [
"nexus"
]
}
],
"description": "Here select the function of info button in RC.",
"required": true
},
"getInputsFromDevice": {
"title": "Load Inputs From Device",
Expand Down Expand Up @@ -532,6 +544,84 @@
}
}
}
},
"enableMqtt": {
"title": "Enable",
"type": "boolean",
"default": false,
"required": false,
"description": "This enable MQTT client."
},
"mqttHost": {
"title": "IP/Hostname",
"type": "string",
"placeholder": "ip or hostname",
"required": true,
"format": "hostname",
"description": "Here set the IP/Hostname of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
}
},
"mqttPort": {
"title": "Port",
"type": "integer",
"placeholder": 1883,
"required": true,
"description": "Here set the port of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
}
},
"mqttPrefix": {
"title": "Prefix",
"type": "string",
"placeholder": "home/xbox",
"required": false,
"description": "Here set the prefix.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
}
},
"mqttAuth": {
"title": "Authorization",
"type": "boolean",
"default": false,
"required": false,
"description": "This enable authorization for MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
}
},
"mqttUser": {
"title": "User",
"type": "string",
"placeholder": "user",
"required": false,
"description": "Here set the user of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true && model.devices[arrayIndices].mqttAuth === true;"
}
},
"mqttPasswd": {
"title": "Password",
"type": "string",
"placeholder": "password",
"required": false,
"description": "Here set the password of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true && model.devices[arrayIndices].mqttAuth === true;"
}
},
"mqttDebug": {
"title": "Debug",
"type": "boolean",
"default": false,
"required": false,
"description": "This enable debug mode for MQTT.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
}
}
}
}
Expand Down Expand Up @@ -593,6 +683,23 @@
]
}]
},
{
"key": "devices[]",
"type": "section",
"title": "MQTT Client",
"expandable": true,
"expanded": false,
"items": [
"devices[].enableMqtt",
"devices[].mqttHost",
"devices[].mqttPort",
"devices[].mqttPrefix",
"devices[].mqttAuth",
"devices[].mqttUser",
"devices[].mqttPasswd",
"devices[].mqttDebug"
]
},
{
"key": "devices[]",
"type": "section",
Expand Down Expand Up @@ -620,7 +727,7 @@
"devices[].enableDebugMode",
"devices[].disableLogInfo",
"devices[].disableLogDeviceInfo",
"devices[].switchInfoMenu",
"devices[].infoButtonCommand",
"devices[].volumeControl"
]
}
Expand Down
Loading

0 comments on commit 916e083

Please sign in to comment.