Skip to content

Commit

Permalink
release 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Aug 14, 2024
1 parent a050023 commit bcfa330
Show file tree
Hide file tree
Showing 12 changed files with 256 additions and 213 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Note - after update to 4.7.x buttons, sensors, volume display type need to be configure again using config UI
## Note - after update to 3.15.x need remove the accessory frome Home app and add it again

## [5.0.0] - (14.08.2024)

## Changes

### After update to v9.0.0 RESTFull and MQTT config settings need to be updated

- hide passwords by typing and display in Config UI
- remove return duplicate promises from whole code
- bump dependencies
- cleanup

## [4.14.0] - (04.08.2024)

## Changes
Expand Down
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,20 @@ Tested Denon AVR-2112CI, AVR-3311CI, AVR-X6300H, AVR-X2700H, AVC-X4800H, Marantz
| `disableLogDeviceInfo` | If enabled, add ability to disable log device info by every connections device to the network. |
| `disableLogConnectError` | If enabled, disable logging device connect error. |
| `enableRestFul` | If enabled, RESTful server will start automatically and respond to any path request. |
| `restFulPort` | Here set the listening `Port` for RESTful server, every zone need own port. |
| `restFulDebug` | If enabled, deep log will be present in homebridge console for RESTFul server. |
| `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. |
| `mqttClientId` | Here optional set the `Client Id` of MQTT Broker. |
| `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. |
| `restFul` | This is RSTful server. |
| `enable` | If enabled, RESTful server will start automatically and respond to any path request. |
| `port` | Here set the listening `Port` for RESTful server. |
| `debug` | If enabled, deep log will be present in homebridge console for RESTFul server. |
| `mqtt` | This is MQTT Broker. |
| `enable` | If enabled, MQTT Broker will start automatically and publish all awailable PV data. |
| `host` | Here set the `IP Address` or `Hostname` for MQTT Broker. |
| `port` | Here set the `Port` for MQTT Broker, default 1883. |
| `clientId` | Here optional set the `Client Id` of MQTT Broker. |
| `prefix` | Here set the `Prefix` for `Topic` or leave empty. |
| `auth` | If enabled, MQTT Broker will use authorization credentials. |
| `user` | Here set the MQTT Broker user. |
| `passwd` | Here set the MQTT Broker password. |
| `debug` | If enabled, deep log will be present in homebridge console for MQTT. |
| `AV Surround Mode` | This extra Accessory will control all functions of Main Zone except `Inputs` and `Buttons`. |

