Because of a question in github, these are the relevant parts of my config. I hope I didn’t miss anything.
{
"devices": [
{
"class": "AVRSensor",
"id": "avrsensor",
"name": "Display",
"attributes": [
{
"name": "display"
},
{
"name": "vol"
},
{
"name": "status"
}
],
"xAttributeOptions": [
{
"name": "vol",
"displaySparkline": false,
"hidden": false
},
{
"name": "status",
"displaySparkline": false,
"hidden": true
}
]
},
{
"class": "DummyDimmer",
"id": "vol-slider",
"name": "Volume"
},
{
"id": "change-volume",
"name": "Steuerung",
"class": "ButtonsDevice",
"buttons": [
{
"id": "sound_as",
"text": "AS"
},
{
"id": "sound_ES",
"text": "ES"
},
{
"id": "vol_down",
"text": "Vol -"
},
{
"id": "vol_up",
"text": "Vol +"
},
{
"id": "vol_mute",
"text": "mute"
}
]
},
{
"class": "DummySwitch",
"id": "dummy",
"name": "Dummy"
},
{
"id": "avr-presence",
"name": "AVR",
"class": "PingPresence",
"host": "192.168.0.15",
"interval": 30000
},
{
"buttons": [
{
"id": "avr-input-dvd-button",
"text": "DVD"
},
{
"id": "avr-input-bdr-button",
"text": "HTPC"
},
{
"id": "avr-input-tv-button",
"text": "TV"
},
{
"id": "avr-input-hmg-button",
"text": "HMG"
}
],
"id": "avr-input",
"name": "Input",
"class": "ButtonsDevice"
},
{
"id": "avr-switch",
"name": "Power",
"class": "DummySwitch"
}
],
"rules": [
{
"id": "avr-switch-status-on",
"name": "avr-switch-status-on",
"rule": "when $avrsensor.status = 1 then turn avr-switch on",
"active": true,
"logging": false
},
{
"id": "avr-switch-status-off",
"name": "avr-switch-status-off",
"rule": "when $avrsensor.status = 0 or avr-presence is absent then turn avr-switch off",
"active": true,
"logging": false
},
{
"id": "avr-switch-turn-off",
"name": "avr-switch-turn-off",
"rule": "when avr-switch is turned off then sendAvr \"power.off\"",
"active": true,
"logging": false
},
{
"id": "avr-switch-turn-on",
"name": "avr-switch-turn-on",
"rule": "when avr-presence is present and avr-switch is turned on then sendAvr \"power.on\"",
"active": true,
"logging": false
},
{
"id": "change-vol",
"name": "change vol",
"rule": "when $vol-slider.dimlevel changes then sendAvr \"volume.set.$vol-slider.dimlevel\"",
"active": true,
"logging": false
},
{
"id": "volume-down",
"name": "Volume down",
"rule": "when vol_down is pressed then sendAvr \"volume.down\"",
"active": true,
"logging": false
},
{
"id": "volume-up",
"name": "Volume up",
"rule": "when vol_up is pressed then sendAvr \"volume.up\"",
"active": true,
"logging": false
},
{
"id": "volume-mute",
"name": "Volume mute",
"rule": "when vol_mute is pressed then sendAvr \"volume.mute\"",
"active": true,
"logging": true
},
{
"id": "sound-es",
"name": "Sound ES",
"rule": "when sound_ES is pressed then sendAvr \"sound.extStereo\"",
"active": true,
"logging": true
},
{
"id": "sound-as",
"name": "Sound AS",
"rule": "when sound_as is pressed then sendAvr \"sound.autoSurr\"",
"active": true,
"logging": false
},
{
"id": "avr-input-hmg",
"name": "AVR Input HMG",
"rule": "when avr-input-hmg-button is pressed then sendAvr \"input.hmg\"",
"active": true,
"logging": false
},
{
"id": "avr-input-dvd",
"name": "AVR Input DVD",
"rule": "when avr-input-dvd-button is pressed then sendAvr \"input.dvd\"",
"active": true,
"logging": false
},
{
"id": "avr-input-tv",
"name": "AVR Input TV",
"rule": "when avr-input-tv-button is pressed then sendAvr \"input.tv_sat\"",
"active": true,
"logging": false
},
{
"id": "avr-input-dvr-bdr",
"name": "AVR Input DVR BDR ",
"rule": "when avr-input-bdr-button is pressed then sendAvr \"input.dvr_bdr\"",
"active": true,
"logging": false
},
{
"id": "set-vol-slider-on-vol-change",
"name": "set-vol-slider-on-vol-change",
"rule": "when $avrsensor.vol changes then dim vol-slider to (($min-volume - $avrsensor.vol) / -0.5)",
"active": true,
"logging": false
}
],
"pages": [
{
"id": "avr-page",
"name": "AVR",
"devices": [
{
"deviceId": "avr-switch"
},
{
"deviceId": "avrsensor"
},
{
"deviceId": "avr-input"
},
{
"deviceId": "change-volume"
},
{
"deviceId": "vol-slider"
}
]
}
],
"variables": [
{
"name": "min-volume",
"value": -80.5
}
]
}
Looks like this, except the subwoofer switch:
![Snip alt text](https://elitegroup-online.de/pictures/snips/AVR.JPG)