Skip to content

Commit

Permalink
release 4.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Apr 21, 2024
1 parent c87c44c commit 0fe32c2
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ 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.

## [4.13.0] - (21.04.2024)
## Changes
- added possibility to set max volume for slider, fan, and speaker
- config schema updated
- cleanup

## [4.12.0] - (04.04.2024)
## Changes
- remove unused master volume and mute control for main zone and surround
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Tested Denon AVR-2112CI, AVR-3311CI, AVR-X6300H, AVR-X2700H, AVC-X4800H, Marantz
| `masterVolume`| If enabled, then the Volume for that zone will set the entire receiver `UP` or `DOWN` rather than just the zone itself, (only for the Zone 1 and 2). |
| `masterMute`| If enabled, then the Mute switch for that zone will muted the entire receiver `ON` or `OFF` rather than just the zone itself, (only for the Zone 1 and 2). |
| `volumeControl` | Here choose what a additional volume control mode You want to use, `0 - None/Disabled`, `1 - Lightbulb`, `2 - Fan`. |
| `volumeMax` | Here set the maximum possible volume to set, `0 - 100`. |
| `infoButtonCommand` | Here choose the function for `I` button in RC app. |
| `refreshInterval` | Here set the data refresh interval. |
| `enableRestFul` | If enabled, RESTful server will start automatically and respond to any path request. |
Expand Down
10 changes: 10 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6246,6 +6246,15 @@
],
"required": true
},
"volumeMax": {
"title": "Max Volume (%)",
"type": "integer",
"default": 100,
"minimum": 0,
"maximum": 100,
"description": "Here set the max possible volume to set.",
"required": true
},
"refreshInterval": {
"title": "Refresh interval (sec)",
"type": "integer",
Expand Down Expand Up @@ -6579,6 +6588,7 @@
"devices[].masterMute",
"devices[].infoButtonCommand",
"devices[].volumeControl",
"devices[].volumeMax",
"devices[].refreshInterval"
]
},
Expand Down
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.12.10",
"version": "4.13.0",
"description": "Homebridge plugin to control Denon/Marantz AV Receivers.",
"license": "MIT",
"author": "grzegorz914",
Expand Down
4 changes: 4 additions & 0 deletions sample-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"masterPower": false,
"infoButtonCommand": "MNINF",
"volumeControl": 0,
"volumeMax": 0,
"refreshInterval": 5,
"enableRestFul": false,
"restFulPort": 3000,
Expand Down Expand Up @@ -130,6 +131,7 @@
"masterMute": false,
"infoButtonCommand": "MNINF",
"volumeControl": 0,
"volumeMax": 0,
"refreshInterval": 5,
"enableRestFul": false,
"restFulPort": 3001,
Expand Down Expand Up @@ -189,6 +191,7 @@
"masterMute": false,
"infoButtonCommand": "MNINF",
"volumeControl": 0,
"volumeMax": 0,
"refreshInterval": 5,
"enableRestFul": false,
"restFulPort": 3002,
Expand Down Expand Up @@ -237,6 +240,7 @@
"masterPower": false,
"infoButtonCommand": "MNINF",
"volumeControl": 0,
"volumeMax": 0,
"refreshInterval": 5,
"enableRestFul": false,
"restFulPort": 3003,
Expand Down
13 changes: 13 additions & 0 deletions src/mainzone.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class MainZone extends EventEmitter {
this.disableLogConnectError = device.disableLogConnectError || false;
this.infoButtonCommand = device.infoButtonCommand || 'MNINF';
this.volumeControl = device.volumeControl || false;
this.volumeMax = device.volumeMax || 100;
this.masterPower = device.masterPower || false;

//external integration
Expand Down Expand Up @@ -628,6 +629,10 @@ class MainZone extends EventEmitter {
});