### RESTFul Integration
Expand Down
267 changes: 141 additions & 126 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6587,120 +6587,131 @@
"description": "This disable logging device connect error.",
"required": false
},
"enableRestFul": {
"title": "Enable",
"type": "boolean",
"default": false,
"description": "This enable RESTful server.",
"required": false
},
"restFulDebug": {
"title": "Debug",
"type": "boolean",
"default": false,
"description": "This enable debug mode for RESTFul.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableRestFul === true;"
},
"required": false
},
"restFulPort": {
"title": "Port",
"type": "integer",
"placeholder": 3000,
"description": "Here set the listening Port for RESTful server, every zone need own port.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableRestFul === true;"
},
"required": false
},
"enableMqtt": {
"title": "Enable",
"type": "boolean",
"default": false,
"description": "This enable MQTT client.",
"required": false
},
"mqttDebug": {
"title": "Debug",
"type": "boolean",
"default": false,
"description": "This enable debug mode for MQTT.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
},
"required": false
},
"mqttHost": {
"title": "IP/Hostname",
"type": "string",
"placeholder": "ip or hostname",
"format": "hostname",
"description": "Here set the IP/Hostname of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
},
"required": false
},
"mqttPort": {
"title": "Port",
"type": "integer",
"placeholder": 1883,
"description": "Here set the port of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
},
"required": false
},
"mqttClientId": {
"title": "Client ID",
"type": "string",
"placeholder": "client id",
"description": "Here optional set the Client ID of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true"
},
"required": false
},
"mqttPrefix": {
"title": "Prefix",
"type": "string",
"placeholder": "home/openwebif",
"description": "Here set the prefix.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
},
"required": false
},
"mqttAuth": {
"title": "Authorization",
"type": "boolean",
"default": false,
"description": "This enable authorization for MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
},
"required": false
},
"mqttUser": {
"title": "User",
"type": "string",
"placeholder": "username",
"description": "Here set the user of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true && model.devices[arrayIndices].mqttAuth === true;"
},
"required": false
"restFul": {
"title": "RESTFul",
"type": "object",
"properties": {
"enable": {
"title": "Enable",
"type": "boolean",
"default": false,
"description": "This enable RESTful server."
},
"debug": {
"title": "Debug",
"type": "boolean",
"default": false,
"description": "This enable debug mode for RESTFul.",
"condition": {
"functionBody": "return model.devices[arrayIndices].restFul.enable === true;"
},
"required": false
},
"port": {
"title": "Port",
"type": "integer",
"placeholder": 3000,
"description": "Here set the listening Port for RESTful server.",
"condition": {
"functionBody": "return model.devices[arrayIndices].restFul.enable === true;"
},
"required": false
}
}
},
"mqttPasswd": {
"title": "Password",
"type": "string",
"placeholder": "password",
"description": "Here set the password of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].enableMqtt === true && model.devices[arrayIndices].mqttAuth === true;"
},
"required": false
"mqtt": {
"title": "MQTT",
"type": "object",
"properties": {
"enable": {
"title": "Enable",
"type": "boolean",
"default": false,
"description": "This enable MQTT client."
},
"debug": {
"title": "Debug",
"type": "boolean",
"default": false,
"description": "This enable debug mode for MQTT.",
"condition": {
"functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
},
"required": false
},
"host": {
"title": "IP/Hostname",
"type": "string",
"placeholder": "ip or hostname",
"format": "hostname",
"description": "Here set the IP/Hostname of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
},
"required": false
},
"port": {
"title": "Port",
"type": "integer",
"placeholder": 1883,
"description": "Here set the port of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
},
"required": false
},
"clientId": {
"title": "Client ID",
"type": "string",
"placeholder": "client id",
"description": "Here optional set the Client ID of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].mqtt.enable === true"
},
"required": false
},
"prefix": {
"title": "Prefix",
"type": "string",
"placeholder": "home/envoy",
"description": "Here set the prefix.",
"condition": {
"functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
},
"required": false
},
"auth": {
"title": "Authorization",
"type": "boolean",
"default": false,
"description": "This enable authorization for MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
},
"required": false
},
"user": {
"title": "User",
"type": "string",
"placeholder": "user",
"description": "Here set the user of MQTT Broker.",
"condition": {
"functionBody": "return model.devices[arrayIndices].mqtt.enable === true && model.devices[arrayIndices].mqtt.auth === true;"
},
"required": false
},
"passwd": {
"title": "Password",
"type": "string",
"placeholder": "password",
"description": "Here set the password of MQTT Broker.",
"format": "password",
"condition": {
"functionBody": "return model.devices[arrayIndices].mqtt.enable === true && model.devices[arrayIndices].mqtt.auth === true;"
},
"required": false
}
}
}
}
}
Expand Down Expand Up @@ -6943,26 +6954,30 @@
"title": "{{ value.title }}",
"items": [
{
"key": "devices[]",
"key": "devices[].restFul",
"title": "RESTFul",
"items": [
"devices[].enableRestFul",
"devices[].restFulDebug",
"devices[].restFulPort"
"devices[].restFul.enable",
"devices[].restFul.debug",
"devices[].restFul.port"
]
},
{
"key": "devices[]",
"key": "devices[].mqtt",
"title": "MQTT",
"items": [
"devices[].enableMqtt",
"devices[].mqttDebug",
"devices[].mqttHost",
"devices[].mqttPort",
"devices[].mqttPrefix",
"devices[].mqttAuth",
"devices[].mqttUser",
"devices[].mqttPasswd"
"devices[].mqtt.enable",
"devices[].mqtt.debug",
"devices[].mqtt.host",
"devices[].mqtt.port",
"devices[].mqtt.clientId",
"devices[].mqtt.prefix",
"devices[].mqtt.auth",
"devices[].mqtt.user",
{
"key": "devices[].mqtt.passwd",
"type": "password"
}
]
}
]
Expand Down
10 changes: 9 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ class DenonPlatform {
//debug config
const enableDebugMode = device.enableDebugMode || false;
const debug = enableDebugMode ? log(`Device: ${host} ${deviceName}, did finish launching.`) : false;
const debug1 = enableDebugMode ? log(`Device: ${host} ${deviceName}, Config: ${JSON.stringify(device, null, 2)}`) : false;
const config = {
...device,
mqtt: {
...device.mqtt,
user: 'removed',
passwd: 'removed'
}
};
const debug1 = enableDebugMode ? log(`Device: ${host} ${deviceName}, Config: ${JSON.stringify(config, null, 2)}`) : false;

//zones
const zoneControl = device.zoneControl;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Denon TV",
"name": "homebridge-denon-tv",
"version": "4.14.2",
"version": "5.0.0",
"description": "Homebridge plugin to control Denon/Marantz AV Receivers.",
"license": "MIT",
"author": "grzegorz914",
Expand Down
Loading

0 comments on commit bcfa330

Please sign in to comment.