this.tvSpeakerService.getCharacteristic(Characteristic.Volume)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand Down Expand Up @@ -758,6 +763,10 @@ class MainZone extends EventEmitter {
this.volumeService.addOptionalCharacteristic(Characteristic.ConfiguredName);
this.volumeService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Volume`);
this.volumeService.getCharacteristic(Characteristic.Brightness)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand All @@ -782,6 +791,10 @@ class MainZone extends EventEmitter {
this.volumeServiceFan.addOptionalCharacteristic(Characteristic.ConfiguredName);
this.volumeServiceFan.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Volume`);
this.volumeServiceFan.getCharacteristic(Characteristic.RotationSpeed)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand Down
13 changes: 13 additions & 0 deletions src/surround.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Surround extends EventEmitter {
this.disableLogConnectError = device.disableLogConnectError || false;
this.infoButtonCommand = device.infoButtonCommand || 'MNINF';
this.volumeControl = device.volumeControl || false;
this.volumeMax = device.volumeMax || 100;
this.masterPower = device.masterPower || false;

//external integration
Expand Down Expand Up @@ -559,6 +560,10 @@ class Surround extends EventEmitter {
});

this.tvSpeakerService.getCharacteristic(Characteristic.Volume)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand Down Expand Up @@ -689,6 +694,10 @@ class Surround extends EventEmitter {
this.volumeService.addOptionalCharacteristic(Characteristic.ConfiguredName);
this.volumeService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Volume`);
this.volumeService.getCharacteristic(Characteristic.Brightness)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand All @@ -713,6 +722,10 @@ class Surround extends EventEmitter {
this.volumeServiceFan.addOptionalCharacteristic(Characteristic.ConfiguredName);
this.volumeServiceFan.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Volume`);
this.volumeServiceFan.getCharacteristic(Characteristic.RotationSpeed)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand Down
13 changes: 13 additions & 0 deletions src/zone2.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Zone2 extends EventEmitter {
this.disableLogConnectError = device.disableLogConnectError || false;
this.infoButtonCommand = device.infoButtonCommand || 'MNINF';
this.volumeControl = device.volumeControl || false;
this.volumeMax = device.volumeMax || 100;
this.masterPower = device.masterPower || false;
this.masterVolume = device.masterVolume || false;
this.masterMute = device.masterMute || false;
Expand Down Expand Up @@ -546,6 +547,10 @@ class Zone2 extends EventEmitter {
});

this.tvSpeakerService.getCharacteristic(Characteristic.Volume)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand Down Expand Up @@ -676,6 +681,10 @@ class Zone2 extends EventEmitter {
this.volumeService.addOptionalCharacteristic(Characteristic.ConfiguredName);
this.volumeService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Volume`);
this.volumeService.getCharacteristic(Characteristic.Brightness)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand All @@ -700,6 +709,10 @@ class Zone2 extends EventEmitter {
this.volumeServiceFan.addOptionalCharacteristic(Characteristic.ConfiguredName);
this.volumeServiceFan.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Volume`);
this.volumeServiceFan.getCharacteristic(Characteristic.RotationSpeed)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand Down
13 changes: 13 additions & 0 deletions src/zone3.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Zone3 extends EventEmitter {
this.disableLogConnectError = device.disableLogConnectError || false;
this.infoButtonCommand = device.infoButtonCommand || 'MNINF';
this.volumeControl = device.volumeControl || false;
this.volumeMax = device.volumeMax || 100;
this.masterPower = device.masterPower || false;
this.masterVolume = device.masterVolume || false;
this.masterMute = device.masterMute || false;
Expand Down Expand Up @@ -546,6 +547,10 @@ class Zone3 extends EventEmitter {
});

this.tvSpeakerService.getCharacteristic(Characteristic.Volume)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand Down Expand Up @@ -676,6 +681,10 @@ class Zone3 extends EventEmitter {
this.volumeService.addOptionalCharacteristic(Characteristic.ConfiguredName);
this.volumeService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Volume`);
this.volumeService.getCharacteristic(Characteristic.Brightness)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand All @@ -700,6 +709,10 @@ class Zone3 extends EventEmitter {
this.volumeServiceFan.addOptionalCharacteristic(Characteristic.ConfiguredName);
this.volumeServiceFan.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Volume`);
this.volumeServiceFan.getCharacteristic(Characteristic.RotationSpeed)
.setProps({
minValue: 0,
maxValue: this.volumeMax
})
.onGet(async () => {
const volume = this.volume;
return volume;
Expand Down

0 comments on commit 0fe32c2

Please sign in to comment.